diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 6e15449f7ec43..664ea12836886 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 e46e943ce629f..80c9993819d17 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.20230927.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20230927.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 dea02870b734d..75a045d3a6856 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 @@ -195,7 +195,7 @@ ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClien RequestContent content = RequestContent.Create(new { - applicationProductDetails = new List() + applicationProductDetails = new object[] { new { @@ -275,7 +275,7 @@ ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClien RequestContent content = RequestContent.Create(new { - applicationProductDetails = new List() + applicationProductDetails = new object[] { new { @@ -343,6 +343,7 @@ TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -351,6 +352,7 @@ TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -362,6 +364,7 @@ TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -370,6 +373,7 @@ TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -383,7 +387,7 @@ ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClien 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllApplicationDataAsync with all parameters and parse the result. @@ -391,56 +395,38 @@ This sample shows how to call GetAllApplicationDataAsync with all parameters and TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetAllApplicationDataAsync(123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -454,7 +440,7 @@ ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClien 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllApplicationData with all parameters and parse the result. @@ -462,56 +448,38 @@ This sample shows how to call GetAllApplicationData with all parameters and pars TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetAllApplicationData(123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -525,7 +493,7 @@ ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClien 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllApplicationDataByPartyIdAsync with all parameters and parse the result. @@ -533,56 +501,38 @@ This sample shows how to call GetAllApplicationDataByPartyIdAsync with all param TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetAllApplicationDataByPartyIdAsync("", 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -596,7 +546,7 @@ ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClien 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllApplicationDataByPartyId with all parameters and parse the result. @@ -604,56 +554,38 @@ This sample shows how to call GetAllApplicationDataByPartyId with all parameters TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetAllApplicationDataByPartyId("", 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 0dc94eaab61c3..063f75e88d713 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 @@ -157,6 +157,7 @@ TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -165,6 +166,7 @@ TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -176,6 +178,7 @@ TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -184,6 +187,7 @@ TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -195,12 +199,11 @@ TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> This sample shows how to call DownloadAsync with all parameters and parse the result. @@ -209,12 +212,11 @@ TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> @@ -226,12 +228,11 @@ TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> This sample shows how to call Download with all parameters and parse the result. @@ -240,12 +241,11 @@ TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> @@ -259,7 +259,7 @@ Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVer 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAttachmentsByPartyIdAsync with all parameters and parse the result. @@ -267,41 +267,23 @@ This sample shows how to call GetAttachmentsByPartyIdAsync with all parameters a TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -315,7 +297,7 @@ Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVer 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAttachmentsByPartyId with all parameters and parse the result. @@ -323,41 +305,23 @@ This sample shows how to call GetAttachmentsByPartyId with all parameters and pa TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetAttachmentsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 698fe8dc0a463..a4b5c00750ced 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 @@ -95,13 +95,13 @@ RequestContent content = RequestContent.Create(new { geometry = new { - coordinates = new List() + coordinates = new object[] { - new List() + new object[] { - new List() + new object[] { - new List() + new object[] { 123.45 } @@ -175,13 +175,13 @@ RequestContent content = RequestContent.Create(new { geometry = new { - coordinates = new List() + coordinates = new object[] { - new List() + new object[] { - new List() + new object[] { - new List() + new object[] { 123.45 } @@ -327,6 +327,7 @@ TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -335,6 +336,7 @@ TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -346,6 +348,7 @@ TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -354,6 +357,7 @@ TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -417,7 +421,7 @@ Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersi 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetBoundariesAsync with all parameters and parse the result. @@ -425,41 +429,26 @@ This sample shows how to call GetBoundariesAsync with all parameters and parse t TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetBoundariesAsync("", "", new string[] { "" }, 123.45, 123.45, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -473,7 +462,7 @@ Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersi 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetBoundaries with all parameters and parse the result. @@ -481,41 +470,26 @@ This sample shows how to call GetBoundaries with all parameters and parse the re TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetBoundaries("", "", new string[] { "" }, 123.45, 123.45, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -530,7 +504,7 @@ RequestContent content = RequestContent.Create(new object()); await foreach (BinaryData item in client.SearchAsync(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call SearchAsync with all request content and parse the result. @@ -540,19 +514,19 @@ Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersi RequestContent content = RequestContent.Create(new { - ids = new List() + ids = new object[] { "" }, - names = new List() + names = new object[] { "" }, - propertyFilters = new List() + propertyFilters = new object[] { "" }, - statuses = new List() + statuses = new object[] { "" }, @@ -564,7 +538,7 @@ RequestContent content = RequestContent.Create(new skipToken = "", parentType = "Field", type = "", - parentIds = new List() + parentIds = new object[] { "" }, @@ -572,13 +546,13 @@ RequestContent content = RequestContent.Create(new maxArea = 123.45, intersectsWithGeometry = new { - coordinates = new List() + coordinates = new object[] { - new List() + new object[] { - new List() + new object[] { - new List() + new object[] { 123.45 } @@ -591,23 +565,23 @@ RequestContent content = RequestContent.Create(new await foreach (BinaryData item in client.SearchAsync(content)) { 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()); + 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()); } ]]> @@ -622,7 +596,7 @@ RequestContent content = RequestContent.Create(new object()); foreach (BinaryData item in client.Search(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call Search with all request content and parse the result. @@ -632,19 +606,19 @@ Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersi RequestContent content = RequestContent.Create(new { - ids = new List() + ids = new object[] { "" }, - names = new List() + names = new object[] { "" }, - propertyFilters = new List() + propertyFilters = new object[] { "" }, - statuses = new List() + statuses = new object[] { "" }, @@ -656,7 +630,7 @@ RequestContent content = RequestContent.Create(new skipToken = "", parentType = "Field", type = "", - parentIds = new List() + parentIds = new object[] { "" }, @@ -664,13 +638,13 @@ RequestContent content = RequestContent.Create(new maxArea = 123.45, intersectsWithGeometry = new { - coordinates = new List() + coordinates = new object[] { - new List() + new object[] { - new List() + new object[] { - new List() + new object[] { 123.45 } @@ -683,23 +657,23 @@ RequestContent content = RequestContent.Create(new foreach (BinaryData item in client.Search(content)) { 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()); + 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()); } ]]> @@ -713,7 +687,7 @@ Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersi 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetBoundariesByPartyIdAsync with all parameters and parse the result. @@ -721,41 +695,26 @@ This sample shows how to call GetBoundariesByPartyIdAsync with all parameters an TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetBoundariesByPartyIdAsync("", "", "", new string[] { "" }, 123.45, 123.45, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -769,7 +728,7 @@ Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersi 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetBoundariesByPartyId with all parameters and parse the result. @@ -777,41 +736,26 @@ This sample shows how to call GetBoundariesByPartyId with all parameters and par TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetBoundariesByPartyId("", "", "", new string[] { "" }, 123.45, 123.45, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -826,7 +770,7 @@ RequestContent content = RequestContent.Create(new object()); await foreach (BinaryData item in client.SearchByPartyIdAsync("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call SearchByPartyIdAsync with all parameters and request content and parse the result. @@ -836,19 +780,19 @@ Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersi RequestContent content = RequestContent.Create(new { - ids = new List() + ids = new object[] { "" }, - names = new List() + names = new object[] { "" }, - propertyFilters = new List() + propertyFilters = new object[] { "" }, - statuses = new List() + statuses = new object[] { "" }, @@ -860,7 +804,7 @@ RequestContent content = RequestContent.Create(new skipToken = "", parentType = "Field", type = "", - parentIds = new List() + parentIds = new object[] { "" }, @@ -868,13 +812,13 @@ RequestContent content = RequestContent.Create(new maxArea = 123.45, intersectsWithGeometry = new { - coordinates = new List() + coordinates = new object[] { - new List() + new object[] { - new List() + new object[] { - new List() + new object[] { 123.45 } @@ -887,23 +831,23 @@ RequestContent content = RequestContent.Create(new await foreach (BinaryData item in client.SearchByPartyIdAsync("", content)) { 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()); + 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()); } ]]> @@ -918,7 +862,7 @@ RequestContent content = RequestContent.Create(new object()); foreach (BinaryData item in client.SearchByPartyId("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call SearchByPartyId with all parameters and request content and parse the result. @@ -928,19 +872,19 @@ Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersi RequestContent content = RequestContent.Create(new { - ids = new List() + ids = new object[] { "" }, - names = new List() + names = new object[] { "" }, - propertyFilters = new List() + propertyFilters = new object[] { "" }, - statuses = new List() + statuses = new object[] { "" }, @@ -952,7 +896,7 @@ RequestContent content = RequestContent.Create(new skipToken = "", parentType = "Field", type = "", - parentIds = new List() + parentIds = new object[] { "" }, @@ -960,13 +904,13 @@ RequestContent content = RequestContent.Create(new maxArea = 123.45, intersectsWithGeometry = new { - coordinates = new List() + coordinates = new object[] { - new List() + new object[] { - new List() + new object[] { - new List() + new object[] { 123.45 } @@ -979,23 +923,23 @@ RequestContent content = RequestContent.Create(new foreach (BinaryData item in client.SearchByPartyId("", content)) { 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()); + 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()); } ]]> 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 f405096a52fbd..7f234356eb526 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 @@ -101,7 +101,7 @@ CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiV RequestContent content = RequestContent.Create(new { - cropIds = new List() + cropIds = new object[] { "" }, @@ -113,7 +113,7 @@ RequestContent content = RequestContent.Create(new unit = "", value = 123.45, }, - treatments = new List() + treatments = new object[] { "" }, @@ -169,7 +169,7 @@ CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiV RequestContent content = RequestContent.Create(new { - cropIds = new List() + cropIds = new object[] { "" }, @@ -181,7 +181,7 @@ RequestContent content = RequestContent.Create(new unit = "", value = 123.45, }, - treatments = new List() + treatments = new object[] { "" }, @@ -225,6 +225,7 @@ TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -233,6 +234,7 @@ TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> @@ -244,6 +246,7 @@ TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -252,6 +255,7 @@ TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> @@ -265,7 +269,7 @@ CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiV 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetCropProductsAsync with all parameters and parse the result. @@ -273,51 +277,27 @@ This sample shows how to call GetCropProductsAsync with all parameters and parse TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetCropProductsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -331,7 +311,7 @@ CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiV 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetCropProducts with all parameters and parse the result. @@ -339,51 +319,27 @@ This sample shows how to call GetCropProducts with all parameters and parse the TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetCropProducts(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 7f52b2513e625..29b689d34d825 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 @@ -201,6 +201,7 @@ TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -209,6 +210,7 @@ TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> @@ -220,6 +222,7 @@ TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -228,6 +231,7 @@ TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> @@ -241,7 +245,7 @@ Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022- 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetCropsAsync with all parameters and parse the result. @@ -249,42 +253,24 @@ This sample shows how to call GetCropsAsync with all parameters and parse the re TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetCropsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -298,7 +284,7 @@ Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022- 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetCrops with all parameters and parse the result. @@ -306,42 +292,24 @@ This sample shows how to call GetCrops with all parameters and parse the result. TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetCrops(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 e2cd8f8e4bd5b..42535acbd03b4 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 @@ -24,7 +24,7 @@ RequestContent content = RequestContent.Create(new type = "", manufacturer = "", productCode = "", - ports = new List() + ports = new object[] { new { @@ -84,7 +84,7 @@ RequestContent content = RequestContent.Create(new type = "", manufacturer = "", productCode = "", - ports = new List() + ports = new object[] { new { @@ -205,6 +205,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -213,6 +214,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -224,6 +226,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -232,6 +235,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -245,7 +249,7 @@ DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsCli 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetDeviceDataModelsAsync with all parameters and parse the result. @@ -253,37 +257,25 @@ This sample shows how to call GetDeviceDataModelsAsync with all parameters and p TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetDeviceDataModelsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -297,7 +289,7 @@ DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsCli 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetDeviceDataModels with all parameters and parse the result. @@ -305,37 +297,25 @@ This sample shows how to call GetDeviceDataModels with all parameters and parse TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetDeviceDataModels("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 9b84cc1719244..94e193290ae1a 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 @@ -217,6 +217,7 @@ TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -225,6 +226,7 @@ TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -236,6 +238,7 @@ TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -244,6 +247,7 @@ TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -257,7 +261,7 @@ Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetDevicesAsync with all parameters and parse the result. @@ -265,46 +269,28 @@ This sample shows how to call GetDevicesAsync with all parameters and parse the TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetDevicesAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -318,7 +304,7 @@ Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetDevices with all parameters and parse the result. @@ -326,46 +312,28 @@ This sample shows how to call GetDevices with all parameters and parse the resul TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetDevices("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 deleted file mode 100644 index 54fab2140e5d3..0000000000000 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmBeatsClient.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ 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 2b252323865ff..3c4673b5b1882 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 @@ -117,7 +117,7 @@ RequestContent content = RequestContent.Create(new { partyId = "", authProviderId = "", - operations = new List() + operations = new object[] { "" }, @@ -185,7 +185,7 @@ RequestContent content = RequestContent.Create(new { partyId = "", authProviderId = "", - operations = new List() + operations = new object[] { "" }, 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 224389d1c8c10..b8a2bbc6d9bdc 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 @@ -155,8 +155,8 @@ FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensC 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[0].GetProperty("partyId").ToString()); - Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); + Console.WriteLine(result.GetProperty("partyId").ToString()); + Console.WriteLine(result.GetProperty("authProviderId").ToString()); } ]]> This sample shows how to call GetAuthenticatedFarmersDetailsAsync with all parameters and parse the result. @@ -164,21 +164,15 @@ This sample shows how to call GetAuthenticatedFarmersDetailsAsync with all param TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetAuthenticatedFarmersDetailsAsync(new string[] { "" }, new string[] { "" }, 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()); + 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()); } ]]> @@ -192,8 +186,8 @@ FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensC 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[0].GetProperty("partyId").ToString()); - Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); + Console.WriteLine(result.GetProperty("partyId").ToString()); + Console.WriteLine(result.GetProperty("authProviderId").ToString()); } ]]> This sample shows how to call GetAuthenticatedFarmersDetails with all parameters and parse the result. @@ -201,21 +195,15 @@ This sample shows how to call GetAuthenticatedFarmersDetails with all parameters TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetAuthenticatedFarmersDetails(new string[] { "" }, new string[] { "" }, 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()); + 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()); } ]]> 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 2032961445021..eb79a0c724266 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 @@ -241,6 +241,7 @@ TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -249,6 +250,7 @@ TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -260,6 +262,7 @@ TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -268,6 +271,7 @@ TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -281,7 +285,7 @@ Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022- 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetFarmsAsync with all parameters and parse the result. @@ -289,33 +293,21 @@ This sample shows how to call GetFarmsAsync with all parameters and parse the re TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetFarmsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -329,7 +321,7 @@ Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022- 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetFarms with all parameters and parse the result. @@ -337,33 +329,21 @@ This sample shows how to call GetFarms with all parameters and parse the result. TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetFarms(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -377,7 +357,7 @@ Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022- 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetFarmsByPartyIdAsync with all parameters and parse the result. @@ -385,33 +365,21 @@ This sample shows how to call GetFarmsByPartyIdAsync with all parameters and par TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetFarmsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -425,7 +393,7 @@ Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022- 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetFarmsByPartyId with all parameters and parse the result. @@ -433,33 +401,21 @@ This sample shows how to call GetFarmsByPartyId with all parameters and parse th TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetFarmsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 3e22eac1ae56b..cf870ef41363f 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 @@ -247,6 +247,7 @@ TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -255,6 +256,7 @@ TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -266,6 +268,7 @@ TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -274,6 +277,7 @@ TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -287,7 +291,7 @@ Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "202 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetFieldsAsync with all parameters and parse the result. @@ -295,37 +299,22 @@ This sample shows how to call GetFieldsAsync with all parameters and parse the r TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetFieldsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -339,7 +328,7 @@ Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "202 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetFields with all parameters and parse the result. @@ -347,37 +336,22 @@ This sample shows how to call GetFields with all parameters and parse the result TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetFields(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -391,7 +365,7 @@ Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "202 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetFieldsByPartyIdAsync with all parameters and parse the result. @@ -399,37 +373,22 @@ This sample shows how to call GetFieldsByPartyIdAsync with all parameters and pa TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetFieldsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -443,7 +402,7 @@ Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "202 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetFieldsByPartyId with all parameters and parse the result. @@ -451,37 +410,22 @@ This sample shows how to call GetFieldsByPartyId with all parameters and parse t TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetFieldsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 435d582379cc6..6711e73af7506 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 @@ -230,7 +230,7 @@ RequestContent content = RequestContent.Create(new unit = "", value = 123.45, }, - harvestProductDetails = new List() + harvestProductDetails = new object[] { new { @@ -324,7 +324,7 @@ RequestContent content = RequestContent.Create(new unit = "", value = 123.45, }, - harvestProductDetails = new List() + harvestProductDetails = new object[] { new { @@ -401,6 +401,7 @@ TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -409,6 +410,7 @@ TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -420,6 +422,7 @@ TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -428,6 +431,7 @@ TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -441,7 +445,7 @@ HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVer 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllHarvestDataAsync with all parameters and parse the result. @@ -449,71 +453,53 @@ This sample shows how to call GetAllHarvestDataAsync with all parameters and par TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); -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)) +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 string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -527,7 +513,7 @@ HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVer 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllHarvestData with all parameters and parse the result. @@ -535,71 +521,53 @@ This sample shows how to call GetAllHarvestData with all parameters and parse th TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); -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)) +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 string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -613,7 +581,7 @@ HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVer 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllHarvestDataByPartyIdAsync with all parameters and parse the result. @@ -621,71 +589,53 @@ This sample shows how to call GetAllHarvestDataByPartyIdAsync with all parameter TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); -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)) +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 string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -699,7 +649,7 @@ HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVer 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllHarvestDataByPartyId with all parameters and parse the result. @@ -707,71 +657,53 @@ This sample shows how to call GetAllHarvestDataByPartyId with all parameters and TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); -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)) +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 string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 4dceb2d72b3b8..65bd404842328 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 @@ -94,7 +94,7 @@ RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", - shapefileColumnNames = new List() + shapefileColumnNames = new object[] { "" }, @@ -116,7 +116,7 @@ RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", - shapefileColumnNames = new List() + shapefileColumnNames = new object[] { "" }, @@ -161,7 +161,7 @@ RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", - shapefileColumnNames = new List() + shapefileColumnNames = new object[] { "" }, @@ -183,7 +183,7 @@ RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", - shapefileColumnNames = new List() + shapefileColumnNames = new object[] { "" }, 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 5bb31bd034839..c7c3494c687ca 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 @@ -165,6 +165,7 @@ TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -173,6 +174,7 @@ TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); + Console.WriteLine(response.Status); ]]> @@ -184,6 +186,7 @@ TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -192,6 +195,7 @@ TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); + Console.WriteLine(response.Status); ]]> @@ -203,12 +207,11 @@ TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", "", "", "", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> This sample shows how to call DownloadAsync with all parameters and parse the result. @@ -217,12 +220,11 @@ TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", "", "", "", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> @@ -234,12 +236,11 @@ TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", "", "", "", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> This sample shows how to call Download with all parameters and parse the result. @@ -248,12 +249,11 @@ TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", "", "", "", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> @@ -267,7 +267,7 @@ InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachment 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[0].GetProperty("insightId").ToString()); + Console.WriteLine(result.GetProperty("insightId").ToString()); } ]]> This sample shows how to call GetInsightAttachmentsByPartyIdModelIdAndResourceAsync with all parameters and parse the result. @@ -275,40 +275,25 @@ This sample shows how to call GetInsightAttachmentsByPartyIdModelIdAndResourceAs TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync("", "", "", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -322,7 +307,7 @@ InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachment 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[0].GetProperty("insightId").ToString()); + Console.WriteLine(result.GetProperty("insightId").ToString()); } ]]> This sample shows how to call GetInsightAttachmentsByPartyIdModelIdAndResource with all parameters and parse the result. @@ -330,40 +315,25 @@ This sample shows how to call GetInsightAttachmentsByPartyIdModelIdAndResource w TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetInsightAttachmentsByPartyIdModelIdAndResource("", "", "", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 02c993e8c8d76..b5b48deaae88a 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 @@ -293,6 +293,7 @@ TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -301,6 +302,7 @@ TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); + Console.WriteLine(response.Status); ]]> @@ -312,6 +314,7 @@ TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -320,6 +323,7 @@ TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); + Console.WriteLine(response.Status); ]]> @@ -333,7 +337,7 @@ Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetInsightsByPartyIdModelIdAndResourceAsync with all parameters and parse the result. @@ -341,44 +345,29 @@ This sample shows how to call GetInsightsByPartyIdModelIdAndResourceAsync with a TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); -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)) +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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -392,7 +381,7 @@ Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetInsightsByPartyIdModelIdAndResource with all parameters and parse the result. @@ -400,44 +389,29 @@ This sample shows how to call GetInsightsByPartyIdModelIdAndResource with all pa TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); -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)) +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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 b72c14f47b601..9cefb85938202 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 @@ -265,6 +265,7 @@ TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -273,6 +274,7 @@ TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -284,6 +286,7 @@ TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -292,6 +295,7 @@ TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -305,7 +309,7 @@ ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClien 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetManagementZonesAsync with all parameters and parse the result. @@ -313,52 +317,25 @@ This sample shows how to call GetManagementZonesAsync with all parameters and pa TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetManagementZonesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -372,7 +349,7 @@ ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClien 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetManagementZones with all parameters and parse the result. @@ -380,52 +357,25 @@ This sample shows how to call GetManagementZones with all parameters and parse t TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetManagementZones(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -439,7 +389,7 @@ ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClien 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetManagementZonesByPartyIdAsync with all parameters and parse the result. @@ -447,52 +397,25 @@ This sample shows how to call GetManagementZonesByPartyIdAsync with all paramete TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetManagementZonesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -506,7 +429,7 @@ ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClien 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetManagementZonesByPartyId with all parameters and parse the result. @@ -514,52 +437,25 @@ This sample shows how to call GetManagementZonesByPartyId with all parameters an TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetManagementZonesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 afdd480ee1ce6..17abd87ece40b 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 @@ -119,7 +119,7 @@ RequestContent content = RequestContent.Create(new referenceValueHigh = 123.45, classification = "", recommendation = "", - products = new List() + products = new object[] { new { @@ -193,7 +193,7 @@ RequestContent content = RequestContent.Create(new referenceValueHigh = 123.45, classification = "", recommendation = "", - products = new List() + products = new object[] { new { @@ -247,6 +247,7 @@ TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -255,6 +256,7 @@ TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -266,6 +268,7 @@ TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -274,6 +277,7 @@ TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -287,7 +291,7 @@ NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesCli 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetNutrientAnalysesAsync with all parameters and parse the result. @@ -295,50 +299,32 @@ This sample shows how to call GetNutrientAnalysesAsync with all parameters and p TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetNutrientAnalysesAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -352,7 +338,7 @@ NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesCli 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetNutrientAnalyses with all parameters and parse the result. @@ -360,50 +346,32 @@ This sample shows how to call GetNutrientAnalyses with all parameters and parse TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetNutrientAnalyses("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -417,7 +385,7 @@ NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesCli 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetNutrientAnalysesByPartyIdAsync with all parameters and parse the result. @@ -425,50 +393,32 @@ This sample shows how to call GetNutrientAnalysesByPartyIdAsync with all paramet TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetNutrientAnalysesByPartyIdAsync("", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -482,7 +432,7 @@ NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesCli 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetNutrientAnalysesByPartyId with all parameters and parse the result. @@ -490,50 +440,32 @@ This sample shows how to call GetNutrientAnalysesByPartyId with all parameters a TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetNutrientAnalysesByPartyId("", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 882c62d2a9a05..357c7f12c82db 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 @@ -177,6 +177,7 @@ TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -185,6 +186,7 @@ TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> @@ -196,6 +198,7 @@ TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -204,6 +207,7 @@ TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> @@ -291,7 +295,7 @@ OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient( 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetOAuthProvidersAsync with all parameters and parse the result. @@ -299,34 +303,22 @@ This sample shows how to call GetOAuthProvidersAsync with all parameters and par TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetOAuthProvidersAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -340,7 +332,7 @@ OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient( 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetOAuthProviders with all parameters and parse the result. @@ -348,34 +340,22 @@ This sample shows how to call GetOAuthProviders with all parameters and parse th TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetOAuthProviders(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 b68f422729c55..40f88dedde654 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 @@ -165,6 +165,7 @@ TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -173,6 +174,7 @@ TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> @@ -184,6 +186,7 @@ TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -192,6 +195,7 @@ TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> @@ -277,7 +281,7 @@ Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPartiesAsync with all parameters and parse the result. @@ -285,32 +289,20 @@ This sample shows how to call GetPartiesAsync with all parameters and parse the TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetPartiesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -324,7 +316,7 @@ Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetParties with all parameters and parse the result. @@ -332,32 +324,20 @@ This sample shows how to call GetParties with all parameters and parse the resul TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetParties(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 f93703a18912c..87bcdb2686a56 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 @@ -281,6 +281,7 @@ TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -289,6 +290,7 @@ TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -300,6 +302,7 @@ TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -308,6 +311,7 @@ TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -393,7 +397,7 @@ PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnaly 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPlantTissueAnalysesByPartyIdAsync with all parameters and parse the result. @@ -401,63 +405,39 @@ This sample shows how to call GetPlantTissueAnalysesByPartyIdAsync with all para TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetPlantTissueAnalysesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -471,7 +451,7 @@ PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnaly 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPlantTissueAnalysesByPartyId with all parameters and parse the result. @@ -479,63 +459,39 @@ This sample shows how to call GetPlantTissueAnalysesByPartyId with all parameter TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetPlantTissueAnalysesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -549,7 +505,7 @@ PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnaly 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPlantTissueAnalysesAsync with all parameters and parse the result. @@ -557,63 +513,39 @@ This sample shows how to call GetPlantTissueAnalysesAsync with all parameters an TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetPlantTissueAnalysesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -627,7 +559,7 @@ PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnaly 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPlantTissueAnalyses with all parameters and parse the result. @@ -635,63 +567,39 @@ This sample shows how to call GetPlantTissueAnalyses with all parameters and par TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetPlantTissueAnalyses(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 f6e4ef9c64d36..65719fb4d5035 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 @@ -134,7 +134,7 @@ RequestContent content = RequestContent.Create(new unit = "", value = 123.45, }, - plantingProductDetails = new List() + plantingProductDetails = new object[] { new { @@ -216,7 +216,7 @@ RequestContent content = RequestContent.Create(new unit = "", value = 123.45, }, - plantingProductDetails = new List() + plantingProductDetails = new object[] { new { @@ -281,6 +281,7 @@ TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -289,6 +290,7 @@ TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -300,6 +302,7 @@ TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -308,6 +311,7 @@ TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -393,7 +397,7 @@ PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiV 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllPlantingDataByPartyIdAsync with all parameters and parse the result. @@ -401,59 +405,41 @@ This sample shows how to call GetAllPlantingDataByPartyIdAsync with all paramete TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetAllPlantingDataByPartyIdAsync("", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -467,7 +453,7 @@ PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiV 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllPlantingDataByPartyId with all parameters and parse the result. @@ -475,59 +461,41 @@ This sample shows how to call GetAllPlantingDataByPartyId with all parameters an TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetAllPlantingDataByPartyId("", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -541,7 +509,7 @@ PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiV 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllPlantingDataAsync with all parameters and parse the result. @@ -549,59 +517,41 @@ This sample shows how to call GetAllPlantingDataAsync with all parameters and pa TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetAllPlantingDataAsync(123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -615,7 +565,7 @@ PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiV 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllPlantingData with all parameters and parse the result. @@ -623,59 +573,41 @@ This sample shows how to call GetAllPlantingData with all parameters and parse t TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetAllPlantingData(123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 57f1c7dbc8bcb..a6a26180dde5e 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 @@ -193,6 +193,7 @@ TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -201,6 +202,7 @@ TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -212,6 +214,7 @@ TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -220,6 +223,7 @@ TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -305,7 +309,7 @@ PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsCli 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPrescriptionMapsByPartyIdAsync with all parameters and parse the result. @@ -313,52 +317,25 @@ This sample shows how to call GetPrescriptionMapsByPartyIdAsync with all paramet TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetPrescriptionMapsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -372,7 +349,7 @@ PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsCli 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPrescriptionMapsByPartyId with all parameters and parse the result. @@ -380,52 +357,25 @@ This sample shows how to call GetPrescriptionMapsByPartyId with all parameters a TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetPrescriptionMapsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -439,7 +389,7 @@ PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsCli 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPrescriptionMapsAsync with all parameters and parse the result. @@ -447,52 +397,25 @@ This sample shows how to call GetPrescriptionMapsAsync with all parameters and p TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetPrescriptionMapsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -506,7 +429,7 @@ PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsCli 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPrescriptionMaps with all parameters and parse the result. @@ -514,52 +437,25 @@ This sample shows how to call GetPrescriptionMaps with all parameters and parse TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetPrescriptionMaps(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 8b234578039b7..f07da898cbf6a 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 @@ -217,6 +217,7 @@ TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -225,6 +226,7 @@ TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -236,6 +238,7 @@ TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -244,6 +247,7 @@ TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -329,7 +333,7 @@ Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(ap 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPrescriptionsByPartyIdAsync with all parameters and parse the result. @@ -337,54 +341,27 @@ This sample shows how to call GetPrescriptionsByPartyIdAsync with all parameters TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetPrescriptionsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -398,7 +375,7 @@ Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(ap 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPrescriptionsByPartyId with all parameters and parse the result. @@ -406,54 +383,27 @@ This sample shows how to call GetPrescriptionsByPartyId with all parameters and TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetPrescriptionsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -467,7 +417,7 @@ Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(ap 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPrescriptionsAsync with all parameters and parse the result. @@ -475,54 +425,27 @@ This sample shows how to call GetPrescriptionsAsync with all parameters and pars TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetPrescriptionsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -536,7 +459,7 @@ Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(ap 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetPrescriptions with all parameters and parse the result. @@ -544,54 +467,27 @@ This sample shows how to call GetPrescriptions with all parameters and parse the TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetPrescriptions(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 bfc6cf7d40481..22e95c0ca6576 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 @@ -9,12 +9,11 @@ TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> This sample shows how to call DownloadAsync with all parameters and parse the result. @@ -23,12 +22,11 @@ TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> @@ -40,12 +38,11 @@ TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> This sample shows how to call Download with all parameters and parse the result. @@ -54,12 +51,11 @@ TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> @@ -195,13 +191,13 @@ RequestContent content = RequestContent.Create(new endDateTime = "2022-05-10T18:57:31.2311892Z", intersects = new { - coordinates = new List() + coordinates = new object[] { - new List() + new object[] { - new List() + new object[] { - new List() + new object[] { 123.45 } @@ -210,11 +206,11 @@ RequestContent content = RequestContent.Create(new }, type = "MultiPolygon", }, - bbox = new List() + bbox = new object[] { 123.45 }, - featureIds = new List() + featureIds = new object[] { "" }, @@ -276,13 +272,13 @@ RequestContent content = RequestContent.Create(new endDateTime = "2022-05-10T18:57:31.2311892Z", intersects = new { - coordinates = new List() + coordinates = new object[] { - new List() + new object[] { - new List() + new object[] { - new List() + new object[] { 123.45 } @@ -291,11 +287,11 @@ RequestContent content = RequestContent.Create(new }, type = "MultiPolygon", }, - bbox = new List() + bbox = new object[] { 123.45 }, - featureIds = new List() + featureIds = new object[] { "" }, @@ -423,7 +419,7 @@ Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "202 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetScenesAsync with all parameters and parse the result. @@ -431,33 +427,24 @@ This sample shows how to call GetScenesAsync with all parameters and parse the r TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -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)) +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 string[] { "" }, new double[] { 123.45 }, new string[] { "" }, 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()); + 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()); } ]]> @@ -471,7 +458,7 @@ Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "202 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetScenes with all parameters and parse the result. @@ -479,33 +466,24 @@ This sample shows how to call GetScenes with all parameters and parse the result TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -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)) +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 string[] { "" }, new double[] { 123.45 }, new string[] { "" }, 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()); + 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()); } ]]> @@ -549,15 +527,15 @@ RequestContent content = RequestContent.Create(new source = "Sentinel_2_L2A", data = new { - imageNames = new List() + imageNames = new object[] { "" }, - imageFormats = new List() + imageFormats = new object[] { "" }, - imageResolutions = new List() + imageResolutions = new object[] { 123.45 }, @@ -638,15 +616,15 @@ RequestContent content = RequestContent.Create(new source = "Sentinel_2_L2A", data = new { - imageNames = new List() + imageNames = new object[] { "" }, - imageFormats = new List() + imageFormats = new object[] { "" }, - imageResolutions = new List() + imageResolutions = new object[] { 123.45 }, 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 fb469726b10bb..725ac9278c0bd 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 @@ -102,7 +102,7 @@ RequestContent content = RequestContent.Create(new farmId = "", fieldId = "", seasonId = "", - cropProductIds = new List() + cropProductIds = new object[] { "" }, @@ -161,7 +161,7 @@ RequestContent content = RequestContent.Create(new farmId = "", fieldId = "", seasonId = "", - cropProductIds = new List() + cropProductIds = new object[] { "" }, @@ -205,6 +205,7 @@ TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -213,6 +214,7 @@ TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -224,6 +226,7 @@ TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -232,6 +235,7 @@ TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -317,7 +321,7 @@ SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient( 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSeasonalFieldsByPartyIdAsync with all parameters and parse the result. @@ -325,53 +329,26 @@ This sample shows how to call GetSeasonalFieldsByPartyIdAsync with all parameter TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetSeasonalFieldsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -385,7 +362,7 @@ SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient( 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSeasonalFieldsByPartyId with all parameters and parse the result. @@ -393,53 +370,26 @@ This sample shows how to call GetSeasonalFieldsByPartyId with all parameters and TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetSeasonalFieldsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -453,7 +403,7 @@ SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient( 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSeasonalFieldsAsync with all parameters and parse the result. @@ -461,53 +411,26 @@ This sample shows how to call GetSeasonalFieldsAsync with all parameters and par TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetSeasonalFieldsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -521,7 +444,7 @@ SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient( 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSeasonalFields with all parameters and parse the result. @@ -529,53 +452,26 @@ This sample shows how to call GetSeasonalFields with all parameters and parse th TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetSeasonalFields(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 f22453b5cb2b3..a0cea5d81019c 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 @@ -189,6 +189,7 @@ TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -197,6 +198,7 @@ TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> @@ -208,6 +210,7 @@ TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -216,6 +219,7 @@ TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> @@ -229,7 +233,7 @@ Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSeasonsAsync with all parameters and parse the result. @@ -237,39 +241,24 @@ This sample shows how to call GetSeasonsAsync with all parameters and parse the TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); -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)) +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 int[] { 1234 }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -283,7 +272,7 @@ Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSeasons with all parameters and parse the result. @@ -291,39 +280,24 @@ This sample shows how to call GetSeasons with all parameters and parse the resul TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); -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)) +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 int[] { 1234 }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 0d655c75259c2..351536e7d3eea 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 @@ -247,6 +247,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -255,6 +256,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -266,6 +268,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -274,6 +277,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -287,7 +291,7 @@ SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsCli 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[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } ]]> This sample shows how to call GetSensorDataModelsAsync with all parameters and parse the result. @@ -295,40 +299,28 @@ This sample shows how to call GetSensorDataModelsAsync with all parameters and p TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetSensorDataModelsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -342,7 +334,7 @@ SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsCli 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[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } ]]> This sample shows how to call GetSensorDataModels with all parameters and parse the result. @@ -350,40 +342,28 @@ This sample shows how to call GetSensorDataModels with all parameters and parse TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetSensorDataModels("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 e5f28bf57f81f..7830bb86224a1 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 @@ -183,6 +183,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -191,6 +192,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> @@ -202,6 +204,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -210,6 +213,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> @@ -223,7 +227,7 @@ SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient( 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSensorMappingsAsync with all parameters and parse the result. @@ -231,47 +235,23 @@ This sample shows how to call GetSensorMappingsAsync with all parameters and par TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetSensorMappingsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -285,7 +265,7 @@ SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient( 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSensorMappings with all parameters and parse the result. @@ -293,47 +273,23 @@ This sample shows how to call GetSensorMappings with all parameters and parse th TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetSensorMappings(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 8397b3cdcb8e7..8e6614e4e9f15 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 @@ -173,6 +173,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -181,6 +182,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -192,6 +194,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -200,6 +203,7 @@ TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -311,7 +315,7 @@ SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPart 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSensorPartnerIntegrationsAsync with all parameters and parse the result. @@ -319,40 +323,22 @@ This sample shows how to call GetSensorPartnerIntegrationsAsync with all paramet TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetSensorPartnerIntegrationsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -366,7 +352,7 @@ SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPart 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSensorPartnerIntegrations with all parameters and parse the result. @@ -374,40 +360,22 @@ This sample shows how to call GetSensorPartnerIntegrations with all parameters a TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetSensorPartnerIntegrations("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 322dbb87f608d..9ee0068152eb3 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 @@ -36,7 +36,7 @@ RequestContent content = RequestContent.Create(new name = "", type = "", }, - depthInMeters = new List() + depthInMeters = new object[] { 123.45 }, @@ -109,7 +109,7 @@ RequestContent content = RequestContent.Create(new name = "", type = "", }, - depthInMeters = new List() + depthInMeters = new object[] { 123.45 }, @@ -241,6 +241,7 @@ TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -249,6 +250,7 @@ TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -260,6 +262,7 @@ TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -268,6 +271,7 @@ TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -393,7 +397,7 @@ Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSensorsAsync with all parameters and parse the result. @@ -401,51 +405,30 @@ This sample shows how to call GetSensorsAsync with all parameters and parse the TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetSensorsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -459,7 +442,7 @@ Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetSensors with all parameters and parse the result. @@ -467,51 +450,30 @@ This sample shows how to call GetSensors with all parameters and parse the resul TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetSensors("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 7532ff603ae9f..0338fdc1ff7a8 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 @@ -231,6 +231,7 @@ TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -239,6 +240,7 @@ TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -250,6 +252,7 @@ TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -258,6 +261,7 @@ TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -343,7 +347,7 @@ TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVer 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllTillageDataByPartyIdAsync with all parameters and parse the result. @@ -351,50 +355,32 @@ This sample shows how to call GetAllTillageDataByPartyIdAsync with all parameter TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetAllTillageDataByPartyIdAsync("", 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -408,7 +394,7 @@ TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVer 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllTillageDataByPartyId with all parameters and parse the result. @@ -416,50 +402,32 @@ This sample shows how to call GetAllTillageDataByPartyId with all parameters and TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetAllTillageDataByPartyId("", 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -473,7 +441,7 @@ TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVer 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllTillageDataAsync with all parameters and parse the result. @@ -481,50 +449,32 @@ This sample shows how to call GetAllTillageDataAsync with all parameters and par TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetAllTillageDataAsync(123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -538,7 +488,7 @@ TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVer 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllTillageData with all parameters and parse the result. @@ -546,50 +496,32 @@ This sample shows how to call GetAllTillageData with all parameters and parse th TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetAllTillageData(123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 eb02a90b6a853..ca0a56eb356e0 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 @@ -195,15 +195,15 @@ Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2 await foreach (BinaryData item in client.GetWeathersAsync("", "", "", "", "", null, null, null, null, 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("extensionVersion").ToString()); - Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); - Console.WriteLine(result[0].GetProperty("granularity").ToString()); + 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()); } ]]> This sample shows how to call GetWeathersAsync with all parameters and parse the result. @@ -214,51 +214,51 @@ Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2 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[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()); + 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()); } ]]> @@ -272,15 +272,15 @@ Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2 foreach (BinaryData item in client.GetWeathers("", "", "", "", "", null, null, null, null, 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("extensionVersion").ToString()); - Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); - Console.WriteLine(result[0].GetProperty("granularity").ToString()); + 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()); } ]]> This sample shows how to call GetWeathers with all parameters and parse the result. @@ -291,51 +291,51 @@ Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2 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[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()); + 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()); } ]]> 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 76f2adb84abde..99569d2900e2b 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 @@ -31,7 +31,7 @@ WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVer RequestContent content = RequestContent.Create(new { - locations = new List() + locations = new object[] { new { @@ -149,7 +149,7 @@ WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVer RequestContent content = RequestContent.Create(new { - locations = new List() + locations = new object[] { new { 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 3b7deca002bd6..aa4988c3c99ec 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 @@ -181,6 +181,7 @@ TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteAsync with all parameters. @@ -189,6 +190,7 @@ TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -200,6 +202,7 @@ TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call Delete with all parameters. @@ -208,6 +211,7 @@ TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); ]]> @@ -293,7 +297,7 @@ Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022- 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetZonesByPartyIdAsync with all parameters and parse the result. @@ -301,44 +305,23 @@ This sample shows how to call GetZonesByPartyIdAsync with all parameters and par TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetZonesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -352,7 +335,7 @@ Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022- 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetZonesByPartyId with all parameters and parse the result. @@ -360,44 +343,23 @@ This sample shows how to call GetZonesByPartyId with all parameters and parse th TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetZonesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -411,7 +373,7 @@ Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022- 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetZonesAsync with all parameters and parse the result. @@ -419,44 +381,23 @@ This sample shows how to call GetZonesAsync with all parameters and parse the re TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); -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)) +await foreach (BinaryData item in client.GetZonesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> @@ -470,7 +411,7 @@ Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022- 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[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetZones with all parameters and parse the result. @@ -478,44 +419,23 @@ This sample shows how to call GetZones with all parameters and parse the result. TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); -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)) +foreach (BinaryData item in client.GetZones(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } ]]> 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 0e58ead9a17bf..bf4e57c5a25d2 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_ApplicationData + public partial class Samples_ApplicationData { [Test] [Ignore("Only validating compilation of examples")] @@ -242,8 +241,8 @@ public void Example_CreateOrUpdate_AllParameters() RequestContent content = RequestContent.Create(new { - applicationProductDetails = new List() -{ + applicationProductDetails = new object[] + { new { productName = "", @@ -254,7 +253,7 @@ public void Example_CreateOrUpdate_AllParameters() value = 123.45, }, } -}, + }, operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", operationStartDateTime = "2022-05-10T18:57:31.2311892Z", operationEndDateTime = "2022-05-10T18:57:31.2311892Z", @@ -311,8 +310,8 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() RequestContent content = RequestContent.Create(new { - applicationProductDetails = new List() -{ + applicationProductDetails = new object[] + { new { productName = "", @@ -323,7 +322,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() value = 123.45, }, } -}, + }, operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", operationStartDateTime = "2022-05-10T18:57:31.2311892Z", operationEndDateTime = "2022-05-10T18:57:31.2311892Z", @@ -379,6 +378,7 @@ public void Example_Delete_ShortVersion() ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -390,6 +390,7 @@ public async Task Example_Delete_ShortVersion_Async() ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -401,6 +402,7 @@ public void Example_Delete_AllParameters() ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -412,6 +414,7 @@ public async Task Example_Delete_AllParameters_Async() ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -425,7 +428,7 @@ public void Example_GetAllApplicationData_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -439,7 +442,7 @@ public async Task Example_GetAllApplicationData_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -450,56 +453,38 @@ public void Example_GetAllApplicationData_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetAllApplicationData(123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -510,56 +495,38 @@ public async Task Example_GetAllApplicationData_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetAllApplicationDataAsync(123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -573,7 +540,7 @@ public void Example_GetAllApplicationDataByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -587,7 +554,7 @@ public async Task Example_GetAllApplicationDataByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -598,56 +565,38 @@ public void Example_GetAllApplicationDataByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetAllApplicationDataByPartyId("", 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -658,56 +607,38 @@ public async Task Example_GetAllApplicationDataByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetAllApplicationDataByPartyIdAsync("", 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 edc70cc8762e1..27024d75031bf 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.IO; using System.Text.Json; using System.Threading.Tasks; @@ -18,7 +17,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Attachments + public partial class Samples_Attachments { [Test] [Ignore("Only validating compilation of examples")] @@ -188,6 +187,7 @@ public void Example_Delete_ShortVersion() Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -199,6 +199,7 @@ public async Task Example_Delete_ShortVersion_Async() Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -210,6 +211,7 @@ public void Example_Delete_AllParameters() Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -221,6 +223,7 @@ public async Task Example_Delete_AllParameters_Async() Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -232,12 +235,11 @@ public void Example_Download_ShortVersion() Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -249,12 +251,11 @@ public async Task Example_Download_ShortVersion_Async() Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -266,12 +267,11 @@ public void Example_Download_AllParameters() Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -283,12 +283,11 @@ public async Task Example_Download_AllParameters_Async() Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -302,7 +301,7 @@ public void Example_GetAttachmentsByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -316,7 +315,7 @@ public async Task Example_GetAttachmentsByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -327,41 +326,23 @@ public void Example_GetAttachmentsByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetAttachmentsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -372,41 +353,23 @@ public async Task Example_GetAttachmentsByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 511da98e8ecf1..34dacaaf25735 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Boundaries + public partial class Samples_Boundaries { [Test] [Ignore("Only validating compilation of examples")] @@ -136,19 +135,19 @@ public void Example_CreateOrUpdate_AllParameters() { geometry = new { - coordinates = new List() -{ -new List() + coordinates = new object[] + { +new object[] { -new List() +new object[] { -new List() +new object[] { 123.45 } } } -}, + }, type = "MultiPolygon", }, type = "", @@ -205,19 +204,19 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() { geometry = new { - coordinates = new List() -{ -new List() + coordinates = new object[] + { +new object[] { -new List() +new object[] { -new List() +new object[] { 123.45 } } } -}, + }, type = "MultiPolygon", }, type = "", @@ -363,6 +362,7 @@ public void Example_Delete_ShortVersion() Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -374,6 +374,7 @@ public async Task Example_Delete_ShortVersion_Async() Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -385,6 +386,7 @@ public void Example_Delete_AllParameters() Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -396,6 +398,7 @@ public async Task Example_Delete_AllParameters_Async() Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -465,7 +468,7 @@ public void Example_GetBoundaries_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -479,7 +482,7 @@ public async Task Example_GetBoundaries_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -490,41 +493,26 @@ public void Example_GetBoundaries_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetBoundaries("", "", new string[] { "" }, 123.45, 123.45, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -535,41 +523,26 @@ public async Task Example_GetBoundaries_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetBoundariesAsync("", "", new string[] { "" }, 123.45, 123.45, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -584,7 +557,7 @@ public void Example_Search_ShortVersion() foreach (BinaryData item in client.Search(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -599,7 +572,7 @@ public async Task Example_Search_ShortVersion_Async() await foreach (BinaryData item in client.SearchAsync(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -612,22 +585,22 @@ public void Example_Search_AllParameters() RequestContent content = RequestContent.Create(new { - ids = new List() -{ + ids = new object[] + { "" -}, - names = new List() -{ + }, + names = new object[] + { "" -}, - propertyFilters = new List() -{ + }, + propertyFilters = new object[] + { "" -}, - statuses = new List() -{ + }, + statuses = new object[] + { "" -}, + }, minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", @@ -636,50 +609,50 @@ public void Example_Search_AllParameters() skipToken = "", parentType = "Field", type = "", - parentIds = new List() -{ + parentIds = new object[] + { "" -}, + }, minArea = 123.45, maxArea = 123.45, intersectsWithGeometry = new { - coordinates = new List() -{ -new List() + coordinates = new object[] + { +new object[] { -new List() +new object[] { -new List() +new object[] { 123.45 } } } -}, + }, type = "MultiPolygon", }, }); foreach (BinaryData item in client.Search(content)) { 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()); + 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()); } } @@ -692,22 +665,22 @@ public async Task Example_Search_AllParameters_Async() RequestContent content = RequestContent.Create(new { - ids = new List() -{ + ids = new object[] + { "" -}, - names = new List() -{ + }, + names = new object[] + { "" -}, - propertyFilters = new List() -{ + }, + propertyFilters = new object[] + { "" -}, - statuses = new List() -{ + }, + statuses = new object[] + { "" -}, + }, minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", @@ -716,50 +689,50 @@ public async Task Example_Search_AllParameters_Async() skipToken = "", parentType = "Field", type = "", - parentIds = new List() -{ + parentIds = new object[] + { "" -}, + }, minArea = 123.45, maxArea = 123.45, intersectsWithGeometry = new { - coordinates = new List() -{ -new List() + coordinates = new object[] + { +new object[] { -new List() +new object[] { -new List() +new object[] { 123.45 } } } -}, + }, type = "MultiPolygon", }, }); await foreach (BinaryData item in client.SearchAsync(content)) { 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()); + 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()); } } @@ -773,7 +746,7 @@ public void Example_GetBoundariesByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -787,7 +760,7 @@ public async Task Example_GetBoundariesByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -798,41 +771,26 @@ public void Example_GetBoundariesByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetBoundariesByPartyId("", "", "", new string[] { "" }, 123.45, 123.45, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -843,41 +801,26 @@ public async Task Example_GetBoundariesByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetBoundariesByPartyIdAsync("", "", "", new string[] { "" }, 123.45, 123.45, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -892,7 +835,7 @@ public void Example_SearchByPartyId_ShortVersion() foreach (BinaryData item in client.SearchByPartyId("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -907,7 +850,7 @@ public async Task Example_SearchByPartyId_ShortVersion_Async() await foreach (BinaryData item in client.SearchByPartyIdAsync("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -920,22 +863,22 @@ public void Example_SearchByPartyId_AllParameters() RequestContent content = RequestContent.Create(new { - ids = new List() -{ + ids = new object[] + { "" -}, - names = new List() -{ + }, + names = new object[] + { "" -}, - propertyFilters = new List() -{ + }, + propertyFilters = new object[] + { "" -}, - statuses = new List() -{ + }, + statuses = new object[] + { "" -}, + }, minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", @@ -944,50 +887,50 @@ public void Example_SearchByPartyId_AllParameters() skipToken = "", parentType = "Field", type = "", - parentIds = new List() -{ + parentIds = new object[] + { "" -}, + }, minArea = 123.45, maxArea = 123.45, intersectsWithGeometry = new { - coordinates = new List() -{ -new List() + coordinates = new object[] + { +new object[] { -new List() +new object[] { -new List() +new object[] { 123.45 } } } -}, + }, type = "MultiPolygon", }, }); foreach (BinaryData item in client.SearchByPartyId("", content)) { 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()); + 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()); } } @@ -1000,22 +943,22 @@ public async Task Example_SearchByPartyId_AllParameters_Async() RequestContent content = RequestContent.Create(new { - ids = new List() -{ + ids = new object[] + { "" -}, - names = new List() -{ + }, + names = new object[] + { "" -}, - propertyFilters = new List() -{ + }, + propertyFilters = new object[] + { "" -}, - statuses = new List() -{ + }, + statuses = new object[] + { "" -}, + }, minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", @@ -1024,50 +967,50 @@ public async Task Example_SearchByPartyId_AllParameters_Async() skipToken = "", parentType = "Field", type = "", - parentIds = new List() -{ + parentIds = new object[] + { "" -}, + }, minArea = 123.45, maxArea = 123.45, intersectsWithGeometry = new { - coordinates = new List() -{ -new List() + coordinates = new object[] + { +new object[] { -new List() +new object[] { -new List() +new object[] { 123.45 } } } -}, + }, type = "MultiPolygon", }, }); await foreach (BinaryData item in client.SearchByPartyIdAsync("", content)) { 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()); + 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()); } } 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 037066a619021..05578dd60eafd 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_CropProducts + public partial class Samples_CropProducts { [Test] [Ignore("Only validating compilation of examples")] @@ -142,10 +141,10 @@ public void Example_CreateOrUpdate_AllParameters() RequestContent content = RequestContent.Create(new { - cropIds = new List() -{ + cropIds = new object[] + { "" -}, + }, brand = "", product = "", trait = "", @@ -154,10 +153,10 @@ public void Example_CreateOrUpdate_AllParameters() unit = "", value = 123.45, }, - treatments = new List() -{ + treatments = new object[] + { "" -}, + }, status = "", source = "", name = "", @@ -199,10 +198,10 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() RequestContent content = RequestContent.Create(new { - cropIds = new List() -{ + cropIds = new object[] + { "" -}, + }, brand = "", product = "", trait = "", @@ -211,10 +210,10 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() unit = "", value = 123.45, }, - treatments = new List() -{ + treatments = new object[] + { "" -}, + }, status = "", source = "", name = "", @@ -255,6 +254,7 @@ public void Example_Delete_ShortVersion() CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -266,6 +266,7 @@ public async Task Example_Delete_ShortVersion_Async() CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -277,6 +278,7 @@ public void Example_Delete_AllParameters() CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -288,6 +290,7 @@ public async Task Example_Delete_AllParameters_Async() CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -301,7 +304,7 @@ public void Example_GetCropProducts_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -315,7 +318,7 @@ public async Task Example_GetCropProducts_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -326,51 +329,27 @@ public void Example_GetCropProducts_AllParameters() TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetCropProducts(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -381,51 +360,27 @@ public async Task Example_GetCropProducts_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetCropProductsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 31e05ca085a95..f5ce9395d9b96 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Crops + public partial class Samples_Crops { [Test] [Ignore("Only validating compilation of examples")] @@ -231,6 +230,7 @@ public void Example_Delete_ShortVersion() Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -242,6 +242,7 @@ public async Task Example_Delete_ShortVersion_Async() Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -253,6 +254,7 @@ public void Example_Delete_AllParameters() Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -264,6 +266,7 @@ public async Task Example_Delete_AllParameters_Async() Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -277,7 +280,7 @@ public void Example_GetCrops_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -291,7 +294,7 @@ public async Task Example_GetCrops_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -302,42 +305,24 @@ public void Example_GetCrops_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetCrops(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -348,42 +333,24 @@ public async Task Example_GetCrops_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetCropsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 5c6b85fe1a594..bbcd16c571f41 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_DeviceDataModels + public partial class Samples_DeviceDataModels { [Test] [Ignore("Only validating compilation of examples")] @@ -59,14 +58,14 @@ public void Example_CreateOrUpdate_AllParameters() type = "", manufacturer = "", productCode = "", - ports = new List() -{ + ports = new object[] + { new { name = "", type = "", } -}, + }, status = "", name = "", description = "", @@ -108,14 +107,14 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() type = "", manufacturer = "", productCode = "", - ports = new List() -{ + ports = new object[] + { new { name = "", type = "", } -}, + }, status = "", name = "", description = "", @@ -235,6 +234,7 @@ public void Example_Delete_ShortVersion() DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -246,6 +246,7 @@ public async Task Example_Delete_ShortVersion_Async() DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -257,6 +258,7 @@ public void Example_Delete_AllParameters() DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -268,6 +270,7 @@ public async Task Example_Delete_AllParameters_Async() DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -281,7 +284,7 @@ public void Example_GetDeviceDataModels_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -295,7 +298,7 @@ public async Task Example_GetDeviceDataModels_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -306,37 +309,25 @@ public void Example_GetDeviceDataModels_AllParameters() TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetDeviceDataModels("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -347,37 +338,25 @@ public async Task Example_GetDeviceDataModels_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetDeviceDataModelsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 1796f69e1c358..1d0eb049daa31 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Devices + public partial class Samples_Devices { [Test] [Ignore("Only validating compilation of examples")] @@ -247,6 +246,7 @@ public void Example_Delete_ShortVersion() Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -258,6 +258,7 @@ public async Task Example_Delete_ShortVersion_Async() Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -269,6 +270,7 @@ public void Example_Delete_AllParameters() Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -280,6 +282,7 @@ public async Task Example_Delete_AllParameters_Async() Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -293,7 +296,7 @@ public void Example_GetDevices_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -307,7 +310,7 @@ public async Task Example_GetDevices_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -318,46 +321,28 @@ public void Example_GetDevices_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetDevices("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -368,46 +353,28 @@ public async Task Example_GetDevices_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetDevicesAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 01107a44a97dc..9a968bf4d7db7 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_FarmOperationsDataIngestion + public partial class Samples_FarmOperationsDataIngestion { [Test] [Ignore("Only validating compilation of examples")] @@ -166,10 +165,10 @@ public void Example_CreateJob_AllParameters() { partyId = "", authProviderId = "", - operations = new List() -{ + operations = new object[] + { "" -}, + }, startYear = 1234, isIncremental = true, name = "", @@ -215,10 +214,10 @@ public async Task Example_CreateJob_AllParameters_Async() { partyId = "", authProviderId = "", - operations = new List() -{ + operations = new object[] + { "" -}, + }, startYear = 1234, isIncremental = true, name = "", 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 b4e53675ec526..a18b2b1f5a50e 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_FarmerOAuthTokens + public partial class Samples_FarmerOAuthTokens { [Test] [Ignore("Only validating compilation of examples")] @@ -185,8 +184,8 @@ public void Example_GetAuthenticatedFarmersDetails_ShortVersion() 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[0].GetProperty("partyId").ToString()); - Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); + Console.WriteLine(result.GetProperty("partyId").ToString()); + Console.WriteLine(result.GetProperty("authProviderId").ToString()); } } @@ -200,8 +199,8 @@ public async Task Example_GetAuthenticatedFarmersDetails_ShortVersion_Async() 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[0].GetProperty("partyId").ToString()); - Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); + Console.WriteLine(result.GetProperty("partyId").ToString()); + Console.WriteLine(result.GetProperty("authProviderId").ToString()); } } @@ -212,21 +211,15 @@ public void Example_GetAuthenticatedFarmersDetails_AllParameters() TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetAuthenticatedFarmersDetails(new string[] { "" }, new string[] { "" }, 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()); + 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()); } } @@ -237,21 +230,15 @@ public async Task Example_GetAuthenticatedFarmersDetails_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetAuthenticatedFarmersDetailsAsync(new string[] { "" }, new string[] { "" }, 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()); + 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()); } } 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 36679050360ed..532fb05d9eaa4 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Farms + public partial class Samples_Farms { [Test] [Ignore("Only validating compilation of examples")] @@ -277,6 +276,7 @@ public void Example_Delete_ShortVersion() Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -288,6 +288,7 @@ public async Task Example_Delete_ShortVersion_Async() Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -299,6 +300,7 @@ public void Example_Delete_AllParameters() Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -310,6 +312,7 @@ public async Task Example_Delete_AllParameters_Async() Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -323,7 +326,7 @@ public void Example_GetFarms_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -337,7 +340,7 @@ public async Task Example_GetFarms_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -348,33 +351,21 @@ public void Example_GetFarms_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetFarms(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -385,33 +376,21 @@ public async Task Example_GetFarms_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetFarmsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -425,7 +404,7 @@ public void Example_GetFarmsByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -439,7 +418,7 @@ public async Task Example_GetFarmsByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -450,33 +429,21 @@ public void Example_GetFarmsByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetFarmsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -487,33 +454,21 @@ public async Task Example_GetFarmsByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetFarmsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 a890fda8e106e..03f4562ea522b 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Fields + public partial class Samples_Fields { [Test] [Ignore("Only validating compilation of examples")] @@ -283,6 +282,7 @@ public void Example_Delete_ShortVersion() Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -294,6 +294,7 @@ public async Task Example_Delete_ShortVersion_Async() Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -305,6 +306,7 @@ public void Example_Delete_AllParameters() Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -316,6 +318,7 @@ public async Task Example_Delete_AllParameters_Async() Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -329,7 +332,7 @@ public void Example_GetFields_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -343,7 +346,7 @@ public async Task Example_GetFields_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -354,37 +357,22 @@ public void Example_GetFields_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetFields(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -395,37 +383,22 @@ public async Task Example_GetFields_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetFieldsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -439,7 +412,7 @@ public void Example_GetFieldsByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -453,7 +426,7 @@ public async Task Example_GetFieldsByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -464,37 +437,22 @@ public void Example_GetFieldsByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetFieldsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -505,37 +463,22 @@ public async Task Example_GetFieldsByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetFieldsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 75de66d17211d..468598d350e26 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_HarvestData + public partial class Samples_HarvestData { [Test] [Ignore("Only validating compilation of examples")] @@ -277,13 +276,13 @@ public void Example_CreateOrUpdate_AllParameters() unit = "", value = 123.45, }, - harvestProductDetails = new List() -{ + harvestProductDetails = new object[] + { new { productName = "", } -}, + }, operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", operationStartDateTime = "2022-05-10T18:57:31.2311892Z", operationEndDateTime = "2022-05-10T18:57:31.2311892Z", @@ -360,13 +359,13 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() unit = "", value = 123.45, }, - harvestProductDetails = new List() -{ + harvestProductDetails = new object[] + { new { productName = "", } -}, + }, operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", operationStartDateTime = "2022-05-10T18:57:31.2311892Z", operationEndDateTime = "2022-05-10T18:57:31.2311892Z", @@ -437,6 +436,7 @@ public void Example_Delete_ShortVersion() HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -448,6 +448,7 @@ public async Task Example_Delete_ShortVersion_Async() HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -459,6 +460,7 @@ public void Example_Delete_AllParameters() HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -470,6 +472,7 @@ public async Task Example_Delete_AllParameters_Async() HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -483,7 +486,7 @@ public void Example_GetAllHarvestData_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -497,7 +500,7 @@ public async Task Example_GetAllHarvestData_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -508,71 +511,53 @@ public void Example_GetAllHarvestData_AllParameters() TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - 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)) + 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 string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -583,71 +568,53 @@ public async Task Example_GetAllHarvestData_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - 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)) + 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 string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -661,7 +628,7 @@ public void Example_GetAllHarvestDataByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -675,7 +642,7 @@ public async Task Example_GetAllHarvestDataByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -686,71 +653,53 @@ public void Example_GetAllHarvestDataByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - 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)) + 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 string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -761,71 +710,53 @@ public async Task Example_GetAllHarvestDataByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - 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)) + 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 string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 de1b7d51659e6..f06bf1dd3fa2b 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_ImageProcessing + public partial class Samples_ImageProcessing { [Test] [Ignore("Only validating compilation of examples")] @@ -118,10 +117,10 @@ public void Example_CreateRasterizeJob_ShortVersion() { partyId = "", shapefileAttachmentId = "", - shapefileColumnNames = new List() -{ + shapefileColumnNames = new object[] + { "" -}, + }, }); Operation operation = client.CreateRasterizeJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -143,10 +142,10 @@ public async Task Example_CreateRasterizeJob_ShortVersion_Async() { partyId = "", shapefileAttachmentId = "", - shapefileColumnNames = new List() -{ + shapefileColumnNames = new object[] + { "" -}, + }, }); Operation operation = await client.CreateRasterizeJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -168,10 +167,10 @@ public void Example_CreateRasterizeJob_AllParameters() { partyId = "", shapefileAttachmentId = "", - shapefileColumnNames = new List() -{ + shapefileColumnNames = new object[] + { "" -}, + }, name = "", description = "", properties = new @@ -213,10 +212,10 @@ public async Task Example_CreateRasterizeJob_AllParameters_Async() { partyId = "", shapefileAttachmentId = "", - shapefileColumnNames = new List() -{ + shapefileColumnNames = new object[] + { "" -}, + }, name = "", description = "", properties = new 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 07dfd87bf495c..fda6f5806776f 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.IO; using System.Text.Json; using System.Threading.Tasks; @@ -18,7 +17,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_InsightAttachments + public partial class Samples_InsightAttachments { [Test] [Ignore("Only validating compilation of examples")] @@ -196,6 +195,7 @@ public void Example_Delete_ShortVersion() InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); + Console.WriteLine(response.Status); } @@ -207,6 +207,7 @@ public async Task Example_Delete_ShortVersion_Async() InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); + Console.WriteLine(response.Status); } @@ -218,6 +219,7 @@ public void Example_Delete_AllParameters() InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); + Console.WriteLine(response.Status); } @@ -229,6 +231,7 @@ public async Task Example_Delete_AllParameters_Async() InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); + Console.WriteLine(response.Status); } @@ -240,12 +243,11 @@ public void Example_Download_ShortVersion() InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", "", "", "", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -257,12 +259,11 @@ public async Task Example_Download_ShortVersion_Async() InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", "", "", "", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -274,12 +275,11 @@ public void Example_Download_AllParameters() InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", "", "", "", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -291,12 +291,11 @@ public async Task Example_Download_AllParameters_Async() InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", "", "", "", "", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -310,7 +309,7 @@ public void Example_GetInsightAttachmentsByPartyIdModelIdAndResource_ShortVersio 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[0].GetProperty("insightId").ToString()); + Console.WriteLine(result.GetProperty("insightId").ToString()); } } @@ -324,7 +323,7 @@ public async Task Example_GetInsightAttachmentsByPartyIdModelIdAndResource_Short 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[0].GetProperty("insightId").ToString()); + Console.WriteLine(result.GetProperty("insightId").ToString()); } } @@ -335,40 +334,25 @@ public void Example_GetInsightAttachmentsByPartyIdModelIdAndResource_AllParamete TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetInsightAttachmentsByPartyIdModelIdAndResource("", "", "", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -379,40 +363,25 @@ public async Task Example_GetInsightAttachmentsByPartyIdModelIdAndResource_AllPa TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync("", "", "", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 dadc9f49489d5..f54d4e2186984 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Insights + public partial class Samples_Insights { [Test] [Ignore("Only validating compilation of examples")] @@ -329,6 +328,7 @@ public void Example_Delete_ShortVersion() Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); + Console.WriteLine(response.Status); } @@ -340,6 +340,7 @@ public async Task Example_Delete_ShortVersion_Async() Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); + Console.WriteLine(response.Status); } @@ -351,6 +352,7 @@ public void Example_Delete_AllParameters() Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); + Console.WriteLine(response.Status); } @@ -362,6 +364,7 @@ public async Task Example_Delete_AllParameters_Async() Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); + Console.WriteLine(response.Status); } @@ -375,7 +378,7 @@ public void Example_GetInsightsByPartyIdModelIdAndResource_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -389,7 +392,7 @@ public async Task Example_GetInsightsByPartyIdModelIdAndResource_ShortVersion_As 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -400,44 +403,29 @@ public void Example_GetInsightsByPartyIdModelIdAndResource_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - 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)) + 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -448,44 +436,29 @@ public async Task Example_GetInsightsByPartyIdModelIdAndResource_AllParameters_A TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - 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)) + 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 2cec7184ceb52..49b408b1c4141 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_ManagementZones + public partial class Samples_ManagementZones { [Test] [Ignore("Only validating compilation of examples")] @@ -301,6 +300,7 @@ public void Example_Delete_ShortVersion() ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -312,6 +312,7 @@ public async Task Example_Delete_ShortVersion_Async() ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -323,6 +324,7 @@ public void Example_Delete_AllParameters() ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -334,6 +336,7 @@ public async Task Example_Delete_AllParameters_Async() ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -347,7 +350,7 @@ public void Example_GetManagementZones_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -361,7 +364,7 @@ public async Task Example_GetManagementZones_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -372,52 +375,25 @@ public void Example_GetManagementZones_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetManagementZones(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -428,52 +404,25 @@ public async Task Example_GetManagementZones_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetManagementZonesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -487,7 +436,7 @@ public void Example_GetManagementZonesByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -501,7 +450,7 @@ public async Task Example_GetManagementZonesByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -512,52 +461,25 @@ public void Example_GetManagementZonesByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetManagementZonesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -568,52 +490,25 @@ public async Task Example_GetManagementZonesByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetManagementZonesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 dc696aab6e3d0..dc74725066981 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 @@ -16,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_ModelInference + public partial class Samples_ModelInference { [Test] [Ignore("Only validating compilation of examples")] 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 f6ee155c3360e..34aa42159900c 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_NutrientAnalyses + public partial class Samples_NutrientAnalyses { [Test] [Ignore("Only validating compilation of examples")] @@ -160,15 +159,15 @@ public void Example_CreateOrUpdate_AllParameters() referenceValueHigh = 123.45, classification = "", recommendation = "", - products = new List() -{ + products = new object[] + { new { rate = "", instruction = "", product = "", } -}, + }, status = "", source = "", name = "", @@ -223,15 +222,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() referenceValueHigh = 123.45, classification = "", recommendation = "", - products = new List() -{ + products = new object[] + { new { rate = "", instruction = "", product = "", } -}, + }, status = "", source = "", name = "", @@ -277,6 +276,7 @@ public void Example_Delete_ShortVersion() NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -288,6 +288,7 @@ public async Task Example_Delete_ShortVersion_Async() NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -299,6 +300,7 @@ public void Example_Delete_AllParameters() NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -310,6 +312,7 @@ public async Task Example_Delete_AllParameters_Async() NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -323,7 +326,7 @@ public void Example_GetNutrientAnalyses_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -337,7 +340,7 @@ public async Task Example_GetNutrientAnalyses_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -348,50 +351,32 @@ public void Example_GetNutrientAnalyses_AllParameters() TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetNutrientAnalyses("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -402,50 +387,32 @@ public async Task Example_GetNutrientAnalyses_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetNutrientAnalysesAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -459,7 +426,7 @@ public void Example_GetNutrientAnalysesByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -473,7 +440,7 @@ public async Task Example_GetNutrientAnalysesByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -484,50 +451,32 @@ public void Example_GetNutrientAnalysesByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetNutrientAnalysesByPartyId("", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -538,50 +487,32 @@ public async Task Example_GetNutrientAnalysesByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetNutrientAnalysesByPartyIdAsync("", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 593caf61babb0..b48d0ac40f343 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_OAuthProviders + public partial class Samples_OAuthProviders { [Test] [Ignore("Only validating compilation of examples")] @@ -207,6 +206,7 @@ public void Example_Delete_ShortVersion() OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -218,6 +218,7 @@ public async Task Example_Delete_ShortVersion_Async() OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -229,6 +230,7 @@ public void Example_Delete_AllParameters() OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -240,6 +242,7 @@ public async Task Example_Delete_AllParameters_Async() OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -333,7 +336,7 @@ public void Example_GetOAuthProviders_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -347,7 +350,7 @@ public async Task Example_GetOAuthProviders_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -358,34 +361,22 @@ public void Example_GetOAuthProviders_AllParameters() TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetOAuthProviders(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -396,34 +387,22 @@ public async Task Example_GetOAuthProviders_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetOAuthProvidersAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 9b522df135a14..3066325189a1f 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Parties + public partial class Samples_Parties { [Test] [Ignore("Only validating compilation of examples")] @@ -195,6 +194,7 @@ public void Example_Delete_ShortVersion() Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -206,6 +206,7 @@ public async Task Example_Delete_ShortVersion_Async() Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -217,6 +218,7 @@ public void Example_Delete_AllParameters() Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -228,6 +230,7 @@ public async Task Example_Delete_AllParameters_Async() Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -319,7 +322,7 @@ public void Example_GetParties_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -333,7 +336,7 @@ public async Task Example_GetParties_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -344,32 +347,20 @@ public void Example_GetParties_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetParties(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -380,32 +371,20 @@ public async Task Example_GetParties_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetPartiesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 3216f4614aa05..ef9f45f6b70c9 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_PlantTissueAnalyses + public partial class Samples_PlantTissueAnalyses { [Test] [Ignore("Only validating compilation of examples")] @@ -311,6 +310,7 @@ public void Example_Delete_ShortVersion() PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -322,6 +322,7 @@ public async Task Example_Delete_ShortVersion_Async() PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -333,6 +334,7 @@ public void Example_Delete_AllParameters() PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -344,6 +346,7 @@ public async Task Example_Delete_AllParameters_Async() PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -435,7 +438,7 @@ public void Example_GetPlantTissueAnalysesByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -449,7 +452,7 @@ public async Task Example_GetPlantTissueAnalysesByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -460,63 +463,39 @@ public void Example_GetPlantTissueAnalysesByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetPlantTissueAnalysesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -527,63 +506,39 @@ public async Task Example_GetPlantTissueAnalysesByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetPlantTissueAnalysesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -597,7 +552,7 @@ public void Example_GetPlantTissueAnalyses_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -611,7 +566,7 @@ public async Task Example_GetPlantTissueAnalyses_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -622,63 +577,39 @@ public void Example_GetPlantTissueAnalyses_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetPlantTissueAnalyses(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -689,63 +620,39 @@ public async Task Example_GetPlantTissueAnalyses_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetPlantTissueAnalysesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 e72fcbd2caaff..c24fceb3b81b1 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_PlantingData + public partial class Samples_PlantingData { [Test] [Ignore("Only validating compilation of examples")] @@ -175,13 +174,13 @@ public void Example_CreateOrUpdate_AllParameters() unit = "", value = 123.45, }, - plantingProductDetails = new List() -{ + plantingProductDetails = new object[] + { new { productName = "", } -}, + }, operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", operationStartDateTime = "2022-05-10T18:57:31.2311892Z", operationEndDateTime = "2022-05-10T18:57:31.2311892Z", @@ -246,13 +245,13 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() unit = "", value = 123.45, }, - plantingProductDetails = new List() -{ + plantingProductDetails = new object[] + { new { productName = "", } -}, + }, operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", operationStartDateTime = "2022-05-10T18:57:31.2311892Z", operationEndDateTime = "2022-05-10T18:57:31.2311892Z", @@ -311,6 +310,7 @@ public void Example_Delete_ShortVersion() PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -322,6 +322,7 @@ public async Task Example_Delete_ShortVersion_Async() PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -333,6 +334,7 @@ public void Example_Delete_AllParameters() PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -344,6 +346,7 @@ public async Task Example_Delete_AllParameters_Async() PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -435,7 +438,7 @@ public void Example_GetAllPlantingDataByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -449,7 +452,7 @@ public async Task Example_GetAllPlantingDataByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -460,59 +463,41 @@ public void Example_GetAllPlantingDataByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetAllPlantingDataByPartyId("", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -523,59 +508,41 @@ public async Task Example_GetAllPlantingDataByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetAllPlantingDataByPartyIdAsync("", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -589,7 +556,7 @@ public void Example_GetAllPlantingData_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -603,7 +570,7 @@ public async Task Example_GetAllPlantingData_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -614,59 +581,41 @@ public void Example_GetAllPlantingData_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetAllPlantingData(123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -677,59 +626,41 @@ public async Task Example_GetAllPlantingData_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetAllPlantingDataAsync(123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 bb072539bd014..b060949d5621a 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_PrescriptionMaps + public partial class Samples_PrescriptionMaps { [Test] [Ignore("Only validating compilation of examples")] @@ -223,6 +222,7 @@ public void Example_Delete_ShortVersion() PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -234,6 +234,7 @@ public async Task Example_Delete_ShortVersion_Async() PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -245,6 +246,7 @@ public void Example_Delete_AllParameters() PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -256,6 +258,7 @@ public async Task Example_Delete_AllParameters_Async() PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -347,7 +350,7 @@ public void Example_GetPrescriptionMapsByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -361,7 +364,7 @@ public async Task Example_GetPrescriptionMapsByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -372,52 +375,25 @@ public void Example_GetPrescriptionMapsByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetPrescriptionMapsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -428,52 +404,25 @@ public async Task Example_GetPrescriptionMapsByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetPrescriptionMapsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -487,7 +436,7 @@ public void Example_GetPrescriptionMaps_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -501,7 +450,7 @@ public async Task Example_GetPrescriptionMaps_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -512,52 +461,25 @@ public void Example_GetPrescriptionMaps_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetPrescriptionMaps(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -568,52 +490,25 @@ public async Task Example_GetPrescriptionMaps_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetPrescriptionMapsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 b78f90df13762..bee4ffa3ec849 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Prescriptions + public partial class Samples_Prescriptions { [Test] [Ignore("Only validating compilation of examples")] @@ -247,6 +246,7 @@ public void Example_Delete_ShortVersion() Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -258,6 +258,7 @@ public async Task Example_Delete_ShortVersion_Async() Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -269,6 +270,7 @@ public void Example_Delete_AllParameters() Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -280,6 +282,7 @@ public async Task Example_Delete_AllParameters_Async() Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -371,7 +374,7 @@ public void Example_GetPrescriptionsByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -385,7 +388,7 @@ public async Task Example_GetPrescriptionsByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -396,54 +399,27 @@ public void Example_GetPrescriptionsByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetPrescriptionsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -454,54 +430,27 @@ public async Task Example_GetPrescriptionsByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetPrescriptionsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -515,7 +464,7 @@ public void Example_GetPrescriptions_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -529,7 +478,7 @@ public async Task Example_GetPrescriptions_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -540,54 +489,27 @@ public void Example_GetPrescriptions_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetPrescriptions(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -598,54 +520,27 @@ public async Task Example_GetPrescriptions_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetPrescriptionsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 071e3a9536e94..c710153f0d310 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.IO; using System.Text.Json; using System.Threading.Tasks; @@ -18,7 +17,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Scenes + public partial class Samples_Scenes { [Test] [Ignore("Only validating compilation of examples")] @@ -28,12 +27,11 @@ public void Example_Download_ShortVersion() Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -45,12 +43,11 @@ public async Task Example_Download_ShortVersion_Async() Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -62,12 +59,11 @@ public void Example_Download_AllParameters() Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); Response response = client.Download("", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -79,12 +75,11 @@ public async Task Example_Download_AllParameters_Async() Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DownloadAsync("", null); + if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) - { - response.ContentStream.CopyTo(outFileStream); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -253,29 +248,29 @@ public void Example_SearchFeatures_AllParameters() endDateTime = "2022-05-10T18:57:31.2311892Z", intersects = new { - coordinates = new List() -{ -new List() + coordinates = new object[] + { +new object[] { -new List() +new object[] { -new List() +new object[] { 123.45 } } } -}, + }, type = "MultiPolygon", }, - bbox = new List() -{ + bbox = new object[] + { 123.45 -}, - featureIds = new List() -{ + }, + featureIds = new object[] + { "" -}, + }, }); Response response = client.SearchFeatures("Sentinel_2_L2A", content, maxpagesize: 1234, skip: 1234); @@ -313,29 +308,29 @@ public async Task Example_SearchFeatures_AllParameters_Async() endDateTime = "2022-05-10T18:57:31.2311892Z", intersects = new { - coordinates = new List() -{ -new List() + coordinates = new object[] + { +new object[] { -new List() +new object[] { -new List() +new object[] { 123.45 } } } -}, + }, type = "MultiPolygon", }, - bbox = new List() -{ + bbox = new object[] + { 123.45 -}, - featureIds = new List() -{ + }, + featureIds = new object[] + { "" -}, + }, }); Response response = await client.SearchFeaturesAsync("Sentinel_2_L2A", content, maxpagesize: 1234, skip: 1234); @@ -466,7 +461,7 @@ public void Example_GetScenes_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -480,7 +475,7 @@ public async Task Example_GetScenes_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -491,33 +486,24 @@ public void Example_GetScenes_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - 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)) + 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 string[] { "" }, new double[] { 123.45 }, new string[] { "" }, 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()); + 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()); } } @@ -528,33 +514,24 @@ public async Task Example_GetScenes_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - 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)) + 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 string[] { "" }, new double[] { 123.45 }, new string[] { "" }, 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()); + 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()); } } @@ -627,18 +604,18 @@ public void Example_CreateSatelliteDataIngestionJob_AllParameters() source = "Sentinel_2_L2A", data = new { - imageNames = new List() -{ + imageNames = new object[] + { "" -}, - imageFormats = new List() -{ + }, + imageFormats = new object[] + { "" -}, - imageResolutions = new List() -{ + }, + imageResolutions = new object[] + { 123.45 -}, + }, }, name = "", description = "", @@ -693,18 +670,18 @@ public async Task Example_CreateSatelliteDataIngestionJob_AllParameters_Async() source = "Sentinel_2_L2A", data = new { - imageNames = new List() -{ + imageNames = new object[] + { "" -}, - imageFormats = new List() -{ + }, + imageFormats = new object[] + { "" -}, - imageResolutions = new List() -{ + }, + imageResolutions = new object[] + { 123.45 -}, + }, }, name = "", description = "", 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 9aa52762238ae..0dd73284e9e84 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_SeasonalFields + public partial class Samples_SeasonalFields { [Test] [Ignore("Only validating compilation of examples")] @@ -143,10 +142,10 @@ public void Example_CreateOrUpdate_AllParameters() farmId = "", fieldId = "", seasonId = "", - cropProductIds = new List() -{ + cropProductIds = new object[] + { "" -}, + }, cropId = "", status = "", source = "", @@ -191,10 +190,10 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() farmId = "", fieldId = "", seasonId = "", - cropProductIds = new List() -{ + cropProductIds = new object[] + { "" -}, + }, cropId = "", status = "", source = "", @@ -235,6 +234,7 @@ public void Example_Delete_ShortVersion() SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -246,6 +246,7 @@ public async Task Example_Delete_ShortVersion_Async() SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -257,6 +258,7 @@ public void Example_Delete_AllParameters() SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -268,6 +270,7 @@ public async Task Example_Delete_AllParameters_Async() SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -359,7 +362,7 @@ public void Example_GetSeasonalFieldsByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -373,7 +376,7 @@ public async Task Example_GetSeasonalFieldsByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -384,53 +387,26 @@ public void Example_GetSeasonalFieldsByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetSeasonalFieldsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -441,53 +417,26 @@ public async Task Example_GetSeasonalFieldsByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetSeasonalFieldsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -501,7 +450,7 @@ public void Example_GetSeasonalFields_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -515,7 +464,7 @@ public async Task Example_GetSeasonalFields_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -526,53 +475,26 @@ public void Example_GetSeasonalFields_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetSeasonalFields(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -583,53 +505,26 @@ public async Task Example_GetSeasonalFields_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetSeasonalFieldsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 c272759e01819..17d4a53053ce8 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Seasons + public partial class Samples_Seasons { [Test] [Ignore("Only validating compilation of examples")] @@ -219,6 +218,7 @@ public void Example_Delete_ShortVersion() Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -230,6 +230,7 @@ public async Task Example_Delete_ShortVersion_Async() Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -241,6 +242,7 @@ public void Example_Delete_AllParameters() Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -252,6 +254,7 @@ public async Task Example_Delete_AllParameters_Async() Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -265,7 +268,7 @@ public void Example_GetSeasons_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -279,7 +282,7 @@ public async Task Example_GetSeasons_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -290,39 +293,24 @@ public void Example_GetSeasons_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - 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)) + 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 int[] { 1234 }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -333,39 +321,24 @@ public async Task Example_GetSeasons_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - 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)) + 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 int[] { 1234 }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 0fe318939eebb..bdfc0db03ae8e 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_SensorDataModels + public partial class Samples_SensorDataModels { [Test] [Ignore("Only validating compilation of examples")] @@ -277,6 +276,7 @@ public void Example_Delete_ShortVersion() SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -288,6 +288,7 @@ public async Task Example_Delete_ShortVersion_Async() SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -299,6 +300,7 @@ public void Example_Delete_AllParameters() SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -310,6 +312,7 @@ public async Task Example_Delete_AllParameters_Async() SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -323,7 +326,7 @@ public void Example_GetSensorDataModels_ShortVersion() 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[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } } @@ -337,7 +340,7 @@ public async Task Example_GetSensorDataModels_ShortVersion_Async() 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[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } } @@ -348,40 +351,28 @@ public void Example_GetSensorDataModels_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetSensorDataModels("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -392,40 +383,28 @@ public async Task Example_GetSensorDataModels_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetSensorDataModelsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 93c236de192d6..b1a5e3d0d4c91 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 @@ -16,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_SensorEvents + public partial class Samples_SensorEvents { [Test] [Ignore("Only validating compilation of examples")] 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 81e25112cc73f..42f16703b2eff 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_SensorMappings + public partial class Samples_SensorMappings { [Test] [Ignore("Only validating compilation of examples")] @@ -213,6 +212,7 @@ public void Example_Delete_ShortVersion() SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -224,6 +224,7 @@ public async Task Example_Delete_ShortVersion_Async() SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -235,6 +236,7 @@ public void Example_Delete_AllParameters() SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -246,6 +248,7 @@ public async Task Example_Delete_AllParameters_Async() SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -259,7 +262,7 @@ public void Example_GetSensorMappings_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -273,7 +276,7 @@ public async Task Example_GetSensorMappings_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -284,47 +287,23 @@ public void Example_GetSensorMappings_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetSensorMappings(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -335,47 +314,23 @@ public async Task Example_GetSensorMappings_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetSensorMappingsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 b69bca5b9c81f..aafb7ce75ec9a 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_SensorPartnerIntegrations + public partial class Samples_SensorPartnerIntegrations { [Test] [Ignore("Only validating compilation of examples")] @@ -203,6 +202,7 @@ public void Example_Delete_ShortVersion() SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -214,6 +214,7 @@ public async Task Example_Delete_ShortVersion_Async() SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -225,6 +226,7 @@ public void Example_Delete_AllParameters() SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -236,6 +238,7 @@ public async Task Example_Delete_AllParameters_Async() SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -359,7 +362,7 @@ public void Example_GetSensorPartnerIntegrations_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -373,7 +376,7 @@ public async Task Example_GetSensorPartnerIntegrations_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -384,40 +387,22 @@ public void Example_GetSensorPartnerIntegrations_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetSensorPartnerIntegrations("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -428,40 +413,22 @@ public async Task Example_GetSensorPartnerIntegrations_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetSensorPartnerIntegrationsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 c26c418d1cd08..f9af86ec927cb 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Sensors + public partial class Samples_Sensors { [Test] [Ignore("Only validating compilation of examples")] @@ -71,10 +70,10 @@ public void Example_CreateOrUpdate_AllParameters() name = "", type = "", }, - depthInMeters = new List() -{ + depthInMeters = new object[] + { 123.45 -}, + }, status = "", name = "", description = "", @@ -133,10 +132,10 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() name = "", type = "", }, - depthInMeters = new List() -{ + depthInMeters = new object[] + { 123.45 -}, + }, status = "", name = "", description = "", @@ -271,6 +270,7 @@ public void Example_Delete_ShortVersion() Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -282,6 +282,7 @@ public async Task Example_Delete_ShortVersion_Async() Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -293,6 +294,7 @@ public void Example_Delete_AllParameters() Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -304,6 +306,7 @@ public async Task Example_Delete_AllParameters_Async() Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -441,7 +444,7 @@ public void Example_GetSensors_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -455,7 +458,7 @@ public async Task Example_GetSensors_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -466,51 +469,30 @@ public void Example_GetSensors_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetSensors("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -521,51 +503,30 @@ public async Task Example_GetSensors_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetSensorsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } } 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 0234a1a7ee533..2e9c8a7acd73b 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 @@ -16,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_SolutionInference + public partial class Samples_SolutionInference { [Test] [Ignore("Only validating compilation of examples")] 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 fbf30d38f03b1..42cd1ddc22cfe 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_TillageData + public partial class Samples_TillageData { [Test] [Ignore("Only validating compilation of examples")] @@ -261,6 +260,7 @@ public void Example_Delete_ShortVersion() TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -272,6 +272,7 @@ public async Task Example_Delete_ShortVersion_Async() TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -283,6 +284,7 @@ public void Example_Delete_AllParameters() TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -294,6 +296,7 @@ public async Task Example_Delete_AllParameters_Async() TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -385,7 +388,7 @@ public void Example_GetAllTillageDataByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -399,7 +402,7 @@ public async Task Example_GetAllTillageDataByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -410,50 +413,32 @@ public void Example_GetAllTillageDataByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetAllTillageDataByPartyId("", 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -464,50 +449,32 @@ public async Task Example_GetAllTillageDataByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetAllTillageDataByPartyIdAsync("", 123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -521,7 +488,7 @@ public void Example_GetAllTillageData_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -535,7 +502,7 @@ public async Task Example_GetAllTillageData_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -546,50 +513,32 @@ public void Example_GetAllTillageData_AllParameters() TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetAllTillageData(123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -600,50 +549,32 @@ public async Task Example_GetAllTillageData_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetAllTillageDataAsync(123.45, 123.45, 123.45, 123.45, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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 string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 304e210d56e1b..2891802f005b7 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 @@ -16,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Weather + public partial class Samples_Weather { [Test] [Ignore("Only validating compilation of examples")] @@ -224,15 +224,15 @@ public void Example_GetWeathers_ShortVersion() foreach (BinaryData item in client.GetWeathers("", "", "", "", "", null, null, null, null, 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("extensionVersion").ToString()); - Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); - Console.WriteLine(result[0].GetProperty("granularity").ToString()); + 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()); } } @@ -246,15 +246,15 @@ public async Task Example_GetWeathers_ShortVersion_Async() await foreach (BinaryData item in client.GetWeathersAsync("", "", "", "", "", null, null, null, null, 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("extensionVersion").ToString()); - Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); - Console.WriteLine(result[0].GetProperty("granularity").ToString()); + 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()); } } @@ -268,51 +268,51 @@ public void Example_GetWeathers_AllParameters() 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[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()); + 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()); } } @@ -326,51 +326,51 @@ public async Task Example_GetWeathers_AllParameters_Async() 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[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()); + 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()); } } 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 4b35e3e62ee9e..b7866df91da05 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_WeatherData + public partial class Samples_WeatherData { [Test] [Ignore("Only validating compilation of examples")] @@ -76,14 +75,14 @@ public void Example_GetWeatherData_AllParameters() RequestContent content = RequestContent.Create(new { - locations = new List() -{ + locations = new object[] + { new { type = "LatLong", value = "", } -}, + }, providerAppId = "", providerApiKey = "", extensionId = "", @@ -173,14 +172,14 @@ public async Task Example_GetWeatherData_AllParameters_Async() RequestContent content = RequestContent.Create(new { - locations = new List() -{ + locations = new object[] + { new { type = "LatLong", value = "", } -}, + }, providerAppId = "", providerApiKey = "", extensionId = "", 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 358bfec84d914..33fceb606c2c4 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Verticals.AgriFood.Farming.Samples { - internal class Samples_Zones + public partial class Samples_Zones { [Test] [Ignore("Only validating compilation of examples")] @@ -211,6 +210,7 @@ public void Example_Delete_ShortVersion() Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -222,6 +222,7 @@ public async Task Example_Delete_ShortVersion_Async() Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -233,6 +234,7 @@ public void Example_Delete_AllParameters() Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); + Console.WriteLine(response.Status); } @@ -244,6 +246,7 @@ public async Task Example_Delete_AllParameters_Async() Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); + Console.WriteLine(response.Status); } @@ -335,7 +338,7 @@ public void Example_GetZonesByPartyId_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -349,7 +352,7 @@ public async Task Example_GetZonesByPartyId_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -360,44 +363,23 @@ public void Example_GetZonesByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetZonesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -408,44 +390,23 @@ public async Task Example_GetZonesByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetZonesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -459,7 +420,7 @@ public void Example_GetZones_ShortVersion() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -473,7 +434,7 @@ public async Task Example_GetZones_ShortVersion_Async() 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[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -484,44 +445,23 @@ public void Example_GetZones_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - 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)) + foreach (BinaryData item in client.GetZones(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } @@ -532,44 +472,23 @@ public async Task Example_GetZones_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - 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)) + await foreach (BinaryData item in client.GetZonesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 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()); + 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()); } } 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 169cba4031980..b1714c02ff61b 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml @@ -11,7 +11,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -38,7 +38,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -77,7 +77,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -104,7 +104,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -141,7 +141,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { new TimeSeriesPoint(123.45F) }); @@ -153,7 +153,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { new TimeSeriesPoint(123.45F) { @@ -180,7 +180,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { new TimeSeriesPoint(123.45F) }); @@ -192,7 +192,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { new TimeSeriesPoint(123.45F) { @@ -221,7 +221,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -241,6 +241,18 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] +{ + new TimeSeriesPoint(123.45F) +}); +Response response = await client.DetectUnivariateLastPointAsync(options); +]]> This sample shows how to call DetectUnivariateLastPointAsync with all request content and parse the result. "); @@ -249,7 +261,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -277,6 +289,30 @@ 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 DetectUnivariateLastPointAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] +{ + 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 = await client.DetectUnivariateLastPointAsync(options); ]]> @@ -289,7 +325,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -309,6 +345,18 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] +{ + new TimeSeriesPoint(123.45F) +}); +Response response = client.DetectUnivariateLastPoint(options); +]]> This sample shows how to call DetectUnivariateLastPoint with all request content and parse the result. "); @@ -317,7 +365,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -345,6 +393,30 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] +{ + 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); ]]> @@ -355,7 +427,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] { new TimeSeriesPoint(123.45F) }, TimeGranularity.Yearly); @@ -367,7 +439,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] { new TimeSeriesPoint(123.45F) { @@ -391,7 +463,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] { new TimeSeriesPoint(123.45F) }, TimeGranularity.Yearly); @@ -403,7 +475,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] { new TimeSeriesPoint(123.45F) { @@ -429,7 +501,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -443,6 +515,18 @@ Response response = await client.DetectUnivariateChangePointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> +This sample shows how to call DetectUnivariateChangePointAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] +{ + new TimeSeriesPoint(123.45F) +}, TimeGranularity.Yearly); +Response response = await client.DetectUnivariateChangePointAsync(options); +]]> This sample shows how to call DetectUnivariateChangePointAsync with all request content and parse the result. "); @@ -451,7 +535,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -471,6 +555,27 @@ 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 DetectUnivariateChangePointAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] +{ + 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 = await client.DetectUnivariateChangePointAsync(options); ]]> @@ -483,7 +588,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -497,6 +602,18 @@ Response response = client.DetectUnivariateChangePoint(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> +This sample shows how to call DetectUnivariateChangePoint. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] +{ + new TimeSeriesPoint(123.45F) +}, TimeGranularity.Yearly); +Response response = client.DetectUnivariateChangePoint(options); +]]> This sample shows how to call DetectUnivariateChangePoint with all request content and parse the result. "); @@ -505,7 +622,7 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - series = new List() + series = new object[] { new { @@ -525,6 +642,27 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] +{ + 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); ]]> @@ -583,6 +721,14 @@ 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 GetMultivariateBatchDetectionResultAsync. +"); +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 GetMultivariateBatchDetectionResultAsync with all parameters and parse the result. "); @@ -614,6 +760,14 @@ 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 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")); ]]> @@ -634,6 +788,14 @@ 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 GetMultivariateBatchDetectionResult. +"); +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 GetMultivariateBatchDetectionResult with all parameters and parse the result. "); @@ -665,6 +827,14 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); ]]> @@ -689,7 +859,7 @@ ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOf DataSchema = DataSchema.OneTable, DisplayName = "", SlidingWindow = 1234, - AlignPolicy = new AlignPolicy() + AlignPolicy = new AlignPolicy { AlignMode = AlignMode.Inner, FillNAMethod = FillNAMethod.Previous, @@ -721,7 +891,7 @@ ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOf DataSchema = DataSchema.OneTable, DisplayName = "", SlidingWindow = 1234, - AlignPolicy = new AlignPolicy() + AlignPolicy = new AlignPolicy { AlignMode = AlignMode.Inner, FillNAMethod = FillNAMethod.Previous, @@ -752,6 +922,15 @@ 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. +"); +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 = await client.TrainMultivariateModelAsync(modelInfo); +]]> This sample shows how to call TrainMultivariateModelAsync with all request content and parse the result. "); @@ -800,6 +979,26 @@ 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 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 = "", + SlidingWindow = 1234, + AlignPolicy = new AlignPolicy + { + AlignMode = AlignMode.Inner, + FillNAMethod = FillNAMethod.Previous, + PaddingValue = 123.45F, + }, +}; +Response response = await client.TrainMultivariateModelAsync(modelInfo); ]]> @@ -823,6 +1022,15 @@ 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. +"); +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 request content and parse the result. "); @@ -871,6 +1079,26 @@ 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 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 = "", + SlidingWindow = 1234, + AlignPolicy = new AlignPolicy + { + AlignMode = AlignMode.Inner, + FillNAMethod = FillNAMethod.Previous, + PaddingValue = 123.45F, + }, +}; +Response response = client.TrainMultivariateModel(modelInfo); ]]> @@ -882,6 +1110,7 @@ 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. @@ -891,6 +1120,7 @@ AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = await client.DeleteMultivariateModelAsync(""); + Console.WriteLine(response.Status); ]]> @@ -903,6 +1133,7 @@ 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. @@ -912,6 +1143,7 @@ AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = client.DeleteMultivariateModel(""); + Console.WriteLine(response.Status); ]]> @@ -968,6 +1200,14 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = await client.GetMultivariateModelAsync(""); +]]> This sample shows how to call GetMultivariateModelAsync with all parameters and parse the result. "); @@ -1001,6 +1241,14 @@ 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 GetMultivariateModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = await client.GetMultivariateModelAsync(""); ]]> @@ -1018,6 +1266,14 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = client.GetMultivariateModel(""); +]]> This sample shows how to call GetMultivariateModel with all parameters and parse the result. "); @@ -1051,6 +1307,14 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = client.GetMultivariateModel(""); ]]> @@ -1125,6 +1389,15 @@ 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. +"); +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")); +Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); +]]> This sample shows how to call DetectMultivariateBatchAnomalyAsync with all parameters and request content and parse the result. "); @@ -1163,6 +1436,18 @@ 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 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, +}; +Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); ]]> @@ -1189,6 +1474,15 @@ 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. +"); +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")); +Response response = client.DetectMultivariateBatchAnomaly("", options); +]]> This sample shows how to call DetectMultivariateBatchAnomaly with all parameters and request content and parse the result. "); @@ -1227,6 +1521,18 @@ 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 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, +}; +Response response = client.DetectMultivariateBatchAnomaly("", options); ]]> @@ -1237,15 +1543,9 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] { - new VariableValues("",new List() - { - "" - },new List() - { - 123.45F - }) + new VariableValues("", new string[]{""}, new float[]{123.45F}) }); Response response = await client.DetectMultivariateLastAnomalyAsync("", options); ]]> @@ -1255,15 +1555,9 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] { - new VariableValues("",new List() - { - "" - },new List() - { - 123.45F - }) + new VariableValues("", new string[]{""}, new float[]{123.45F}) }) { TopContributorCount = 1234, @@ -1279,15 +1573,9 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] { - new VariableValues("",new List() - { - "" - },new List() - { - 123.45F - }) + new VariableValues("", new string[]{""}, new float[]{123.45F}) }); Response response = client.DetectMultivariateLastAnomaly("", options); ]]> @@ -1297,15 +1585,9 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] { - new VariableValues("",new List() - { - "" - },new List() - { - 123.45F - }) + new VariableValues("", new string[]{""}, new float[]{123.45F}) }) { TopContributorCount = 1234, @@ -1323,16 +1605,16 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - variables = new List() + variables = new object[] { new { variable = "", - timestamps = new List() + timestamps = new object[] { "" }, - values = new List() + values = new object[] { 123.45F }, @@ -1344,6 +1626,18 @@ Response response = await client.DetectMultivariateLastAnomalyAsync("", JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> +This sample shows how to call DetectMultivariateLastAnomalyAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] +{ + new VariableValues("", new string[]{""}, new float[]{123.45F}) +}); +Response response = await client.DetectMultivariateLastAnomalyAsync("", options); +]]> This sample shows how to call DetectMultivariateLastAnomalyAsync with all parameters and request content and parse the result. "); @@ -1352,16 +1646,16 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - variables = new List() + variables = new object[] { new { variable = "", - timestamps = new List() + timestamps = new object[] { "" }, - values = new List() + values = new object[] { 123.45F }, @@ -1386,6 +1680,21 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] +{ + new VariableValues("", new string[]{""}, new float[]{123.45F}) +}) +{ + TopContributorCount = 1234, +}; +Response response = await client.DetectMultivariateLastAnomalyAsync("", options); ]]> @@ -1398,16 +1707,16 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - variables = new List() + variables = new object[] { new { variable = "", - timestamps = new List() + timestamps = new object[] { "" }, - values = new List() + values = new object[] { 123.45F }, @@ -1419,6 +1728,18 @@ Response response = client.DetectMultivariateLastAnomaly("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> +This sample shows how to call DetectMultivariateLastAnomaly. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] +{ + new VariableValues("", new string[]{""}, new float[]{123.45F}) +}); +Response response = client.DetectMultivariateLastAnomaly("", options); +]]> This sample shows how to call DetectMultivariateLastAnomaly with all parameters and request content and parse the result. "); @@ -1427,16 +1748,16 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - variables = new List() + variables = new object[] { new { variable = "", - timestamps = new List() + timestamps = new object[] { "" }, - values = new List() + values = new object[] { 123.45F }, @@ -1461,6 +1782,21 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] +{ + new VariableValues("", new string[]{""}, new float[]{123.45F}) +}) +{ + TopContributorCount = 1234, +}; +Response response = client.DetectMultivariateLastAnomaly("", options); ]]> @@ -1520,9 +1856,19 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); await foreach (BinaryData item in client.GetMultivariateModelsAsync(null, null, 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.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); +} +]]> +This sample shows how to call GetMultivariateModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +await foreach (AnomalyDetectionModel item in client.GetMultivariateModelsAsync()) +{ } ]]> This sample shows how to call GetMultivariateModelsAsync with all parameters and parse the result. @@ -1534,30 +1880,40 @@ 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()); + 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()); +} +]]> +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)) +{ } ]]> @@ -1572,9 +1928,19 @@ AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); foreach (BinaryData item in client.GetMultivariateModels(null, null, 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.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); +} +]]> +This sample shows how to call GetMultivariateModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +foreach (AnomalyDetectionModel item in client.GetMultivariateModels()) +{ } ]]> This sample shows how to call GetMultivariateModels with all parameters and parse the result. @@ -1586,30 +1952,40 @@ 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()); + 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()); +} +]]> +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)) +{ } ]]> 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 69e6b95b53e62..7c10e3e12461c 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.AI.AnomalyDetector.Samples { - public class Samples_AnomalyDetectorClient + public partial class Samples_AnomalyDetectorClient { [Test] [Ignore("Only validating compilation of examples")] @@ -29,13 +28,13 @@ public void Example_DetectUnivariateEntireSeries_ShortVersion() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { value = 123.45F, } -}, + }, }); Response response = client.DetectUnivariateEntireSeries(content); @@ -59,13 +58,13 @@ public async Task Example_DetectUnivariateEntireSeries_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { value = 123.45F, } -}, + }, }); Response response = await client.DetectUnivariateEntireSeriesAsync(content); @@ -89,14 +88,14 @@ public void Example_DetectUnivariateEntireSeries_AllParameters() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { timestamp = "2022-05-10T14:57:31.2311892-04:00", value = 123.45F, } -}, + }, granularity = "yearly", customInterval = 1234, period = 1234, @@ -128,14 +127,14 @@ public async Task Example_DetectUnivariateEntireSeries_AllParameters_Async() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { timestamp = "2022-05-10T14:57:31.2311892-04:00", value = 123.45F, } -}, + }, granularity = "yearly", customInterval = 1234, period = 1234, @@ -167,13 +166,13 @@ public void Example_DetectUnivariateLastPoint_ShortVersion() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { value = 123.45F, } -}, + }, }); Response response = client.DetectUnivariateLastPoint(content); @@ -198,13 +197,13 @@ public async Task Example_DetectUnivariateLastPoint_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { value = 123.45F, } -}, + }, }); Response response = await client.DetectUnivariateLastPointAsync(content); @@ -227,10 +226,10 @@ public void Example_DetectUnivariateLastPoint_ShortVersion_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() -{ + UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] + { new TimeSeriesPoint(123.45F) -}); + }); Response response = client.DetectUnivariateLastPoint(options); } @@ -242,10 +241,10 @@ public async Task Example_DetectUnivariateLastPoint_ShortVersion_Convenience_Asy AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() -{ + UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] + { new TimeSeriesPoint(123.45F) -}); + }); Response response = await client.DetectUnivariateLastPointAsync(options); } @@ -259,14 +258,14 @@ public void Example_DetectUnivariateLastPoint_AllParameters() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { timestamp = "2022-05-10T14:57:31.2311892-04:00", value = 123.45F, } -}, + }, granularity = "yearly", customInterval = 1234, period = 1234, @@ -299,14 +298,14 @@ public async Task Example_DetectUnivariateLastPoint_AllParameters_Async() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { timestamp = "2022-05-10T14:57:31.2311892-04:00", value = 123.45F, } -}, + }, granularity = "yearly", customInterval = 1234, period = 1234, @@ -337,13 +336,13 @@ public void Example_DetectUnivariateLastPoint_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() -{ + UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] + { new TimeSeriesPoint(123.45F) { Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), } -}) + }) { Granularity = TimeGranularity.Yearly, CustomInterval = 1234, @@ -364,13 +363,13 @@ public async Task Example_DetectUnivariateLastPoint_AllParameters_Convenience_As AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() -{ + UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] + { new TimeSeriesPoint(123.45F) { Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), } -}) + }) { Granularity = TimeGranularity.Yearly, CustomInterval = 1234, @@ -393,13 +392,13 @@ public void Example_DetectUnivariateChangePoint_ShortVersion() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { value = 123.45F, } -}, + }, granularity = "yearly", }); Response response = client.DetectUnivariateChangePoint(content); @@ -418,13 +417,13 @@ public async Task Example_DetectUnivariateChangePoint_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { value = 123.45F, } -}, + }, granularity = "yearly", }); Response response = await client.DetectUnivariateChangePointAsync(content); @@ -441,10 +440,10 @@ public void Example_DetectUnivariateChangePoint_ShortVersion_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() -{ + UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] + { new TimeSeriesPoint(123.45F) -}, TimeGranularity.Yearly); + }, TimeGranularity.Yearly); Response response = client.DetectUnivariateChangePoint(options); } @@ -456,10 +455,10 @@ public async Task Example_DetectUnivariateChangePoint_ShortVersion_Convenience_A AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() -{ + UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] + { new TimeSeriesPoint(123.45F) -}, TimeGranularity.Yearly); + }, TimeGranularity.Yearly); Response response = await client.DetectUnivariateChangePointAsync(options); } @@ -473,14 +472,14 @@ public void Example_DetectUnivariateChangePoint_AllParameters() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { timestamp = "2022-05-10T14:57:31.2311892-04:00", value = 123.45F, } -}, + }, granularity = "yearly", customInterval = 1234, period = 1234, @@ -505,14 +504,14 @@ public async Task Example_DetectUnivariateChangePoint_AllParameters_Async() RequestContent content = RequestContent.Create(new { - series = new List() -{ + series = new object[] + { new { timestamp = "2022-05-10T14:57:31.2311892-04:00", value = 123.45F, } -}, + }, granularity = "yearly", customInterval = 1234, period = 1234, @@ -535,13 +534,13 @@ public void Example_DetectUnivariateChangePoint_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() -{ + UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] + { new TimeSeriesPoint(123.45F) { Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), } -}, TimeGranularity.Yearly) + }, TimeGranularity.Yearly) { CustomInterval = 1234, Period = 1234, @@ -559,13 +558,13 @@ public async Task Example_DetectUnivariateChangePoint_AllParameters_Convenience_ AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() -{ + UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] + { new TimeSeriesPoint(123.45F) { Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), } -}, TimeGranularity.Yearly) + }, TimeGranularity.Yearly) { CustomInterval = 1234, Period = 1234, @@ -912,7 +911,7 @@ public void Example_TrainMultivariateModel_AllParameters_Convenience() DataSchema = DataSchema.OneTable, DisplayName = "", SlidingWindow = 1234, - AlignPolicy = new AlignPolicy() + AlignPolicy = new AlignPolicy { AlignMode = AlignMode.Inner, FillNAMethod = FillNAMethod.Previous, @@ -935,7 +934,7 @@ public async Task Example_TrainMultivariateModel_AllParameters_Convenience_Async DataSchema = DataSchema.OneTable, DisplayName = "", SlidingWindow = 1234, - AlignPolicy = new AlignPolicy() + AlignPolicy = new AlignPolicy { AlignMode = AlignMode.Inner, FillNAMethod = FillNAMethod.Previous, @@ -954,6 +953,7 @@ public void Example_DeleteMultivariateModel_ShortVersion() AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = client.DeleteMultivariateModel(""); + Console.WriteLine(response.Status); } @@ -966,6 +966,7 @@ public async Task Example_DeleteMultivariateModel_ShortVersion_Async() AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = await client.DeleteMultivariateModelAsync(""); + Console.WriteLine(response.Status); } @@ -978,6 +979,7 @@ public void Example_DeleteMultivariateModel_AllParameters() AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = client.DeleteMultivariateModel(""); + Console.WriteLine(response.Status); } @@ -990,6 +992,7 @@ public async Task Example_DeleteMultivariateModel_AllParameters_Async() AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = await client.DeleteMultivariateModelAsync(""); + Console.WriteLine(response.Status); } @@ -1341,21 +1344,21 @@ public void Example_DetectMultivariateLastAnomaly_ShortVersion() RequestContent content = RequestContent.Create(new { - variables = new List() -{ + variables = new object[] + { new { variable = "", -timestamps = new List() +timestamps = new object[] { "" }, -values = new List() +values = new object[] { 123.45F }, } -}, + }, }); Response response = client.DetectMultivariateLastAnomaly("", content); @@ -1373,21 +1376,21 @@ public async Task Example_DetectMultivariateLastAnomaly_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - variables = new List() -{ + variables = new object[] + { new { variable = "", -timestamps = new List() +timestamps = new object[] { "" }, -values = new List() +values = new object[] { 123.45F }, } -}, + }, }); Response response = await client.DetectMultivariateLastAnomalyAsync("", content); @@ -1403,16 +1406,10 @@ public void Example_DetectMultivariateLastAnomaly_ShortVersion_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() -{ -new VariableValues("",new List() -{ -"" -},new List() -{ -123.45F -}) -}); + MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] + { +new VariableValues("", new string[]{""}, new float[]{123.45F}) + }); Response response = client.DetectMultivariateLastAnomaly("", options); } @@ -1424,16 +1421,10 @@ public async Task Example_DetectMultivariateLastAnomaly_ShortVersion_Convenience AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() -{ -new VariableValues("",new List() -{ -"" -},new List() -{ -123.45F -}) -}); + MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] + { +new VariableValues("", new string[]{""}, new float[]{123.45F}) + }); Response response = await client.DetectMultivariateLastAnomalyAsync("", options); } @@ -1447,21 +1438,21 @@ public void Example_DetectMultivariateLastAnomaly_AllParameters() RequestContent content = RequestContent.Create(new { - variables = new List() -{ + variables = new object[] + { new { variable = "", -timestamps = new List() +timestamps = new object[] { "" }, -values = new List() +values = new object[] { 123.45F }, } -}, + }, topContributorCount = 1234, }); Response response = client.DetectMultivariateLastAnomaly("", content); @@ -1493,21 +1484,21 @@ public async Task Example_DetectMultivariateLastAnomaly_AllParameters_Async() RequestContent content = RequestContent.Create(new { - variables = new List() -{ + variables = new object[] + { new { variable = "", -timestamps = new List() +timestamps = new object[] { "" }, -values = new List() +values = new object[] { 123.45F }, } -}, + }, topContributorCount = 1234, }); Response response = await client.DetectMultivariateLastAnomalyAsync("", content); @@ -1537,16 +1528,10 @@ public void Example_DetectMultivariateLastAnomaly_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() -{ -new VariableValues("",new List() -{ -"" -},new List() -{ -123.45F -}) -}) + MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] + { +new VariableValues("", new string[]{""}, new float[]{123.45F}) + }) { TopContributorCount = 1234, }; @@ -1561,16 +1546,10 @@ public async Task Example_DetectMultivariateLastAnomaly_AllParameters_Convenienc AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() -{ -new VariableValues("",new List() -{ -"" -},new List() -{ -123.45F -}) -}) + MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] + { +new VariableValues("", new string[]{""}, new float[]{123.45F}) + }) { TopContributorCount = 1234, }; @@ -1588,9 +1567,9 @@ public void Example_GetMultivariateModels_ShortVersion() foreach (BinaryData item in client.GetMultivariateModels(null, null, 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.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); } } @@ -1605,9 +1584,9 @@ public async Task Example_GetMultivariateModels_ShortVersion_Async() await foreach (BinaryData item in client.GetMultivariateModelsAsync(null, null, 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.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); } } @@ -1648,30 +1627,30 @@ public void Example_GetMultivariateModels_AllParameters() 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()); + 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()); } } @@ -1686,30 +1665,30 @@ public async Task Example_GetMultivariateModels_AllParameters_Async() 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()); + 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()); } } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationClient.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationClient.cs index 76d0f228e4e76..2d5571e633574 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationClient.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationClient.cs @@ -50,7 +50,6 @@ public partial class ConfigurationClient /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task CheckKeysAsync(string name = null, string after = null, string acceptDatetime = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfigurationClient.CheckKeys"); @@ -83,7 +82,6 @@ internal virtual async Task CheckKeysAsync(string name = null, string /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response CheckKeys(string name = null, string after = null, string acceptDatetime = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfigurationClient.CheckKeys"); @@ -120,7 +118,6 @@ internal virtual Response CheckKeys(string name = null, string after = null, str /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task CheckKeyValuesAsync(string key = null, string label = null, string after = null, string acceptDatetime = null, IEnumerable select = null, string snapshot = null, MatchConditions matchConditions = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfigurationClient.CheckKeyValues"); @@ -157,7 +154,6 @@ internal virtual async Task CheckKeyValuesAsync(string key = null, str /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response CheckKeyValues(string key = null, string label = null, string after = null, string acceptDatetime = null, IEnumerable select = null, string snapshot = null, MatchConditions matchConditions = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfigurationClient.CheckKeyValues"); @@ -194,7 +190,6 @@ internal virtual Response CheckKeyValues(string key = null, string label = null, /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task GetConfigurationSettingAsync(string key, string label, string acceptDatetime, IEnumerable select, MatchConditions matchConditions, RequestContext context) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -233,7 +228,6 @@ internal virtual async Task GetConfigurationSettingAsync(string key, s /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response GetConfigurationSetting(string key, string label, string acceptDatetime, IEnumerable select, MatchConditions matchConditions, RequestContext context) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -272,7 +266,6 @@ internal virtual Response GetConfigurationSetting(string key, string label, stri /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task SetConfigurationSettingAsync(string key, RequestContent content, ContentType contentType, string label = null, MatchConditions matchConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -311,7 +304,6 @@ internal virtual async Task SetConfigurationSettingAsync(string key, R /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response SetConfigurationSetting(string key, RequestContent content, ContentType contentType, string label = null, MatchConditions matchConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -348,7 +340,6 @@ internal virtual Response SetConfigurationSetting(string key, RequestContent con /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task DeleteConfigurationSettingAsync(string key, string label, ETag? ifMatch, RequestContext context) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -385,7 +376,6 @@ internal virtual async Task DeleteConfigurationSettingAsync(string key /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response DeleteConfigurationSetting(string key, string label, ETag? ifMatch, RequestContext context) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -424,7 +414,6 @@ internal virtual Response DeleteConfigurationSetting(string key, string label, E /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task CheckKeyValueAsync(string key, string label = null, string acceptDatetime = null, IEnumerable select = null, MatchConditions matchConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -463,7 +452,6 @@ internal virtual async Task CheckKeyValueAsync(string key, string labe /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response CheckKeyValue(string key, string label = null, string acceptDatetime = null, IEnumerable select = null, MatchConditions matchConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -496,7 +484,6 @@ internal virtual Response CheckKeyValue(string key, string label = null, string /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task CheckSnapshotsAsync(string after = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfigurationClient.CheckSnapshots"); @@ -527,7 +514,6 @@ internal virtual async Task CheckSnapshotsAsync(string after = null, R /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response CheckSnapshots(string after = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfigurationClient.CheckSnapshots"); @@ -562,7 +548,6 @@ internal virtual Response CheckSnapshots(string after = null, RequestContext con /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task GetSnapshotAsync(string name, IEnumerable select, MatchConditions matchConditions, RequestContext context) { Argument.AssertNotNullOrEmpty(name, nameof(name)); @@ -599,7 +584,6 @@ internal virtual async Task GetSnapshotAsync(string name, IEnumerable< /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response GetSnapshot(string name, IEnumerable select, MatchConditions matchConditions, RequestContext context) { Argument.AssertNotNullOrEmpty(name, nameof(name)); @@ -637,7 +621,6 @@ internal virtual Response GetSnapshot(string name, IEnumerable select, M /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task UpdateSnapshotStatusAsync(string name, RequestContent content, ContentType contentType, MatchConditions matchConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(name, nameof(name)); @@ -676,7 +659,6 @@ internal virtual async Task UpdateSnapshotStatusAsync(string name, Req /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response UpdateSnapshotStatus(string name, RequestContent content, ContentType contentType, MatchConditions matchConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(name, nameof(name)); @@ -713,7 +695,6 @@ internal virtual Response UpdateSnapshotStatus(string name, RequestContent conte /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task CheckSnapshotAsync(string name, MatchConditions matchConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(name, nameof(name)); @@ -749,7 +730,6 @@ internal virtual async Task CheckSnapshotAsync(string name, MatchCondi /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response CheckSnapshot(string name, MatchConditions matchConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(name, nameof(name)); @@ -785,7 +765,6 @@ internal virtual Response CheckSnapshot(string name, MatchConditions matchCondit /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task CheckLabelsAsync(string name = null, string after = null, string acceptDatetime = null, IEnumerable select = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfigurationClient.CheckLabels"); @@ -819,7 +798,6 @@ internal virtual async Task CheckLabelsAsync(string name = null, strin /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response CheckLabels(string name = null, string after = null, string acceptDatetime = null, IEnumerable select = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfigurationClient.CheckLabels"); @@ -854,7 +832,6 @@ internal virtual Response CheckLabels(string name = null, string after = null, s /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task CreateReadOnlyLockAsync(string key, string label, MatchConditions matchConditions, RequestContext context) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -891,7 +868,6 @@ internal virtual async Task CreateReadOnlyLockAsync(string key, string /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response CreateReadOnlyLock(string key, string label, MatchConditions matchConditions, RequestContext context) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -928,7 +904,6 @@ internal virtual Response CreateReadOnlyLock(string key, string label, MatchCond /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task DeleteReadOnlyLockAsync(string key, string label, MatchConditions matchConditions, RequestContext context) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -965,7 +940,6 @@ internal virtual async Task DeleteReadOnlyLockAsync(string key, string /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response DeleteReadOnlyLock(string key, string label, MatchConditions matchConditions, RequestContext context) { Argument.AssertNotNullOrEmpty(key, nameof(key)); @@ -1002,7 +976,6 @@ internal virtual Response DeleteReadOnlyLock(string key, string label, MatchCond /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task CheckRevisionsAsync(string key = null, string label = null, string after = null, string acceptDatetime = null, IEnumerable select = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfigurationClient.CheckRevisions"); @@ -1037,7 +1010,6 @@ internal virtual async Task CheckRevisionsAsync(string key = null, str /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response CheckRevisions(string key = null, string label = null, string after = null, string acceptDatetime = null, IEnumerable select = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfigurationClient.CheckRevisions"); @@ -1069,7 +1041,6 @@ internal virtual Response CheckRevisions(string key = null, string label = null, /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task GetOperationDetailsAsync(string snapshot, RequestContext context) { Argument.AssertNotNull(snapshot, nameof(snapshot)); @@ -1103,7 +1074,6 @@ internal virtual async Task GetOperationDetailsAsync(string snapshot, /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response GetOperationDetails(string snapshot, RequestContext context) { Argument.AssertNotNull(snapshot, nameof(snapshot)); @@ -1138,7 +1108,6 @@ internal virtual Response GetOperationDetails(string snapshot, RequestContext co /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// internal virtual AsyncPageable GetKeysAsync(string name, string after, string acceptDatetime, RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetKeysRequest(name, after, acceptDatetime, context); @@ -1162,7 +1131,6 @@ internal virtual AsyncPageable GetKeysAsync(string name, string afte /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// internal virtual Pageable GetKeys(string name, string after, string acceptDatetime, RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetKeysRequest(name, after, acceptDatetime, context); @@ -1190,7 +1158,6 @@ internal virtual Pageable GetKeys(string name, string after, string /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// internal virtual AsyncPageable GetConfigurationSettingsAsync(string key, string label, string after, string acceptDatetime, IEnumerable select, string snapshot, MatchConditions matchConditions, RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetConfigurationSettingsRequest(key, label, after, acceptDatetime, select, snapshot, matchConditions, context); @@ -1218,7 +1185,6 @@ internal virtual AsyncPageable GetConfigurationSettingsAsync(string /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// internal virtual Pageable GetConfigurationSettings(string key, string label, string after, string acceptDatetime, IEnumerable select, string snapshot, MatchConditions matchConditions, RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetConfigurationSettingsRequest(key, label, after, acceptDatetime, select, snapshot, matchConditions, context); @@ -1243,7 +1209,6 @@ internal virtual Pageable GetConfigurationSettings(string key, strin /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// internal virtual AsyncPageable GetSnapshotsAsync(string name, string after, IEnumerable select, IEnumerable status, RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSnapshotsRequest(name, after, select, status, context); @@ -1268,7 +1233,6 @@ internal virtual AsyncPageable GetSnapshotsAsync(string name, string /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// internal virtual Pageable GetSnapshots(string name, string after, IEnumerable select, IEnumerable status, RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSnapshotsRequest(name, after, select, status, context); @@ -1293,7 +1257,6 @@ internal virtual Pageable GetSnapshots(string name, string after, IE /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// internal virtual AsyncPageable GetLabelsAsync(string name, string after, string acceptDatetime, IEnumerable select, RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetLabelsRequest(name, after, acceptDatetime, select, context); @@ -1318,7 +1281,6 @@ internal virtual AsyncPageable GetLabelsAsync(string name, string af /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// internal virtual Pageable GetLabels(string name, string after, string acceptDatetime, IEnumerable select, RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetLabelsRequest(name, after, acceptDatetime, select, context); @@ -1344,7 +1306,6 @@ internal virtual Pageable GetLabels(string name, string after, strin /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// internal virtual AsyncPageable GetRevisionsAsync(string key, string label, string after, string acceptDatetime, IEnumerable select, RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetRevisionsRequest(key, label, after, acceptDatetime, select, context); @@ -1370,7 +1331,6 @@ internal virtual AsyncPageable GetRevisionsAsync(string key, string /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// internal virtual Pageable GetRevisions(string key, string label, string after, string acceptDatetime, IEnumerable select, RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetRevisionsRequest(key, label, after, acceptDatetime, select, context); @@ -1397,7 +1357,6 @@ internal virtual Pageable GetRevisions(string key, string label, str /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The representing an asynchronous operation on the service. - /// internal virtual async Task> CreateSnapshotAsync(WaitUntil waitUntil, string name, RequestContent content, ContentType contentType, RequestContext context = null) { Argument.AssertNotNullOrEmpty(name, nameof(name)); @@ -1436,7 +1395,6 @@ internal virtual async Task> CreateSnapshotAsync(WaitUntil /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The representing an asynchronous operation on the service. - /// internal virtual Operation CreateSnapshot(WaitUntil waitUntil, string name, RequestContent content, ContentType contentType, RequestContext context = null) { Argument.AssertNotNullOrEmpty(name, nameof(name)); diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Docs/ConfigurationClient.xml b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Docs/ConfigurationClient.xml deleted file mode 100644 index 01af1a4b5c252..0000000000000 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Docs/ConfigurationClient.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file 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 79e5a85c5fcfb..98a6c6a9e9813 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 @@ -63,14 +63,14 @@ RequestContent content = RequestContent.Create(new key = new { query = "", - callingOptions = new Dictionary() + callingOptions = new Dictionary { ["verbose"] = true, ["log"] = true, ["show-all-intents"] = true, ["timezoneOffset"] = 123.45F, ["spellCheck"] = true, - ["bing-spell-check-subscription-key"] = "", + ["bing-spell-check-subscription-key"] = "" }, targetProjectKind = "Luis", apiVersion = "", @@ -147,14 +147,14 @@ RequestContent content = RequestContent.Create(new key = new { query = "", - callingOptions = new Dictionary() + callingOptions = new Dictionary { ["verbose"] = true, ["log"] = true, ["show-all-intents"] = true, ["timezoneOffset"] = 123.45F, ["spellCheck"] = true, - ["bing-spell-check-subscription-key"] = "", + ["bing-spell-check-subscription-key"] = "" }, targetProjectKind = "Luis", apiVersion = "", @@ -277,11 +277,11 @@ RequestContent content = RequestContent.Create(new { analysisInput = new { - conversations = new List() + conversations = new object[] { new { - conversationItems = new List() + conversationItems = new object[] { new { @@ -296,7 +296,7 @@ RequestContent content = RequestContent.Create(new } }, }, - tasks = new List() + tasks = new object[] { new { @@ -324,11 +324,11 @@ RequestContent content = RequestContent.Create(new displayName = "", analysisInput = new { - conversations = new List() + conversations = new object[] { new { - conversationItems = new List() + conversationItems = new object[] { new { @@ -347,13 +347,13 @@ RequestContent content = RequestContent.Create(new } }, }, - tasks = new List() + tasks = new object[] { new { parameters = new { - summaryAspects = new List() + summaryAspects = new object[] { "issue" }, @@ -404,11 +404,11 @@ RequestContent content = RequestContent.Create(new { analysisInput = new { - conversations = new List() + conversations = new object[] { new { - conversationItems = new List() + conversationItems = new object[] { new { @@ -423,7 +423,7 @@ RequestContent content = RequestContent.Create(new } }, }, - tasks = new List() + tasks = new object[] { new { @@ -451,11 +451,11 @@ RequestContent content = RequestContent.Create(new displayName = "", analysisInput = new { - conversations = new List() + conversations = new object[] { new { - conversationItems = new List() + conversationItems = new object[] { new { @@ -474,13 +474,13 @@ RequestContent content = RequestContent.Create(new } }, }, - tasks = new List() + tasks = new object[] { new { parameters = new { - summaryAspects = new List() + summaryAspects = new object[] { "issue" }, 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 4471b80d116b4..a079e5f68dd16 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 @@ -462,7 +462,10 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c Response response = await client.GetExportProjectJobStatusAsync("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.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 GetExportProjectJobStatusAsync with all parameters and parse the result. ", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.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 GetExportProjectJobStatus with all parameters and parse the result. "); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.DeleteTrainedModelAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteTrainedModelAsync with all parameters. @@ -731,6 +738,7 @@ AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.DeleteTrainedModelAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -743,6 +751,7 @@ AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.DeleteTrainedModel("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteTrainedModel with all parameters. @@ -752,6 +761,7 @@ AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.DeleteTrainedModel("", ""); + Console.WriteLine(response.Status); ]]> @@ -1258,11 +1268,11 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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("projectKind").ToString()); - Console.WriteLine(result[0].GetProperty("projectName").ToString()); - Console.WriteLine(result[0].GetProperty("language").ToString()); + 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 GetProjectsAsync with all request content and parse the result. @@ -1274,16 +1284,16 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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()); } ]]> @@ -1298,11 +1308,11 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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("projectKind").ToString()); - Console.WriteLine(result[0].GetProperty("projectName").ToString()); - Console.WriteLine(result[0].GetProperty("language").ToString()); + 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 GetProjects with all request content and parse the result. @@ -1314,16 +1324,16 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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()); } ]]> @@ -1338,12 +1348,12 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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 GetDeploymentsAsync with all parameters and parse the result. @@ -1355,12 +1365,12 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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()); } ]]> @@ -1375,12 +1385,12 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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 GetDeployments with all parameters and parse the result. @@ -1392,12 +1402,12 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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()); } ]]> @@ -1412,13 +1422,13 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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 GetTrainedModelsAsync with all parameters and parse the result. @@ -1430,13 +1440,13 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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()); } ]]> @@ -1451,13 +1461,13 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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 GetTrainedModels with all parameters and parse the result. @@ -1469,13 +1479,13 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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()); } ]]> @@ -1490,16 +1500,16 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> This sample shows how to call GetModelEvaluationResultsAsync with all parameters and parse the result. @@ -1511,16 +1521,16 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", stringIndexType: "Utf16CodeUnit")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -1535,16 +1545,16 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c foreach (BinaryData item in client.GetModelEvaluationResults("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> This sample shows how to call GetModelEvaluationResults with all parameters and parse the result. @@ -1556,16 +1566,16 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c foreach (BinaryData item in client.GetModelEvaluationResults("", "", stringIndexType: "Utf16CodeUnit")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -1580,14 +1590,14 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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("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()); + 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 GetTrainingJobsAsync with all parameters and parse the result. @@ -1599,39 +1609,39 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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()); } ]]> @@ -1646,14 +1656,14 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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("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()); + 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 GetTrainingJobs with all parameters and parse the result. @@ -1665,39 +1675,39 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + 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()); } ]]> @@ -1712,8 +1722,8 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); } ]]> This sample shows how to call GetSupportedLanguagesAsync with all parameters and parse the result. @@ -1725,8 +1735,8 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); } ]]> @@ -1741,8 +1751,8 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); } ]]> This sample shows how to call GetSupportedLanguages with all parameters and parse the result. @@ -1754,8 +1764,8 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); } ]]> @@ -1770,9 +1780,9 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("category").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); } ]]> This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters and parse the result. @@ -1784,9 +1794,9 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(language: "", multilingual: true)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("category").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); } ]]> @@ -1801,9 +1811,9 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c foreach (BinaryData item in client.GetSupportedPrebuiltEntities()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("category").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); } ]]> This sample shows how to call GetSupportedPrebuiltEntities with all parameters and parse the result. @@ -1815,9 +1825,9 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c foreach (BinaryData item in client.GetSupportedPrebuiltEntities(language: "", multilingual: true)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("category").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); } ]]> @@ -1832,8 +1842,8 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); } ]]> This sample shows how to call GetTrainingConfigVersionsAsync with all parameters and parse the result. @@ -1845,8 +1855,8 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); } ]]> @@ -1861,8 +1871,8 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); } ]]> This sample shows how to call GetTrainingConfigVersions with all parameters and parse the result. @@ -1874,8 +1884,8 @@ ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, c 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()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); } ]]> @@ -1991,7 +2001,10 @@ Operation operation = await client.ExportProjectAsync(WaitUntil.Comp BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.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 ExportProjectAsync with all parameters and parse the result. operation = client.ExportProject(WaitUntil.Completed, " This sample shows how to call ExportProject with all parameters and parse the result. () + intents = new object[] { new { category = "", } }, - entities = new List() + entities = new object[] { new { @@ -2142,17 +2158,17 @@ RequestContent content = RequestContent.Create(new compositionSetting = "returnLongestOverlap", list = new { - sublists = new List() + sublists = new object[] { new { listKey = "", - synonyms = new List() + synonyms = new object[] { new { language = "", - values = new List() + values = new object[] { "" }, @@ -2161,7 +2177,7 @@ RequestContent content = RequestContent.Create(new } }, }, - prebuilts = new List() + prebuilts = new object[] { new { @@ -2170,7 +2186,7 @@ RequestContent content = RequestContent.Create(new }, regex = new { - expressions = new List() + expressions = new object[] { new { @@ -2180,17 +2196,17 @@ RequestContent content = RequestContent.Create(new } }, }, - requiredComponents = new List() + requiredComponents = new object[] { "" }, } }, - utterances = new List() + utterances = new object[] { new { - entities = new List() + entities = new object[] { new { @@ -2287,14 +2303,14 @@ RequestContent content = RequestContent.Create(new }, assets = new { - intents = new List() + intents = new object[] { new { category = "", } }, - entities = new List() + entities = new object[] { new { @@ -2302,17 +2318,17 @@ RequestContent content = RequestContent.Create(new compositionSetting = "returnLongestOverlap", list = new { - sublists = new List() + sublists = new object[] { new { listKey = "", - synonyms = new List() + synonyms = new object[] { new { language = "", - values = new List() + values = new object[] { "" }, @@ -2321,7 +2337,7 @@ RequestContent content = RequestContent.Create(new } }, }, - prebuilts = new List() + prebuilts = new object[] { new { @@ -2330,7 +2346,7 @@ RequestContent content = RequestContent.Create(new }, regex = new { - expressions = new List() + expressions = new object[] { new { @@ -2340,17 +2356,17 @@ RequestContent content = RequestContent.Create(new } }, }, - requiredComponents = new List() + requiredComponents = new object[] { "" }, } }, - utterances = new List() + utterances = new object[] { new { - entities = new List() + entities = new object[] { new { 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 a95116c130f97..5c39e564f4b3a 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 @@ -17,7 +17,7 @@ namespace Azure.AI.Language.Conversations.Samples { - public class Samples_ConversationAnalysisClient + public partial class Samples_ConversationAnalysisClient { [Test] [Ignore("Only validating compilation of examples")] @@ -115,14 +115,14 @@ public void Example_AnalyzeConversation_AllParameters() key = new { query = "", - callingOptions = new Dictionary() + callingOptions = new Dictionary { ["verbose"] = true, ["log"] = true, ["show-all-intents"] = true, ["timezoneOffset"] = 123.45F, ["spellCheck"] = true, - ["bing-spell-check-subscription-key"] = "", + ["bing-spell-check-subscription-key"] = "" }, targetProjectKind = "Luis", apiVersion = "", @@ -171,14 +171,14 @@ public async Task Example_AnalyzeConversation_AllParameters_Async() key = new { query = "", - callingOptions = new Dictionary() + callingOptions = new Dictionary { ["verbose"] = true, ["log"] = true, ["show-all-intents"] = true, ["timezoneOffset"] = 123.45F, ["spellCheck"] = true, - ["bing-spell-check-subscription-key"] = "", + ["bing-spell-check-subscription-key"] = "" }, targetProjectKind = "Luis", apiVersion = "", @@ -307,11 +307,11 @@ public void Example_AnalyzeConversations_ShortVersion() { analysisInput = new { - conversations = new List() -{ + conversations = new object[] + { new { -conversationItems = new List() +conversationItems = new object[] { new { @@ -324,15 +324,15 @@ public void Example_AnalyzeConversations_ShortVersion() language = "", modality = "text", } -}, + }, }, - tasks = new List() -{ + tasks = new object[] + { new { kind = "ConversationalSummarizationTask", } -}, + }, }); Operation operation = client.AnalyzeConversations(WaitUntil.Completed, content); BinaryData responseData = operation.Value; @@ -356,11 +356,11 @@ public async Task Example_AnalyzeConversations_ShortVersion_Async() { analysisInput = new { - conversations = new List() -{ + conversations = new object[] + { new { -conversationItems = new List() +conversationItems = new object[] { new { @@ -373,15 +373,15 @@ public async Task Example_AnalyzeConversations_ShortVersion_Async() language = "", modality = "text", } -}, + }, }, - tasks = new List() -{ + tasks = new object[] + { new { kind = "ConversationalSummarizationTask", } -}, + }, }); Operation operation = await client.AnalyzeConversationsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; @@ -406,11 +406,11 @@ public void Example_AnalyzeConversations_AllParameters() displayName = "", analysisInput = new { - conversations = new List() -{ + conversations = new object[] + { new { -conversationItems = new List() +conversationItems = new object[] { new { @@ -427,15 +427,15 @@ public void Example_AnalyzeConversations_AllParameters() modality = "text", domain = "finance", } -}, + }, }, - tasks = new List() -{ + tasks = new object[] + { new { parameters = new { -summaryAspects = new List() +summaryAspects = new object[] { "issue" }, @@ -445,7 +445,7 @@ public void Example_AnalyzeConversations_AllParameters() kind = "ConversationalSummarizationTask", taskName = "", } -}, + }, }); Operation operation = client.AnalyzeConversations(WaitUntil.Completed, content); BinaryData responseData = operation.Value; @@ -487,11 +487,11 @@ public async Task Example_AnalyzeConversations_AllParameters_Async() displayName = "", analysisInput = new { - conversations = new List() -{ + conversations = new object[] + { new { -conversationItems = new List() +conversationItems = new object[] { new { @@ -508,15 +508,15 @@ public async Task Example_AnalyzeConversations_AllParameters_Async() modality = "text", domain = "finance", } -}, + }, }, - tasks = new List() -{ + tasks = new object[] + { new { parameters = new { -summaryAspects = new List() +summaryAspects = new object[] { "issue" }, @@ -526,7 +526,7 @@ public async Task Example_AnalyzeConversations_AllParameters_Async() kind = "ConversationalSummarizationTask", taskName = "", } -}, + }, }); Operation operation = await client.AnalyzeConversationsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; 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 cb3aac7084717..0cc483eaec1bc 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -15,9 +14,9 @@ using Azure.Identity; using NUnit.Framework; -namespace Azure.AI.Language.Conversations.Authoring.Samples +namespace Azure.AI.Language.Conversations.Samples { - public class Samples_ConversationAuthoringClient + public partial class Samples_ConversationAuthoringClient { [Test] [Ignore("Only validating compilation of examples")] @@ -510,7 +509,10 @@ public void Example_GetExportProjectJobStatus_ShortVersion() Response response = client.GetExportProjectJobStatus("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.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()); } [Test] @@ -524,7 +526,10 @@ public async Task Example_GetExportProjectJobStatus_ShortVersion_Async() Response response = await client.GetExportProjectJobStatusAsync("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.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()); } [Test] @@ -788,6 +793,7 @@ public void Example_DeleteTrainedModel_ShortVersion() ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.DeleteTrainedModel("", ""); + Console.WriteLine(response.Status); } @@ -800,6 +806,7 @@ public async Task Example_DeleteTrainedModel_ShortVersion_Async() ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.DeleteTrainedModelAsync("", ""); + Console.WriteLine(response.Status); } @@ -812,6 +819,7 @@ public void Example_DeleteTrainedModel_AllParameters() ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.DeleteTrainedModel("", ""); + Console.WriteLine(response.Status); } @@ -824,6 +832,7 @@ public async Task Example_DeleteTrainedModel_AllParameters_Async() ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.DeleteTrainedModelAsync("", ""); + Console.WriteLine(response.Status); } @@ -1354,11 +1363,11 @@ public void Example_GetProjects_ShortVersion() 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("projectKind").ToString()); - Console.WriteLine(result[0].GetProperty("projectName").ToString()); - Console.WriteLine(result[0].GetProperty("language").ToString()); + 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()); } } @@ -1373,11 +1382,11 @@ public async Task Example_GetProjects_ShortVersion_Async() 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("projectKind").ToString()); - Console.WriteLine(result[0].GetProperty("projectName").ToString()); - Console.WriteLine(result[0].GetProperty("language").ToString()); + 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()); } } @@ -1392,16 +1401,16 @@ public void Example_GetProjects_AllParameters() 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()); + 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()); } } @@ -1416,16 +1425,16 @@ public async Task Example_GetProjects_AllParameters_Async() 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()); + 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()); } } @@ -1440,12 +1449,12 @@ public void Example_GetDeployments_ShortVersion() 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()); + 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()); } } @@ -1460,12 +1469,12 @@ public async Task Example_GetDeployments_ShortVersion_Async() 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()); + 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()); } } @@ -1480,12 +1489,12 @@ public void Example_GetDeployments_AllParameters() 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()); + 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()); } } @@ -1500,12 +1509,12 @@ public async Task Example_GetDeployments_AllParameters_Async() 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()); + 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()); } } @@ -1520,13 +1529,13 @@ public void Example_GetTrainedModels_ShortVersion() 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()); + 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()); } } @@ -1541,13 +1550,13 @@ public async Task Example_GetTrainedModels_ShortVersion_Async() 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()); + 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()); } } @@ -1562,13 +1571,13 @@ public void Example_GetTrainedModels_AllParameters() 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()); + 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()); } } @@ -1583,13 +1592,13 @@ public async Task Example_GetTrainedModels_AllParameters_Async() 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()); + 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()); } } @@ -1604,16 +1613,16 @@ public void Example_GetModelEvaluationResults_ShortVersion() foreach (BinaryData item in client.GetModelEvaluationResults("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -1628,16 +1637,16 @@ public async Task Example_GetModelEvaluationResults_ShortVersion_Async() await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -1652,16 +1661,16 @@ public void Example_GetModelEvaluationResults_AllParameters() foreach (BinaryData item in client.GetModelEvaluationResults("", "", stringIndexType: "Utf16CodeUnit")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -1676,16 +1685,16 @@ public async Task Example_GetModelEvaluationResults_AllParameters_Async() await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", stringIndexType: "Utf16CodeUnit")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -1700,14 +1709,14 @@ public void Example_GetTrainingJobs_ShortVersion() 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("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()); + 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()); } } @@ -1722,14 +1731,14 @@ public async Task Example_GetTrainingJobs_ShortVersion_Async() 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("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()); + 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()); } } @@ -1744,39 +1753,39 @@ public void Example_GetTrainingJobs_AllParameters() 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()); + 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()); } } @@ -1791,39 +1800,39 @@ public async Task Example_GetTrainingJobs_AllParameters_Async() 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()); + 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()); } } @@ -1838,8 +1847,8 @@ public void Example_GetSupportedLanguages_ShortVersion() 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()); + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); } } @@ -1854,8 +1863,8 @@ public async Task Example_GetSupportedLanguages_ShortVersion_Async() 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()); + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); } } @@ -1870,8 +1879,8 @@ public void Example_GetSupportedLanguages_AllParameters() 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()); + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); } } @@ -1886,8 +1895,8 @@ public async Task Example_GetSupportedLanguages_AllParameters_Async() 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()); + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); } } @@ -1902,9 +1911,9 @@ public void Example_GetSupportedPrebuiltEntities_ShortVersion() foreach (BinaryData item in client.GetSupportedPrebuiltEntities()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("category").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); } } @@ -1919,9 +1928,9 @@ public async Task Example_GetSupportedPrebuiltEntities_ShortVersion_Async() await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("category").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); } } @@ -1936,9 +1945,9 @@ public void Example_GetSupportedPrebuiltEntities_AllParameters() foreach (BinaryData item in client.GetSupportedPrebuiltEntities(language: "", multilingual: true)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("category").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); } } @@ -1953,9 +1962,9 @@ public async Task Example_GetSupportedPrebuiltEntities_AllParameters_Async() await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(language: "", multilingual: true)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("category").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); } } @@ -1970,8 +1979,8 @@ public void Example_GetTrainingConfigVersions_ShortVersion() 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()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); } } @@ -1986,8 +1995,8 @@ public async Task Example_GetTrainingConfigVersions_ShortVersion_Async() 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()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); } } @@ -2002,8 +2011,8 @@ public void Example_GetTrainingConfigVersions_AllParameters() 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()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); } } @@ -2018,8 +2027,8 @@ public async Task Example_GetTrainingConfigVersions_AllParameters_Async() 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()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); } } @@ -2141,7 +2150,10 @@ public void Example_ExportProject_ShortVersion() BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.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()); } [Test] @@ -2156,7 +2168,10 @@ public async Task Example_ExportProject_ShortVersion_Async() BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.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()); } [Test] @@ -2315,32 +2330,32 @@ public void Example_ImportProject_AllParameters() }, assets = new { - intents = new List() -{ + intents = new object[] + { new { category = "", } -}, - entities = new List() -{ + }, + entities = new object[] + { new { category = "", compositionSetting = "returnLongestOverlap", list = new { -sublists = new List() +sublists = new object[] { new { listKey = "", -synonyms = new List() +synonyms = new object[] { new { language = "", -values = new List() +values = new object[] { "" }, @@ -2349,7 +2364,7 @@ public void Example_ImportProject_AllParameters() } }, }, -prebuilts = new List() +prebuilts = new object[] { new { @@ -2358,7 +2373,7 @@ public void Example_ImportProject_AllParameters() }, regex = new { -expressions = new List() +expressions = new object[] { new { @@ -2368,17 +2383,17 @@ public void Example_ImportProject_AllParameters() } }, }, -requiredComponents = new List() +requiredComponents = new object[] { "" }, } -}, - utterances = new List() -{ + }, + utterances = new object[] + { new { -entities = new List() +entities = new object[] { new { @@ -2392,7 +2407,7 @@ public void Example_ImportProject_AllParameters() intent = "", dataset = "", } -}, + }, projectKind = "Conversation", }, }); @@ -2449,32 +2464,32 @@ public async Task Example_ImportProject_AllParameters_Async() }, assets = new { - intents = new List() -{ + intents = new object[] + { new { category = "", } -}, - entities = new List() -{ + }, + entities = new object[] + { new { category = "", compositionSetting = "returnLongestOverlap", list = new { -sublists = new List() +sublists = new object[] { new { listKey = "", -synonyms = new List() +synonyms = new object[] { new { language = "", -values = new List() +values = new object[] { "" }, @@ -2483,7 +2498,7 @@ public async Task Example_ImportProject_AllParameters_Async() } }, }, -prebuilts = new List() +prebuilts = new object[] { new { @@ -2492,7 +2507,7 @@ public async Task Example_ImportProject_AllParameters_Async() }, regex = new { -expressions = new List() +expressions = new object[] { new { @@ -2502,17 +2517,17 @@ public async Task Example_ImportProject_AllParameters_Async() } }, }, -requiredComponents = new List() +requiredComponents = new object[] { "" }, } -}, - utterances = new List() -{ + }, + utterances = new object[] + { new { -entities = new List() +entities = new object[] { new { @@ -2526,7 +2541,7 @@ public async Task Example_ImportProject_AllParameters_Async() intent = "", dataset = "", } -}, + }, projectKind = "Conversation", }, }); 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 87e88f6237394..dc3d86ae96b20 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 @@ -423,6 +423,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateSynonymsAsync("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateSynonymsAsync with all parameters and request content. @@ -433,11 +434,11 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e RequestContent content = RequestContent.Create(new { - value = new List() + value = new object[] { new { - alterations = new List() + alterations = new object[] { "" }, @@ -446,6 +447,7 @@ RequestContent content = RequestContent.Create(new nextLink = "", }); Response response = await client.UpdateSynonymsAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -459,6 +461,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateSynonyms("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateSynonyms with all parameters and request content. @@ -469,11 +472,11 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e RequestContent content = RequestContent.Create(new { - value = new List() + value = new object[] { new { - alterations = new List() + alterations = new object[] { "" }, @@ -482,6 +485,7 @@ RequestContent content = RequestContent.Create(new nextLink = "", }); Response response = client.UpdateSynonyms("", content); + Console.WriteLine(response.Status); ]]> @@ -623,6 +627,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e RequestContent content = RequestContent.Create(new object()); Response response = await client.AddFeedbackAsync("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call AddFeedbackAsync with all parameters and request content. @@ -633,7 +638,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e RequestContent content = RequestContent.Create(new { - records = new List() + records = new object[] { new { @@ -644,6 +649,7 @@ RequestContent content = RequestContent.Create(new }, }); Response response = await client.AddFeedbackAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -657,6 +663,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e RequestContent content = RequestContent.Create(new object()); Response response = client.AddFeedback("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call AddFeedback with all parameters and request content. @@ -667,7 +674,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e RequestContent content = RequestContent.Create(new { - records = new List() + records = new object[] { new { @@ -678,6 +685,7 @@ RequestContent content = RequestContent.Create(new }, }); Response response = client.AddFeedback("", content); + Console.WriteLine(response.Status); ]]> @@ -692,7 +700,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e await foreach (BinaryData item in client.GetProjectsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetProjectsAsync with all request content and parse the result. @@ -704,14 +712,14 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e 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()); + 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()); } ]]> @@ -726,7 +734,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e foreach (BinaryData item in client.GetProjects()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetProjects with all request content and parse the result. @@ -738,14 +746,14 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e 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()); + 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()); } ]]> @@ -760,7 +768,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e await foreach (BinaryData item in client.GetDeploymentsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetDeploymentsAsync with all parameters and parse the result. @@ -772,8 +780,8 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e 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()); + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); } ]]> @@ -788,7 +796,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e foreach (BinaryData item in client.GetDeployments("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetDeployments with all parameters and parse the result. @@ -800,8 +808,8 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e 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()); + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); } ]]> @@ -816,7 +824,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e await foreach (BinaryData item in client.GetSynonymsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); + Console.WriteLine(result.GetProperty("alterations")[0].ToString()); } ]]> This sample shows how to call GetSynonymsAsync with all parameters and parse the result. @@ -828,7 +836,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e await foreach (BinaryData item in client.GetSynonymsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); + Console.WriteLine(result.GetProperty("alterations")[0].ToString()); } ]]> @@ -843,7 +851,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e foreach (BinaryData item in client.GetSynonyms("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); + Console.WriteLine(result.GetProperty("alterations")[0].ToString()); } ]]> This sample shows how to call GetSynonyms with all parameters and parse the result. @@ -855,7 +863,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e foreach (BinaryData item in client.GetSynonyms("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); + Console.WriteLine(result.GetProperty("alterations")[0].ToString()); } ]]> @@ -870,8 +878,8 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e await foreach (BinaryData item in client.GetSourcesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); - Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("sourceUri").ToString()); + Console.WriteLine(result.GetProperty("sourceKind").ToString()); } ]]> This sample shows how to call GetSourcesAsync with all parameters and parse the result. @@ -883,11 +891,11 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e 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()); + 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()); } ]]> @@ -902,8 +910,8 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e foreach (BinaryData item in client.GetSources("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); - Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("sourceUri").ToString()); + Console.WriteLine(result.GetProperty("sourceKind").ToString()); } ]]> This sample shows how to call GetSources with all parameters and parse the result. @@ -915,11 +923,11 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e 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()); + 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()); } ]]> @@ -934,7 +942,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e await foreach (BinaryData item in client.GetQnasAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetQnasAsync with all parameters and parse the result. @@ -946,28 +954,28 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e await foreach (BinaryData item in client.GetQnasAsync("", source: "")) { 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()); + 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()); } ]]> @@ -982,7 +990,7 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e foreach (BinaryData item in client.GetQnas("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetQnas with all parameters and parse the result. @@ -994,28 +1002,28 @@ QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(e foreach (BinaryData item in client.GetQnas("", source: "")) { 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()); + 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()); } ]]> @@ -1163,24 +1171,24 @@ RequestContent content = RequestContent.Create(new }, assets = new { - synonyms = new List() + synonyms = new object[] { new { - alterations = new List() + alterations = new object[] { "" }, } }, - qnas = new List() + qnas = new object[] { new { id = 1234, answer = "", source = "", - questions = new List() + questions = new object[] { "" }, @@ -1191,7 +1199,7 @@ RequestContent content = RequestContent.Create(new dialog = new { isContextOnly = true, - prompts = new List() + prompts = new object[] { new { @@ -1202,7 +1210,7 @@ RequestContent content = RequestContent.Create(new id = 1234, answer = "", source = "", - questions = new List() + questions = new object[] { "" }, @@ -1210,12 +1218,12 @@ RequestContent content = RequestContent.Create(new { key = "", }, - activeLearningSuggestions = new List() + activeLearningSuggestions = new object[] { new { clusterHead = "", - suggestedQuestions = new List() + suggestedQuestions = new object[] { new { @@ -1231,7 +1239,7 @@ RequestContent content = RequestContent.Create(new } }, }, - activeLearningSuggestions = new List() + activeLearningSuggestions = new object[] { null }, @@ -1289,24 +1297,24 @@ RequestContent content = RequestContent.Create(new }, assets = new { - synonyms = new List() + synonyms = new object[] { new { - alterations = new List() + alterations = new object[] { "" }, } }, - qnas = new List() + qnas = new object[] { new { id = 1234, answer = "", source = "", - questions = new List() + questions = new object[] { "" }, @@ -1317,7 +1325,7 @@ RequestContent content = RequestContent.Create(new dialog = new { isContextOnly = true, - prompts = new List() + prompts = new object[] { new { @@ -1328,7 +1336,7 @@ RequestContent content = RequestContent.Create(new id = 1234, answer = "", source = "", - questions = new List() + questions = new object[] { "" }, @@ -1336,12 +1344,12 @@ RequestContent content = RequestContent.Create(new { key = "", }, - activeLearningSuggestions = new List() + activeLearningSuggestions = new object[] { new { clusterHead = "", - suggestedQuestions = new List() + suggestedQuestions = new object[] { new { @@ -1357,7 +1365,7 @@ RequestContent content = RequestContent.Create(new } }, }, - activeLearningSuggestions = new List() + activeLearningSuggestions = new object[] { null }, @@ -1441,7 +1449,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -1454,11 +1462,12 @@ RequestContent content = RequestContent.Create(new List() } }); Operation> operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", content); +AsyncPageable responseData = operation.Value; await foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); - Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("sourceUri").ToString()); + Console.WriteLine(result.GetProperty("sourceKind").ToString()); } ]]> This sample shows how to call UpdateSourcesAsync with all parameters and request content and parse the result. @@ -1467,7 +1476,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -1483,14 +1492,15 @@ RequestContent content = RequestContent.Create(new List() } }); Operation> operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", content); +AsyncPageable responseData = operation.Value; 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()); + 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()); } ]]> @@ -1502,7 +1512,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -1515,11 +1525,12 @@ RequestContent content = RequestContent.Create(new List() } }); Operation> operation = client.UpdateSources(WaitUntil.Completed, "", content); +Pageable responseData = operation.Value; foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); - Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("sourceUri").ToString()); + Console.WriteLine(result.GetProperty("sourceKind").ToString()); } ]]> This sample shows how to call UpdateSources with all parameters and request content and parse the result. @@ -1528,7 +1539,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -1544,14 +1555,15 @@ RequestContent content = RequestContent.Create(new List() } }); Operation> operation = client.UpdateSources(WaitUntil.Completed, "", content); +Pageable responseData = operation.Value; 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()); + 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()); } ]]> @@ -1563,7 +1575,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -1572,10 +1584,11 @@ RequestContent content = RequestContent.Create(new List() } }); Operation> operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", content); +AsyncPageable responseData = operation.Value; await foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call UpdateQnasAsync with all parameters and request content and parse the result. @@ -1584,7 +1597,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -1594,7 +1607,7 @@ RequestContent content = RequestContent.Create(new List() id = 1234, answer = "", source = "", - questions = new List() + questions = new object[] { "" }, @@ -1605,7 +1618,7 @@ RequestContent content = RequestContent.Create(new List() dialog = new { isContextOnly = true, - prompts = new List() + prompts = new object[] { new { @@ -1615,12 +1628,12 @@ RequestContent content = RequestContent.Create(new List() } }, }, - activeLearningSuggestions = new List() + activeLearningSuggestions = new object[] { new { clusterHead = "", - suggestedQuestions = new List() + suggestedQuestions = new object[] { new { @@ -1635,31 +1648,32 @@ RequestContent content = RequestContent.Create(new List() } }); Operation> operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", content); +AsyncPageable responseData = operation.Value; 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()); + 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()); } ]]> @@ -1671,7 +1685,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -1680,10 +1694,11 @@ RequestContent content = RequestContent.Create(new List() } }); Operation> operation = client.UpdateQnas(WaitUntil.Completed, "", content); +Pageable responseData = operation.Value; foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call UpdateQnas with all parameters and request content and parse the result. @@ -1692,7 +1707,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -1702,7 +1717,7 @@ RequestContent content = RequestContent.Create(new List() id = 1234, answer = "", source = "", - questions = new List() + questions = new object[] { "" }, @@ -1713,7 +1728,7 @@ RequestContent content = RequestContent.Create(new List() dialog = new { isContextOnly = true, - prompts = new List() + prompts = new object[] { new { @@ -1723,12 +1738,12 @@ RequestContent content = RequestContent.Create(new List() } }, }, - activeLearningSuggestions = new List() + activeLearningSuggestions = new object[] { new { clusterHead = "", - suggestedQuestions = new List() + suggestedQuestions = new object[] { new { @@ -1743,31 +1758,32 @@ RequestContent content = RequestContent.Create(new List() } }); Operation> operation = client.UpdateQnas(WaitUntil.Completed, "", content); +Pageable responseData = operation.Value; 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()); + 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()); } ]]> 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 94206049e445a..a55d84118344d 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -15,9 +14,9 @@ using Azure.Identity; using NUnit.Framework; -namespace Azure.AI.Language.QuestionAnswering.Authoring.Samples +namespace Azure.AI.Language.QuestionAnswering.Samples { - public class Samples_QuestionAnsweringAuthoringClient + public partial class Samples_QuestionAnsweringAuthoringClient { [Test] [Ignore("Only validating compilation of examples")] @@ -477,6 +476,7 @@ public void Example_UpdateSynonyms_ShortVersion() RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateSynonyms("", content); + Console.WriteLine(response.Status); } @@ -490,6 +490,7 @@ public async Task Example_UpdateSynonyms_ShortVersion_Async() RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateSynonymsAsync("", content); + Console.WriteLine(response.Status); } @@ -503,19 +504,20 @@ public void Example_UpdateSynonyms_AllParameters() RequestContent content = RequestContent.Create(new { - value = new List() -{ + value = new object[] + { new { -alterations = new List() +alterations = new object[] { "" }, } -}, + }, nextLink = "", }); Response response = client.UpdateSynonyms("", content); + Console.WriteLine(response.Status); } @@ -529,19 +531,20 @@ public async Task Example_UpdateSynonyms_AllParameters_Async() RequestContent content = RequestContent.Create(new { - value = new List() -{ + value = new object[] + { new { -alterations = new List() +alterations = new object[] { "" }, } -}, + }, nextLink = "", }); Response response = await client.UpdateSynonymsAsync("", content); + Console.WriteLine(response.Status); } @@ -695,6 +698,7 @@ public void Example_AddFeedback_ShortVersion() RequestContent content = RequestContent.Create(new object()); Response response = client.AddFeedback("", content); + Console.WriteLine(response.Status); } @@ -708,6 +712,7 @@ public async Task Example_AddFeedback_ShortVersion_Async() RequestContent content = RequestContent.Create(new object()); Response response = await client.AddFeedbackAsync("", content); + Console.WriteLine(response.Status); } @@ -721,17 +726,18 @@ public void Example_AddFeedback_AllParameters() RequestContent content = RequestContent.Create(new { - records = new List() -{ + records = new object[] + { new { userId = "", userQuestion = "", qnaId = 1234, } -}, + }, }); Response response = client.AddFeedback("", content); + Console.WriteLine(response.Status); } @@ -745,17 +751,18 @@ public async Task Example_AddFeedback_AllParameters_Async() RequestContent content = RequestContent.Create(new { - records = new List() -{ + records = new object[] + { new { userId = "", userQuestion = "", qnaId = 1234, } -}, + }, }); Response response = await client.AddFeedbackAsync("", content); + Console.WriteLine(response.Status); } @@ -770,7 +777,7 @@ public void Example_GetProjects_ShortVersion() foreach (BinaryData item in client.GetProjects()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -785,7 +792,7 @@ public async Task Example_GetProjects_ShortVersion_Async() await foreach (BinaryData item in client.GetProjectsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -800,14 +807,14 @@ public void Example_GetProjects_AllParameters() 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()); + 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()); } } @@ -822,14 +829,14 @@ public async Task Example_GetProjects_AllParameters_Async() 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()); + 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()); } } @@ -844,7 +851,7 @@ public void Example_GetDeployments_ShortVersion() foreach (BinaryData item in client.GetDeployments("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -859,7 +866,7 @@ public async Task Example_GetDeployments_ShortVersion_Async() await foreach (BinaryData item in client.GetDeploymentsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -874,8 +881,8 @@ public void Example_GetDeployments_AllParameters() 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()); + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); } } @@ -890,8 +897,8 @@ public async Task Example_GetDeployments_AllParameters_Async() 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()); + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); } } @@ -906,7 +913,7 @@ public void Example_GetSynonyms_ShortVersion() foreach (BinaryData item in client.GetSynonyms("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); + Console.WriteLine(result.GetProperty("alterations")[0].ToString()); } } @@ -921,7 +928,7 @@ public async Task Example_GetSynonyms_ShortVersion_Async() await foreach (BinaryData item in client.GetSynonymsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); + Console.WriteLine(result.GetProperty("alterations")[0].ToString()); } } @@ -936,7 +943,7 @@ public void Example_GetSynonyms_AllParameters() foreach (BinaryData item in client.GetSynonyms("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); + Console.WriteLine(result.GetProperty("alterations")[0].ToString()); } } @@ -951,7 +958,7 @@ public async Task Example_GetSynonyms_AllParameters_Async() await foreach (BinaryData item in client.GetSynonymsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); + Console.WriteLine(result.GetProperty("alterations")[0].ToString()); } } @@ -966,8 +973,8 @@ public void Example_GetSources_ShortVersion() foreach (BinaryData item in client.GetSources("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); - Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("sourceUri").ToString()); + Console.WriteLine(result.GetProperty("sourceKind").ToString()); } } @@ -982,8 +989,8 @@ public async Task Example_GetSources_ShortVersion_Async() await foreach (BinaryData item in client.GetSourcesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); - Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("sourceUri").ToString()); + Console.WriteLine(result.GetProperty("sourceKind").ToString()); } } @@ -998,11 +1005,11 @@ public void Example_GetSources_AllParameters() 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()); + 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()); } } @@ -1017,11 +1024,11 @@ public async Task Example_GetSources_AllParameters_Async() 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()); + 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()); } } @@ -1036,7 +1043,7 @@ public void Example_GetQnas_ShortVersion() foreach (BinaryData item in client.GetQnas("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1051,7 +1058,7 @@ public async Task Example_GetQnas_ShortVersion_Async() await foreach (BinaryData item in client.GetQnasAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1066,28 +1073,28 @@ public void Example_GetQnas_AllParameters() foreach (BinaryData item in client.GetQnas("", source: "")) { 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()); + 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()); } } @@ -1102,28 +1109,28 @@ public async Task Example_GetQnas_AllParameters_Async() await foreach (BinaryData item in client.GetQnasAsync("", source: "")) { 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()); + 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()); } } @@ -1305,24 +1312,24 @@ public void Example_Import_AllParameters() }, assets = new { - synonyms = new List() -{ + synonyms = new object[] + { new { -alterations = new List() +alterations = new object[] { "" }, } -}, - qnas = new List() -{ + }, + qnas = new object[] + { new { id = 1234, answer = "", source = "", -questions = new List() +questions = new object[] { "" }, @@ -1333,7 +1340,7 @@ public void Example_Import_AllParameters() dialog = new { isContextOnly = true, -prompts = new List() +prompts = new object[] { new { @@ -1344,7 +1351,7 @@ public void Example_Import_AllParameters() id = 1234, answer = "", source = "", -questions = new List() +questions = new object[] { "" }, @@ -1352,12 +1359,12 @@ public void Example_Import_AllParameters() { key = "", }, -activeLearningSuggestions = new List() +activeLearningSuggestions = new object[] { new { clusterHead = "", -suggestedQuestions = new List() +suggestedQuestions = new object[] { new { @@ -1373,12 +1380,12 @@ public void Example_Import_AllParameters() } }, }, -activeLearningSuggestions = new List() +activeLearningSuggestions = new object[] { null }, } -}, + }, }, fileUri = "", }); @@ -1415,24 +1422,24 @@ public async Task Example_Import_AllParameters_Async() }, assets = new { - synonyms = new List() -{ + synonyms = new object[] + { new { -alterations = new List() +alterations = new object[] { "" }, } -}, - qnas = new List() -{ + }, + qnas = new object[] + { new { id = 1234, answer = "", source = "", -questions = new List() +questions = new object[] { "" }, @@ -1443,7 +1450,7 @@ public async Task Example_Import_AllParameters_Async() dialog = new { isContextOnly = true, -prompts = new List() +prompts = new object[] { new { @@ -1454,7 +1461,7 @@ public async Task Example_Import_AllParameters_Async() id = 1234, answer = "", source = "", -questions = new List() +questions = new object[] { "" }, @@ -1462,12 +1469,12 @@ public async Task Example_Import_AllParameters_Async() { key = "", }, -activeLearningSuggestions = new List() +activeLearningSuggestions = new object[] { new { clusterHead = "", -suggestedQuestions = new List() +suggestedQuestions = new object[] { new { @@ -1483,12 +1490,12 @@ public async Task Example_Import_AllParameters_Async() } }, }, -activeLearningSuggestions = new List() +activeLearningSuggestions = new object[] { null }, } -}, + }, }, fileUri = "", }); @@ -1573,8 +1580,8 @@ public void Example_UpdateSources_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { op = "add", @@ -1584,13 +1591,14 @@ public void Example_UpdateSources_ShortVersion() sourceKind = "file", }, } -}); + }); Operation> operation = client.UpdateSources(WaitUntil.Completed, "", content); + Pageable responseData = operation.Value; foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); - Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("sourceUri").ToString()); + Console.WriteLine(result.GetProperty("sourceKind").ToString()); } } @@ -1602,8 +1610,8 @@ public async Task Example_UpdateSources_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { op = "add", @@ -1613,13 +1621,14 @@ public async Task Example_UpdateSources_ShortVersion_Async() sourceKind = "file", }, } -}); + }); Operation> operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", content); + AsyncPageable responseData = operation.Value; await foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); - Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("sourceUri").ToString()); + Console.WriteLine(result.GetProperty("sourceKind").ToString()); } } @@ -1631,8 +1640,8 @@ public void Example_UpdateSources_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { op = "add", @@ -1645,16 +1654,17 @@ public void Example_UpdateSources_AllParameters() contentStructureKind = "unstructured", }, } -}); + }); Operation> operation = client.UpdateSources(WaitUntil.Completed, "", content); + Pageable responseData = operation.Value; 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()); + 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()); } } @@ -1666,8 +1676,8 @@ public async Task Example_UpdateSources_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { op = "add", @@ -1680,16 +1690,17 @@ public async Task Example_UpdateSources_AllParameters_Async() contentStructureKind = "unstructured", }, } -}); + }); Operation> operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", content); + AsyncPageable responseData = operation.Value; 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()); + 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()); } } @@ -1701,19 +1712,20 @@ public void Example_UpdateQnas_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { op = "add", value = new object(), } -}); + }); Operation> operation = client.UpdateQnas(WaitUntil.Completed, "", content); + Pageable responseData = operation.Value; foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1725,19 +1737,20 @@ public async Task Example_UpdateQnas_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { op = "add", value = new object(), } -}); + }); Operation> operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", content); + AsyncPageable responseData = operation.Value; await foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1749,8 +1762,8 @@ public void Example_UpdateQnas_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { op = "add", @@ -1759,7 +1772,7 @@ public void Example_UpdateQnas_AllParameters() id = 1234, answer = "", source = "", -questions = new List() +questions = new object[] { "" }, @@ -1770,7 +1783,7 @@ public void Example_UpdateQnas_AllParameters() dialog = new { isContextOnly = true, -prompts = new List() +prompts = new object[] { new { @@ -1780,12 +1793,12 @@ public void Example_UpdateQnas_AllParameters() } }, }, -activeLearningSuggestions = new List() +activeLearningSuggestions = new object[] { new { clusterHead = "", -suggestedQuestions = new List() +suggestedQuestions = new object[] { new { @@ -1798,33 +1811,34 @@ public void Example_UpdateQnas_AllParameters() }, }, } -}); + }); Operation> operation = client.UpdateQnas(WaitUntil.Completed, "", content); + Pageable responseData = operation.Value; 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()); + 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()); } } @@ -1836,8 +1850,8 @@ public async Task Example_UpdateQnas_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { op = "add", @@ -1846,7 +1860,7 @@ public async Task Example_UpdateQnas_AllParameters_Async() id = 1234, answer = "", source = "", -questions = new List() +questions = new object[] { "" }, @@ -1857,7 +1871,7 @@ public async Task Example_UpdateQnas_AllParameters_Async() dialog = new { isContextOnly = true, -prompts = new List() +prompts = new object[] { new { @@ -1867,12 +1881,12 @@ public async Task Example_UpdateQnas_AllParameters_Async() } }, }, -activeLearningSuggestions = new List() +activeLearningSuggestions = new object[] { new { clusterHead = "", -suggestedQuestions = new List() +suggestedQuestions = new object[] { new { @@ -1885,33 +1899,34 @@ public async Task Example_UpdateQnas_AllParameters_Async() }, }, } -}); + }); Operation> operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", content); + AsyncPageable responseData = operation.Value; 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()); + 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()); } } } 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 274e0e7220e97..cd967d9566999 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml @@ -405,6 +405,7 @@ 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. @@ -413,6 +414,7 @@ TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.DeleteUserAsync(""); + Console.WriteLine(response.Status); ]]> @@ -424,6 +426,7 @@ 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. @@ -432,6 +435,7 @@ TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.DeleteUser(""); + Console.WriteLine(response.Status); ]]> @@ -557,8 +561,8 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l await foreach (BinaryData item in client.GetConsortiumMembersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("certificate").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("certificate").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } ]]> This sample shows how to call GetConsortiumMembersAsync with all request content and parse the result. @@ -569,8 +573,8 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l await foreach (BinaryData item in client.GetConsortiumMembersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("certificate").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("certificate").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } ]]> @@ -584,8 +588,8 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l foreach (BinaryData item in client.GetConsortiumMembers()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("certificate").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("certificate").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } ]]> This sample shows how to call GetConsortiumMembers with all request content and parse the result. @@ -596,8 +600,8 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l foreach (BinaryData item in client.GetConsortiumMembers()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("certificate").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("certificate").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } ]]> @@ -611,7 +615,7 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l await foreach (BinaryData item in client.GetCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); } ]]> This sample shows how to call GetCollectionsAsync with all request content and parse the result. @@ -622,7 +626,7 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l await foreach (BinaryData item in client.GetCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); } ]]> @@ -636,7 +640,7 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l foreach (BinaryData item in client.GetCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); } ]]> This sample shows how to call GetCollections with all request content and parse the result. @@ -647,7 +651,7 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l foreach (BinaryData item in client.GetCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); } ]]> @@ -661,7 +665,7 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l await foreach (BinaryData item in client.GetLedgerEntriesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("contents").ToString()); + Console.WriteLine(result.GetProperty("contents").ToString()); } ]]> This sample shows how to call GetLedgerEntriesAsync with all parameters and parse the result. @@ -672,9 +676,9 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l await foreach (BinaryData item in client.GetLedgerEntriesAsync(collectionId: "", fromTransactionId: "", toTransactionId: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("contents").ToString()); - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); - Console.WriteLine(result[0].GetProperty("transactionId").ToString()); + Console.WriteLine(result.GetProperty("contents").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("transactionId").ToString()); } ]]> @@ -688,7 +692,7 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l foreach (BinaryData item in client.GetLedgerEntries()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("contents").ToString()); + Console.WriteLine(result.GetProperty("contents").ToString()); } ]]> This sample shows how to call GetLedgerEntries with all parameters and parse the result. @@ -699,9 +703,9 @@ ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://l foreach (BinaryData item in client.GetLedgerEntries(collectionId: "", fromTransactionId: "", toTransactionId: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("contents").ToString()); - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); - Console.WriteLine(result[0].GetProperty("transactionId").ToString()); + Console.WriteLine(result.GetProperty("contents").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("transactionId").ToString()); } ]]> 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 97bce2689c5a1..b142bbf1fb689 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 @@ -13,9 +13,9 @@ using Azure.Security.ConfidentialLedger.Certificate; using NUnit.Framework; -namespace Azure.Security.ConfidentialLedger.Certificate.Samples +namespace Azure.Security.ConfidentialLedger.Samples { - public class Samples_ConfidentialLedgerCertificateClient + public partial class Samples_ConfidentialLedgerCertificateClient { [Test] [Ignore("Only validating compilation of examples")] 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 b1026f57d4fe1..2dff67cad594e 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 @@ -16,7 +16,7 @@ namespace Azure.Security.ConfidentialLedger.Samples { - public class Samples_ConfidentialLedgerClient + public partial class Samples_ConfidentialLedgerClient { [Test] [Ignore("Only validating compilation of examples")] @@ -464,6 +464,7 @@ public void Example_DeleteUser_ShortVersion() ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.DeleteUser(""); + Console.WriteLine(response.Status); } @@ -475,6 +476,7 @@ public async Task Example_DeleteUser_ShortVersion_Async() ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.DeleteUserAsync(""); + Console.WriteLine(response.Status); } @@ -486,6 +488,7 @@ public void Example_DeleteUser_AllParameters() ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.DeleteUser(""); + Console.WriteLine(response.Status); } @@ -497,6 +500,7 @@ public async Task Example_DeleteUser_AllParameters_Async() ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.DeleteUserAsync(""); + Console.WriteLine(response.Status); } @@ -634,8 +638,8 @@ public void Example_GetConsortiumMembers_ShortVersion() foreach (BinaryData item in client.GetConsortiumMembers()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("certificate").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("certificate").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } } @@ -649,8 +653,8 @@ public async Task Example_GetConsortiumMembers_ShortVersion_Async() await foreach (BinaryData item in client.GetConsortiumMembersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("certificate").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("certificate").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } } @@ -664,8 +668,8 @@ public void Example_GetConsortiumMembers_AllParameters() foreach (BinaryData item in client.GetConsortiumMembers()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("certificate").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("certificate").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } } @@ -679,8 +683,8 @@ public async Task Example_GetConsortiumMembers_AllParameters_Async() await foreach (BinaryData item in client.GetConsortiumMembersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("certificate").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("certificate").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } } @@ -694,7 +698,7 @@ public void Example_GetCollections_ShortVersion() foreach (BinaryData item in client.GetCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); } } @@ -708,7 +712,7 @@ public async Task Example_GetCollections_ShortVersion_Async() await foreach (BinaryData item in client.GetCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); } } @@ -722,7 +726,7 @@ public void Example_GetCollections_AllParameters() foreach (BinaryData item in client.GetCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); } } @@ -736,7 +740,7 @@ public async Task Example_GetCollections_AllParameters_Async() await foreach (BinaryData item in client.GetCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); } } @@ -750,7 +754,7 @@ public void Example_GetLedgerEntries_ShortVersion() foreach (BinaryData item in client.GetLedgerEntries()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("contents").ToString()); + Console.WriteLine(result.GetProperty("contents").ToString()); } } @@ -764,7 +768,7 @@ public async Task Example_GetLedgerEntries_ShortVersion_Async() await foreach (BinaryData item in client.GetLedgerEntriesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("contents").ToString()); + Console.WriteLine(result.GetProperty("contents").ToString()); } } @@ -778,9 +782,9 @@ public void Example_GetLedgerEntries_AllParameters() foreach (BinaryData item in client.GetLedgerEntries(collectionId: "", fromTransactionId: "", toTransactionId: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("contents").ToString()); - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); - Console.WriteLine(result[0].GetProperty("transactionId").ToString()); + Console.WriteLine(result.GetProperty("contents").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("transactionId").ToString()); } } @@ -794,9 +798,9 @@ public async Task Example_GetLedgerEntries_AllParameters_Async() await foreach (BinaryData item in client.GetLedgerEntriesAsync(collectionId: "", fromTransactionId: "", toTransactionId: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("contents").ToString()); - Console.WriteLine(result[0].GetProperty("collectionId").ToString()); - Console.WriteLine(result[0].GetProperty("transactionId").ToString()); + Console.WriteLine(result.GetProperty("contents").ToString()); + Console.WriteLine(result.GetProperty("collectionId").ToString()); + Console.WriteLine(result.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 2c98dc8875b26..c8be628993a0b 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml @@ -20,14 +20,8 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); AnalyzeTextOptions body = new AnalyzeTextOptions("") { - Categories = - { - TextCategory.Hate - }, - BlocklistNames = - { - "" - }, + Categories = { TextCategory.Hate }, + BlocklistNames = { "" }, BreakByBlocklists = true, }; Response response = await client.AnalyzeTextAsync(body); @@ -52,14 +46,8 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); AnalyzeTextOptions body = new AnalyzeTextOptions("") { - Categories = - { - TextCategory.Hate - }, - BlocklistNames = - { - "" - }, + Categories = { TextCategory.Hate }, + BlocklistNames = { "" }, BreakByBlocklists = true, }; Response response = client.AnalyzeText(body); @@ -82,6 +70,15 @@ Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> +This sample shows how to call AnalyzeTextAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeTextOptions body = new AnalyzeTextOptions(""); +Response response = await client.AnalyzeTextAsync(body); +]]> This sample shows how to call AnalyzeTextAsync with all request content and parse the result. "); @@ -91,11 +88,11 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); RequestContent content = RequestContent.Create(new { text = "", - categories = new List() + categories = new object[] { "Hate" }, - blocklistNames = new List() + blocklistNames = new object[] { "" }, @@ -117,6 +114,20 @@ 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 AnalyzeTextAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeTextOptions body = new AnalyzeTextOptions("") +{ + Categories = { TextCategory.Hate }, + BlocklistNames = { "" }, + BreakByBlocklists = true, +}; +Response response = await client.AnalyzeTextAsync(body); ]]> @@ -136,6 +147,15 @@ Response response = client.AnalyzeText(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> +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 request content and parse the result. "); @@ -145,11 +165,11 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); RequestContent content = RequestContent.Create(new { text = "", - categories = new List() + categories = new object[] { "Hate" }, - blocklistNames = new List() + blocklistNames = new object[] { "" }, @@ -171,6 +191,20 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeTextOptions body = new AnalyzeTextOptions("") +{ + Categories = { TextCategory.Hate }, + BlocklistNames = { "" }, + BreakByBlocklists = true, +}; +Response response = client.AnalyzeText(body); ]]> @@ -190,16 +224,13 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData() +AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData { Content = BinaryData.FromObjectAsJson(new object()), BlobUrl = new Uri("http://localhost:3000"), }) { - Categories = - { - ImageCategory.Hate - }, + Categories = { ImageCategory.Hate }, }; Response response = await client.AnalyzeImageAsync(body); ]]> @@ -221,16 +252,13 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData() +AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData { Content = BinaryData.FromObjectAsJson(new object()), BlobUrl = new Uri("http://localhost:3000"), }) { - Categories = - { - ImageCategory.Hate - }, + Categories = { ImageCategory.Hate }, }; Response response = client.AnalyzeImage(body); ]]> @@ -252,6 +280,15 @@ Response response = await client.AnalyzeImageAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> +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 request content and parse the result. "); @@ -265,7 +302,7 @@ RequestContent content = RequestContent.Create(new content = new object(), blobUrl = "http://localhost:3000", }, - categories = new List() + categories = new object[] { "Hate" }, @@ -281,6 +318,22 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData +{ + Content = BinaryData.FromObjectAsJson(new object()), + BlobUrl = new Uri("http://localhost:3000"), +}) +{ + Categories = { ImageCategory.Hate }, +}; +Response response = await client.AnalyzeImageAsync(body); ]]> @@ -300,6 +353,15 @@ Response response = client.AnalyzeImage(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> +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 request content and parse the result. "); @@ -313,7 +375,7 @@ RequestContent content = RequestContent.Create(new content = new object(), blobUrl = "http://localhost:3000", }, - categories = new List() + categories = new object[] { "Hate" }, @@ -329,6 +391,22 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData +{ + Content = BinaryData.FromObjectAsJson(new object()), + BlobUrl = new Uri("http://localhost:3000"), +}) +{ + Categories = { ImageCategory.Hate }, +}; +Response response = client.AnalyzeImage(body); ]]> @@ -382,6 +460,14 @@ Response response = await client.GetTextBlocklistAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); ]]> +This sample shows how to call GetTextBlocklistAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.GetTextBlocklistAsync(""); +]]> This sample shows how to call GetTextBlocklistAsync with all parameters and parse the result. "); @@ -393,6 +479,14 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.GetTextBlocklistAsync(""); ]]> @@ -408,6 +502,14 @@ Response response = client.GetTextBlocklist("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); ]]> +This sample shows how to call GetTextBlocklist. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = client.GetTextBlocklist(""); +]]> This sample shows how to call GetTextBlocklist with all parameters and parse the result. "); @@ -419,6 +521,14 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = client.GetTextBlocklist(""); ]]> @@ -500,6 +610,7 @@ 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. @@ -509,6 +620,7 @@ AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = await client.DeleteTextBlocklistAsync(""); + Console.WriteLine(response.Status); ]]> @@ -521,6 +633,7 @@ 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. @@ -530,6 +643,7 @@ AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = client.DeleteTextBlocklist(""); + Console.WriteLine(response.Status); ]]> @@ -541,7 +655,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] { new TextBlockItemInfo("") }); @@ -553,7 +667,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] { new TextBlockItemInfo("") { @@ -571,7 +685,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] { new TextBlockItemInfo("") }); @@ -583,7 +697,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] { new TextBlockItemInfo("") { @@ -603,7 +717,7 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - blockItems = new List() + blockItems = new object[] { new { @@ -616,6 +730,18 @@ Response response = await client.AddBlockItemsAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> +This sample shows how to call AddBlockItemsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] +{ + new TextBlockItemInfo("") +}); +Response response = await client.AddBlockItemsAsync("", addBlockItemsOptions); +]]> This sample shows how to call AddBlockItemsAsync with all parameters and request content and parse the result. "); @@ -624,7 +750,7 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - blockItems = new List() + blockItems = new object[] { new { @@ -639,6 +765,21 @@ 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 AddBlockItemsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] +{ + new TextBlockItemInfo("") + { + Description = "", + } +}); +Response response = await client.AddBlockItemsAsync("", addBlockItemsOptions); ]]> @@ -651,7 +792,7 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - blockItems = new List() + blockItems = new object[] { new { @@ -664,6 +805,18 @@ Response response = client.AddBlockItems("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> +This sample shows how to call AddBlockItems. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] +{ + new TextBlockItemInfo("") +}); +Response response = client.AddBlockItems("", addBlockItemsOptions); +]]> This sample shows how to call AddBlockItems with all parameters and request content and parse the result. "); @@ -672,7 +825,7 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - blockItems = new List() + blockItems = new object[] { new { @@ -687,6 +840,21 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] +{ + new TextBlockItemInfo("") + { + Description = "", + } +}); +Response response = client.AddBlockItems("", addBlockItemsOptions); ]]> @@ -697,12 +865,8 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() -{ - "" -}); +RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] { "" }); 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() -{ - "" -}); +RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] { "" }); Response response = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); -Console.WriteLine(response.Status); ]]> @@ -726,12 +886,8 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() -{ - "" -}); +RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] { "" }); 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() -{ - "" -}); +RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] { "" }); Response response = client.RemoveBlockItems("", removeBlockItemsOptions); -Console.WriteLine(response.Status); ]]> @@ -757,14 +909,24 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - blockItemIds = new List() + blockItemIds = new object[] { "" }, }); Response response = await client.RemoveBlockItemsAsync("", content); + Console.WriteLine(response.Status); ]]> +This sample shows how to call RemoveBlockItemsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] { "" }); +Response response = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); +]]> This sample shows how to call RemoveBlockItemsAsync with all parameters and request content. "); @@ -773,13 +935,23 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - blockItemIds = new List() + blockItemIds = new object[] { "" }, }); Response response = await client.RemoveBlockItemsAsync("", content); + 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 string[] { "" }); +Response response = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); ]]> @@ -792,14 +964,24 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - blockItemIds = new List() + blockItemIds = new object[] { "" }, }); Response response = client.RemoveBlockItems("", content); + Console.WriteLine(response.Status); ]]> +This sample shows how to call RemoveBlockItems. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] { "" }); +Response response = client.RemoveBlockItems("", removeBlockItemsOptions); +]]> This sample shows how to call RemoveBlockItems with all parameters and request content. "); @@ -808,13 +990,23 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - blockItemIds = new List() + blockItemIds = new object[] { "" }, }); Response response = client.RemoveBlockItems("", content); + 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 string[] { "" }); +Response response = client.RemoveBlockItems("", removeBlockItemsOptions); ]]> @@ -869,6 +1061,14 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blockItemId").ToString()); Console.WriteLine(result.GetProperty("text").ToString()); ]]> +This sample shows how to call GetTextBlocklistItemAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.GetTextBlocklistItemAsync("", ""); +]]> This sample shows how to call GetTextBlocklistItemAsync with all parameters and parse the result. "); @@ -881,6 +1081,14 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.GetTextBlocklistItemAsync("", ""); ]]> @@ -897,6 +1105,14 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blockItemId").ToString()); Console.WriteLine(result.GetProperty("text").ToString()); ]]> +This sample shows how to call GetTextBlocklistItem. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = client.GetTextBlocklistItem("", ""); +]]> This sample shows how to call GetTextBlocklistItem with all parameters and parse the result. "); @@ -909,6 +1125,14 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = client.GetTextBlocklistItem("", ""); ]]> @@ -968,7 +1192,17 @@ 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.GetProperty("blocklistName").ToString()); +} +]]> +This sample shows how to call GetTextBlocklistsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +await foreach (TextBlocklist item in client.GetTextBlocklistsAsync()) +{ } ]]> This sample shows how to call GetTextBlocklistsAsync with all parameters and parse the result. @@ -980,8 +1214,18 @@ 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()); + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); +} +]]> +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()) +{ } ]]> @@ -996,7 +1240,17 @@ 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.GetProperty("blocklistName").ToString()); +} +]]> +This sample shows how to call GetTextBlocklists. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +foreach (TextBlocklist item in client.GetTextBlocklists()) +{ } ]]> This sample shows how to call GetTextBlocklists with all parameters and parse the result. @@ -1008,8 +1262,18 @@ 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()); + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); +} +]]> +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()) +{ } ]]> @@ -1070,8 +1334,18 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); - Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); +} +]]> +This sample shows how to call GetTextBlocklistItemsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +await foreach (TextBlockItem item in client.GetTextBlocklistItemsAsync("")) +{ } ]]> This sample shows how to call GetTextBlocklistItemsAsync with all parameters and parse the result. @@ -1083,9 +1357,19 @@ 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()); + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); +} +]]> +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)) +{ } ]]> @@ -1100,8 +1384,18 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); foreach (BinaryData item in client.GetTextBlocklistItems("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); - Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); +} +]]> +This sample shows how to call GetTextBlocklistItems. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +foreach (TextBlockItem item in client.GetTextBlocklistItems("")) +{ } ]]> This sample shows how to call GetTextBlocklistItems with all parameters and parse the result. @@ -1113,9 +1407,19 @@ 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()); + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); +} +]]> +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)) +{ } ]]> 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 14b5819a3d48c..020ba2c95eb5e 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.AI.ContentSafety.Samples { - public class Samples_ContentSafetyClient + public partial class Samples_ContentSafetyClient { [Test] [Ignore("Only validating compilation of examples")] @@ -90,14 +89,14 @@ public void Example_AnalyzeText_AllParameters() RequestContent content = RequestContent.Create(new { text = "", - categories = new List() -{ + categories = new object[] + { "Hate" -}, - blocklistNames = new List() -{ + }, + blocklistNames = new object[] + { "" -}, + }, breakByBlocklists = true, }); Response response = client.AnalyzeText(content); @@ -129,14 +128,14 @@ public async Task Example_AnalyzeText_AllParameters_Async() RequestContent content = RequestContent.Create(new { text = "", - categories = new List() -{ + categories = new object[] + { "Hate" -}, - blocklistNames = new List() -{ + }, + blocklistNames = new object[] + { "" -}, + }, breakByBlocklists = true, }); Response response = await client.AnalyzeTextAsync(content); @@ -167,14 +166,8 @@ public void Example_AnalyzeText_AllParameters_Convenience() AnalyzeTextOptions body = new AnalyzeTextOptions("") { - Categories = -{ -TextCategory.Hate -}, - BlocklistNames = -{ -"" -}, + Categories = { TextCategory.Hate }, + BlocklistNames = { "" }, BreakByBlocklists = true, }; Response response = client.AnalyzeText(body); @@ -190,14 +183,8 @@ public async Task Example_AnalyzeText_AllParameters_Convenience_Async() AnalyzeTextOptions body = new AnalyzeTextOptions("") { - Categories = -{ -TextCategory.Hate -}, - BlocklistNames = -{ -"" -}, + Categories = { TextCategory.Hate }, + BlocklistNames = { "" }, BreakByBlocklists = true, }; Response response = await client.AnalyzeTextAsync(body); @@ -278,10 +265,10 @@ public void Example_AnalyzeImage_AllParameters() content = new object(), blobUrl = "http://localhost:3000", }, - categories = new List() -{ + categories = new object[] + { "Hate" -}, + }, }); Response response = client.AnalyzeImage(content); @@ -311,10 +298,10 @@ public async Task Example_AnalyzeImage_AllParameters_Async() content = new object(), blobUrl = "http://localhost:3000", }, - categories = new List() -{ + categories = new object[] + { "Hate" -}, + }, }); Response response = await client.AnalyzeImageAsync(content); @@ -337,16 +324,13 @@ public void Example_AnalyzeImage_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData() + AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData { Content = BinaryData.FromObjectAsJson(new object()), BlobUrl = new Uri("http://localhost:3000"), }) { - Categories = -{ -ImageCategory.Hate -}, + Categories = { ImageCategory.Hate }, }; Response response = client.AnalyzeImage(body); } @@ -359,16 +343,13 @@ public async Task Example_AnalyzeImage_AllParameters_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData() + AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData { Content = BinaryData.FromObjectAsJson(new object()), BlobUrl = new Uri("http://localhost:3000"), }) { - Categories = -{ -ImageCategory.Hate -}, + Categories = { ImageCategory.Hate }, }; Response response = await client.AnalyzeImageAsync(body); } @@ -560,6 +541,7 @@ public void Example_DeleteTextBlocklist_ShortVersion() ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = client.DeleteTextBlocklist(""); + Console.WriteLine(response.Status); } @@ -572,6 +554,7 @@ public async Task Example_DeleteTextBlocklist_ShortVersion_Async() ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = await client.DeleteTextBlocklistAsync(""); + Console.WriteLine(response.Status); } @@ -584,6 +567,7 @@ public void Example_DeleteTextBlocklist_AllParameters() ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = client.DeleteTextBlocklist(""); + Console.WriteLine(response.Status); } @@ -596,6 +580,7 @@ public async Task Example_DeleteTextBlocklist_AllParameters_Async() ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = await client.DeleteTextBlocklistAsync(""); + Console.WriteLine(response.Status); } @@ -609,13 +594,13 @@ public void Example_AddBlockItems_ShortVersion() RequestContent content = RequestContent.Create(new { - blockItems = new List() -{ + blockItems = new object[] + { new { text = "", } -}, + }, }); Response response = client.AddBlockItems("", content); @@ -633,13 +618,13 @@ public async Task Example_AddBlockItems_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - blockItems = new List() -{ + blockItems = new object[] + { new { text = "", } -}, + }, }); Response response = await client.AddBlockItemsAsync("", content); @@ -655,10 +640,10 @@ public void Example_AddBlockItems_ShortVersion_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() -{ + AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] + { new TextBlockItemInfo("") -}); + }); Response response = client.AddBlockItems("", addBlockItemsOptions); } @@ -670,10 +655,10 @@ public async Task Example_AddBlockItems_ShortVersion_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() -{ + AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] + { new TextBlockItemInfo("") -}); + }); Response response = await client.AddBlockItemsAsync("", addBlockItemsOptions); } @@ -687,14 +672,14 @@ public void Example_AddBlockItems_AllParameters() RequestContent content = RequestContent.Create(new { - blockItems = new List() -{ + blockItems = new object[] + { new { description = "", text = "", } -}, + }, }); Response response = client.AddBlockItems("", content); @@ -714,14 +699,14 @@ public async Task Example_AddBlockItems_AllParameters_Async() RequestContent content = RequestContent.Create(new { - blockItems = new List() -{ + blockItems = new object[] + { new { description = "", text = "", } -}, + }, }); Response response = await client.AddBlockItemsAsync("", content); @@ -739,13 +724,13 @@ public void Example_AddBlockItems_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() -{ + AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] + { new TextBlockItemInfo("") { Description = "", } -}); + }); Response response = client.AddBlockItems("", addBlockItemsOptions); } @@ -757,13 +742,13 @@ public async Task Example_AddBlockItems_AllParameters_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() -{ + AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] + { new TextBlockItemInfo("") { Description = "", } -}); + }); Response response = await client.AddBlockItemsAsync("", addBlockItemsOptions); } @@ -777,12 +762,13 @@ public void Example_RemoveBlockItems_ShortVersion() RequestContent content = RequestContent.Create(new { - blockItemIds = new List() -{ + blockItemIds = new object[] + { "" -}, + }, }); Response response = client.RemoveBlockItems("", content); + Console.WriteLine(response.Status); } @@ -796,12 +782,13 @@ public async Task Example_RemoveBlockItems_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - blockItemIds = new List() -{ + blockItemIds = new object[] + { "" -}, + }, }); Response response = await client.RemoveBlockItemsAsync("", content); + Console.WriteLine(response.Status); } @@ -813,12 +800,8 @@ public void Example_RemoveBlockItems_ShortVersion_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() -{ -"" -}); + RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] { "" }); Response response = client.RemoveBlockItems("", removeBlockItemsOptions); - Console.WriteLine(response.Status); } [Test] @@ -829,12 +812,8 @@ public async Task Example_RemoveBlockItems_ShortVersion_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() -{ -"" -}); + RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] { "" }); Response response = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); - Console.WriteLine(response.Status); } [Test] @@ -847,12 +826,13 @@ public void Example_RemoveBlockItems_AllParameters() RequestContent content = RequestContent.Create(new { - blockItemIds = new List() -{ + blockItemIds = new object[] + { "" -}, + }, }); Response response = client.RemoveBlockItems("", content); + Console.WriteLine(response.Status); } @@ -866,12 +846,13 @@ public async Task Example_RemoveBlockItems_AllParameters_Async() RequestContent content = RequestContent.Create(new { - blockItemIds = new List() -{ + blockItemIds = new object[] + { "" -}, + }, }); Response response = await client.RemoveBlockItemsAsync("", content); + Console.WriteLine(response.Status); } @@ -883,12 +864,8 @@ public void Example_RemoveBlockItems_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() -{ -"" -}); + RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] { "" }); Response response = client.RemoveBlockItems("", removeBlockItemsOptions); - Console.WriteLine(response.Status); } [Test] @@ -899,12 +876,8 @@ public async Task Example_RemoveBlockItems_AllParameters_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() -{ -"" -}); + RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] { "" }); Response response = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); - Console.WriteLine(response.Status); } [Test] @@ -1024,7 +997,7 @@ public void Example_GetTextBlocklists_ShortVersion() foreach (BinaryData item in client.GetTextBlocklists(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("blocklistName").ToString()); + Console.WriteLine(result.GetProperty("blocklistName").ToString()); } } @@ -1039,7 +1012,7 @@ public async Task Example_GetTextBlocklists_ShortVersion_Async() 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.GetProperty("blocklistName").ToString()); } } @@ -1080,8 +1053,8 @@ public void Example_GetTextBlocklists_AllParameters() 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()); + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } } @@ -1096,8 +1069,8 @@ public async Task Example_GetTextBlocklists_AllParameters_Async() 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()); + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } } @@ -1138,8 +1111,8 @@ public void Example_GetTextBlocklistItems_ShortVersion() foreach (BinaryData item in client.GetTextBlocklistItems("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); - Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); } } @@ -1154,8 +1127,8 @@ public async Task Example_GetTextBlocklistItems_ShortVersion_Async() await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); - Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); } } @@ -1196,9 +1169,9 @@ public void Example_GetTextBlocklistItems_AllParameters() 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()); + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); } } @@ -1213,9 +1186,9 @@ public async Task Example_GetTextBlocklistItems_AllParameters_Async() 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()); + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DeploymentEnvironmentsClient.xml b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DeploymentEnvironmentsClient.xml index 73a59f9f03f15..a64f4a2643f4a 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DeploymentEnvironmentsClient.xml +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DeploymentEnvironmentsClient.xml @@ -15,7 +15,6 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetEnvironmentAsync with all parameters and parse the result. This sample shows how to call GetEnvironment with all parameters and parse the result. ")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("environmentType").ToString()); - Console.WriteLine(result[0].GetProperty("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("environmentType").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); } ]]> This sample shows how to call GetAllEnvironmentsAsync with all parameters and parse the result. @@ -233,17 +230,17 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetAllEnvironmentsAsync("", maxCount: 1234)) { 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("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").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("parameters").ToString()); + 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("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").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("parameters").ToString()); } ]]> @@ -258,10 +255,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetAllEnvironments("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("environmentType").ToString()); - Console.WriteLine(result[0].GetProperty("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("environmentType").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); } ]]> This sample shows how to call GetAllEnvironments with all parameters and parse the result. @@ -273,17 +269,17 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetAllEnvironments("", maxCount: 1234)) { 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("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").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("parameters").ToString()); + 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("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").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("parameters").ToString()); } ]]> @@ -298,10 +294,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetEnvironmentsAsync("", "me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("environmentType").ToString()); - Console.WriteLine(result[0].GetProperty("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("environmentType").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); } ]]> This sample shows how to call GetEnvironmentsAsync with all parameters and parse the result. @@ -313,17 +308,17 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetEnvironmentsAsync("", "me", maxCount: 1234)) { 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("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").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("parameters").ToString()); + 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("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").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("parameters").ToString()); } ]]> @@ -338,10 +333,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetEnvironments("", "me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("environmentType").ToString()); - Console.WriteLine(result[0].GetProperty("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("environmentType").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); } ]]> This sample shows how to call GetEnvironments with all parameters and parse the result. @@ -353,17 +347,17 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetEnvironments("", "me", maxCount: 1234)) { 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("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").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("parameters").ToString()); + 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("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").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("parameters").ToString()); } ]]> @@ -378,7 +372,7 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetCatalogsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> This sample shows how to call GetCatalogsAsync with all parameters and parse the result. @@ -390,7 +384,7 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetCatalogsAsync("", maxCount: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -405,7 +399,7 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetCatalogs("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> This sample shows how to call GetCatalogs with all parameters and parse the result. @@ -417,7 +411,7 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetCatalogs("", maxCount: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -432,9 +426,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync("")) { 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()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); } ]]> This sample shows how to call GetEnvironmentDefinitionsAsync with all parameters and parse the result. @@ -446,20 +440,20 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync("", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("description").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("parametersSchema").ToString()); - Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("description").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("parametersSchema").ToString()); + Console.WriteLine(result.GetProperty("templatePath").ToString()); } ]]> @@ -474,9 +468,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetEnvironmentDefinitions("")) { 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()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); } ]]> This sample shows how to call GetEnvironmentDefinitions with all parameters and parse the result. @@ -488,20 +482,20 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetEnvironmentDefinitions("", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("description").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("parametersSchema").ToString()); - Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("description").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("parametersSchema").ToString()); + Console.WriteLine(result.GetProperty("templatePath").ToString()); } ]]> @@ -516,9 +510,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("", "")) { 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()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); } ]]> This sample shows how to call GetEnvironmentDefinitionsByCatalogAsync with all parameters and parse the result. @@ -530,20 +524,20 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("", "", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("description").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("parametersSchema").ToString()); - Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("description").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("parametersSchema").ToString()); + Console.WriteLine(result.GetProperty("templatePath").ToString()); } ]]> @@ -558,9 +552,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("", "")) { 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()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); } ]]> This sample shows how to call GetEnvironmentDefinitionsByCatalog with all parameters and parse the result. @@ -572,20 +566,20 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("", "", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("description").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("parametersSchema").ToString()); - Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("description").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("parametersSchema").ToString()); + Console.WriteLine(result.GetProperty("templatePath").ToString()); } ]]> @@ -600,9 +594,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetEnvironmentTypesAsync("")) { 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()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } ]]> This sample shows how to call GetEnvironmentTypesAsync with all parameters and parse the result. @@ -614,9 +608,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, await foreach (BinaryData item in client.GetEnvironmentTypesAsync("", maxCount: 1234)) { 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()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } ]]> @@ -631,9 +625,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetEnvironmentTypes("")) { 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()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } ]]> This sample shows how to call GetEnvironmentTypes with all parameters and parse the result. @@ -645,9 +639,9 @@ DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, foreach (BinaryData item in client.GetEnvironmentTypes("", maxCount: 1234)) { 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()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } ]]> @@ -672,7 +666,6 @@ JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateOrUpdateEnvironmentAsync with all parameters and request content and parse the result. This sample shows how to call CreateOrUpdateEnvironment with all parameters and request content and parse the result. ", "me", "", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call SkipActionAsync with all parameters. @@ -383,6 +384,7 @@ TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); Response response = await client.SkipActionAsync("", "me", "", ""); + Console.WriteLine(response.Status); ]]> @@ -395,6 +397,7 @@ TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); Response response = client.SkipAction("", "me", "", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call SkipAction with all parameters. @@ -404,6 +407,7 @@ TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); Response response = client.SkipAction("", "me", "", ""); + Console.WriteLine(response.Status); ]]> @@ -480,9 +484,9 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetPoolsAsync("")) { 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("healthStatus").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("healthStatus").ToString()); } ]]> This sample shows how to call GetPoolsAsync with all parameters and parse the result. @@ -494,23 +498,23 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetPoolsAsync("", filter: "", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("stopOnDisconnect").GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); - Console.WriteLine(result[0].GetProperty("healthStatus").ToString()); + 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.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); + Console.WriteLine(result.GetProperty("healthStatus").ToString()); } ]]> @@ -525,9 +529,9 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetPools("")) { 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("healthStatus").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("healthStatus").ToString()); } ]]> This sample shows how to call GetPools with all parameters and parse the result. @@ -539,23 +543,23 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetPools("", filter: "", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("stopOnDisconnect").GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); - Console.WriteLine(result[0].GetProperty("healthStatus").ToString()); + 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.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); + Console.WriteLine(result.GetProperty("healthStatus").ToString()); } ]]> @@ -570,11 +574,11 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetSchedulesAsync("", "")) { 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()); + 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()); } ]]> This sample shows how to call GetSchedulesAsync with all parameters and parse the result. @@ -586,11 +590,11 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetSchedulesAsync("", "", filter: "", maxCount: 1234)) { 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()); + 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()); } ]]> @@ -605,11 +609,11 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetSchedules("", "")) { 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()); + 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()); } ]]> This sample shows how to call GetSchedules with all parameters and parse the result. @@ -621,11 +625,11 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetSchedules("", "", filter: "", maxCount: 1234)) { 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()); + 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()); } ]]> @@ -640,7 +644,7 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllDevBoxesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } ]]> This sample shows how to call GetAllDevBoxesAsync with all parameters and parse the result. @@ -652,31 +656,31 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllDevBoxesAsync(filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } ]]> @@ -691,7 +695,7 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetAllDevBoxes()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } ]]> This sample shows how to call GetAllDevBoxes with all parameters and parse the result. @@ -703,31 +707,31 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetAllDevBoxes(filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } ]]> @@ -742,7 +746,7 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } ]]> This sample shows how to call GetAllDevBoxesByUserAsync with all parameters and parse the result. @@ -754,31 +758,31 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("me", filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } ]]> @@ -793,7 +797,7 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetAllDevBoxesByUser("me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } ]]> This sample shows how to call GetAllDevBoxesByUser with all parameters and parse the result. @@ -805,31 +809,31 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetAllDevBoxesByUser("me", filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } ]]> @@ -844,7 +848,7 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetDevBoxesAsync("", "me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } ]]> This sample shows how to call GetDevBoxesAsync with all parameters and parse the result. @@ -856,31 +860,31 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetDevBoxesAsync("", "me", filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } ]]> @@ -895,7 +899,7 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetDevBoxes("", "me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } ]]> This sample shows how to call GetDevBoxes with all parameters and parse the result. @@ -907,31 +911,31 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetDevBoxes("", "me", filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } ]]> @@ -946,9 +950,9 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetActionsAsync("", "me", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); } ]]> This sample shows how to call GetActionsAsync with all parameters and parse the result. @@ -960,11 +964,11 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.GetActionsAsync("", "me", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("sourceId").ToString()); - Console.WriteLine(result[0].GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result[0].GetProperty("next").GetProperty("scheduledTime").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); + Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); } ]]> @@ -979,9 +983,9 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetActions("", "me", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); } ]]> This sample shows how to call GetActions with all parameters and parse the result. @@ -993,11 +997,11 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.GetActions("", "me", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("sourceId").ToString()); - Console.WriteLine(result[0].GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result[0].GetProperty("next").GetProperty("scheduledTime").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); + Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); } ]]> @@ -1012,8 +1016,8 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.DelayAllActionsAsync("", "me", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("result").ToString()); } ]]> This sample shows how to call DelayAllActionsAsync with all parameters and parse the result. @@ -1025,16 +1029,16 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); await foreach (BinaryData item in client.DelayAllActionsAsync("", "me", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("result").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("sourceId").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("next").GetProperty("scheduledTime").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.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("suspendedUntil").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("next").GetProperty("scheduledTime").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()); } ]]> @@ -1049,8 +1053,8 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.DelayAllActions("", "me", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("result").ToString()); } ]]> This sample shows how to call DelayAllActions with all parameters and parse the result. @@ -1062,16 +1066,16 @@ DevBoxesClient client = new DevBoxesClient(endpoint, credential); foreach (BinaryData item in client.DelayAllActions("", "me", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("result").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("sourceId").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("next").GetProperty("scheduledTime").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.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("suspendedUntil").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("next").GetProperty("scheduledTime").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()); } ]]> 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 5e4cb6bb4a464..1420f300bac8e 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevCenterClient.xml +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevCenterClient.xml @@ -66,7 +66,7 @@ DevCenterClient client = new DevCenterClient(endpoint, credential); await foreach (BinaryData item in client.GetProjectsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> This sample shows how to call GetProjectsAsync with all parameters and parse the result. @@ -78,9 +78,9 @@ DevCenterClient client = new DevCenterClient(endpoint, credential); await foreach (BinaryData item in client.GetProjectsAsync(filter: "", maxCount: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("maxDevBoxesPerUser").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); } ]]> @@ -95,7 +95,7 @@ DevCenterClient client = new DevCenterClient(endpoint, credential); foreach (BinaryData item in client.GetProjects()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> This sample shows how to call GetProjects with all parameters and parse the result. @@ -107,9 +107,9 @@ DevCenterClient client = new DevCenterClient(endpoint, credential); foreach (BinaryData item in client.GetProjects(filter: "", maxCount: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("maxDevBoxesPerUser").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); } ]]> diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs index 395b9ad529d96..38be41796ee5a 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs @@ -16,7 +16,7 @@ namespace Azure.Developer.DevCenter.Samples { - public class Samples_DeploymentEnvironmentsClient + public partial class Samples_DeploymentEnvironmentsClient { [Test] [Ignore("Only validating compilation of examples")] @@ -32,7 +32,6 @@ public void Example_GetEnvironment_ShortVersion() Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -49,7 +48,6 @@ public async Task Example_GetEnvironment_ShortVersion_Async() Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -253,10 +251,9 @@ public void Example_GetAllEnvironments_ShortVersion() foreach (BinaryData item in client.GetAllEnvironments("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("environmentType").ToString()); - Console.WriteLine(result[0].GetProperty("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("environmentType").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); } } @@ -271,10 +268,9 @@ public async Task Example_GetAllEnvironments_ShortVersion_Async() await foreach (BinaryData item in client.GetAllEnvironmentsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("environmentType").ToString()); - Console.WriteLine(result[0].GetProperty("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("environmentType").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); } } @@ -289,17 +285,17 @@ public void Example_GetAllEnvironments_AllParameters() foreach (BinaryData item in client.GetAllEnvironments("", maxCount: 1234)) { 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("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").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("parameters").ToString()); + 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("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").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("parameters").ToString()); } } @@ -314,17 +310,17 @@ public async Task Example_GetAllEnvironments_AllParameters_Async() await foreach (BinaryData item in client.GetAllEnvironmentsAsync("", maxCount: 1234)) { 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("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").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("parameters").ToString()); + 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("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").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("parameters").ToString()); } } @@ -339,10 +335,9 @@ public void Example_GetEnvironments_ShortVersion() foreach (BinaryData item in client.GetEnvironments("", "me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("environmentType").ToString()); - Console.WriteLine(result[0].GetProperty("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("environmentType").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); } } @@ -357,10 +352,9 @@ public async Task Example_GetEnvironments_ShortVersion_Async() await foreach (BinaryData item in client.GetEnvironmentsAsync("", "me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("environmentType").ToString()); - Console.WriteLine(result[0].GetProperty("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("environmentType").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); } } @@ -375,17 +369,17 @@ public void Example_GetEnvironments_AllParameters() foreach (BinaryData item in client.GetEnvironments("", "me", maxCount: 1234)) { 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("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").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("parameters").ToString()); + 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("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").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("parameters").ToString()); } } @@ -400,17 +394,17 @@ public async Task Example_GetEnvironments_AllParameters_Async() await foreach (BinaryData item in client.GetEnvironmentsAsync("", "me", maxCount: 1234)) { 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("catalogName").ToString()); - Console.WriteLine(result[0].GetProperty("environmentDefinitionName").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("parameters").ToString()); + 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("catalogName").ToString()); + Console.WriteLine(result.GetProperty("environmentDefinitionName").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("parameters").ToString()); } } @@ -425,7 +419,7 @@ public void Example_GetCatalogs_ShortVersion() foreach (BinaryData item in client.GetCatalogs("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -440,7 +434,7 @@ public async Task Example_GetCatalogs_ShortVersion_Async() await foreach (BinaryData item in client.GetCatalogsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -455,7 +449,7 @@ public void Example_GetCatalogs_AllParameters() foreach (BinaryData item in client.GetCatalogs("", maxCount: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -470,7 +464,7 @@ public async Task Example_GetCatalogs_AllParameters_Async() await foreach (BinaryData item in client.GetCatalogsAsync("", maxCount: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -485,9 +479,9 @@ public void Example_GetEnvironmentDefinitions_ShortVersion() foreach (BinaryData item in client.GetEnvironmentDefinitions("")) { 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()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); } } @@ -502,9 +496,9 @@ public async Task Example_GetEnvironmentDefinitions_ShortVersion_Async() await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync("")) { 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()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); } } @@ -519,20 +513,20 @@ public void Example_GetEnvironmentDefinitions_AllParameters() foreach (BinaryData item in client.GetEnvironmentDefinitions("", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("description").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("parametersSchema").ToString()); - Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("description").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("parametersSchema").ToString()); + Console.WriteLine(result.GetProperty("templatePath").ToString()); } } @@ -547,20 +541,20 @@ public async Task Example_GetEnvironmentDefinitions_AllParameters_Async() await foreach (BinaryData item in client.GetEnvironmentDefinitionsAsync("", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("description").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("parametersSchema").ToString()); - Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("description").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("parametersSchema").ToString()); + Console.WriteLine(result.GetProperty("templatePath").ToString()); } } @@ -575,9 +569,9 @@ public void Example_GetEnvironmentDefinitionsByCatalog_ShortVersion() foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("", "")) { 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()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); } } @@ -592,9 +586,9 @@ public async Task Example_GetEnvironmentDefinitionsByCatalog_ShortVersion_Async( await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("", "")) { 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()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); } } @@ -609,20 +603,20 @@ public void Example_GetEnvironmentDefinitionsByCatalog_AllParameters() foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalog("", "", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("description").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("parametersSchema").ToString()); - Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("description").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("parametersSchema").ToString()); + Console.WriteLine(result.GetProperty("templatePath").ToString()); } } @@ -637,20 +631,20 @@ public async Task Example_GetEnvironmentDefinitionsByCatalog_AllParameters_Async await foreach (BinaryData item in client.GetEnvironmentDefinitionsByCatalogAsync("", "", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("description").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("parametersSchema").ToString()); - Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result.GetProperty("description").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("parametersSchema").ToString()); + Console.WriteLine(result.GetProperty("templatePath").ToString()); } } @@ -665,9 +659,9 @@ public void Example_GetEnvironmentTypes_ShortVersion() foreach (BinaryData item in client.GetEnvironmentTypes("")) { 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()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } } @@ -682,9 +676,9 @@ public async Task Example_GetEnvironmentTypes_ShortVersion_Async() await foreach (BinaryData item in client.GetEnvironmentTypesAsync("")) { 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()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } } @@ -699,9 +693,9 @@ public void Example_GetEnvironmentTypes_AllParameters() foreach (BinaryData item in client.GetEnvironmentTypes("", maxCount: 1234)) { 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()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } } @@ -716,9 +710,9 @@ public async Task Example_GetEnvironmentTypes_AllParameters_Async() await foreach (BinaryData item in client.GetEnvironmentTypesAsync("", maxCount: 1234)) { 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()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } } @@ -743,7 +737,6 @@ public void Example_CreateOrUpdateEnvironment_ShortVersion() Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -767,7 +760,6 @@ public async Task Example_CreateOrUpdateEnvironment_ShortVersion_Async() Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("environmentDefinitionName").ToString()); - Console.WriteLine(result.ToString()); } [Test] 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 d3f8b5dd81ab8..9b1d64744cdf5 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 @@ -16,7 +16,7 @@ namespace Azure.Developer.DevCenter.Samples { - public class Samples_DevBoxesClient + public partial class Samples_DevBoxesClient { [Test] [Ignore("Only validating compilation of examples")] @@ -421,6 +421,7 @@ public void Example_SkipAction_ShortVersion() DevBoxesClient client = new DevBoxesClient(endpoint, credential); Response response = client.SkipAction("", "me", "", ""); + Console.WriteLine(response.Status); } @@ -433,6 +434,7 @@ public async Task Example_SkipAction_ShortVersion_Async() DevBoxesClient client = new DevBoxesClient(endpoint, credential); Response response = await client.SkipActionAsync("", "me", "", ""); + Console.WriteLine(response.Status); } @@ -445,6 +447,7 @@ public void Example_SkipAction_AllParameters() DevBoxesClient client = new DevBoxesClient(endpoint, credential); Response response = client.SkipAction("", "me", "", ""); + Console.WriteLine(response.Status); } @@ -457,6 +460,7 @@ public async Task Example_SkipAction_AllParameters_Async() DevBoxesClient client = new DevBoxesClient(endpoint, credential); Response response = await client.SkipActionAsync("", "me", "", ""); + Console.WriteLine(response.Status); } @@ -539,9 +543,9 @@ public void Example_GetPools_ShortVersion() foreach (BinaryData item in client.GetPools("")) { 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("healthStatus").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("healthStatus").ToString()); } } @@ -556,9 +560,9 @@ public async Task Example_GetPools_ShortVersion_Async() await foreach (BinaryData item in client.GetPoolsAsync("")) { 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("healthStatus").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("healthStatus").ToString()); } } @@ -573,23 +577,23 @@ public void Example_GetPools_AllParameters() foreach (BinaryData item in client.GetPools("", filter: "", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("stopOnDisconnect").GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); - Console.WriteLine(result[0].GetProperty("healthStatus").ToString()); + 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.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); + Console.WriteLine(result.GetProperty("healthStatus").ToString()); } } @@ -604,23 +608,23 @@ public async Task Example_GetPools_AllParameters_Async() await foreach (BinaryData item in client.GetPoolsAsync("", filter: "", maxCount: 1234)) { 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()); - Console.WriteLine(result[0].GetProperty("stopOnDisconnect").GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); - Console.WriteLine(result[0].GetProperty("healthStatus").ToString()); + 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.GetProperty("stopOnDisconnect").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("stopOnDisconnect").GetProperty("gracePeriodMinutes").ToString()); + Console.WriteLine(result.GetProperty("healthStatus").ToString()); } } @@ -635,11 +639,11 @@ public void Example_GetSchedules_ShortVersion() foreach (BinaryData item in client.GetSchedules("", "")) { 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()); + 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()); } } @@ -654,11 +658,11 @@ public async Task Example_GetSchedules_ShortVersion_Async() await foreach (BinaryData item in client.GetSchedulesAsync("", "")) { 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()); + 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()); } } @@ -673,11 +677,11 @@ public void Example_GetSchedules_AllParameters() foreach (BinaryData item in client.GetSchedules("", "", filter: "", maxCount: 1234)) { 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()); + 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()); } } @@ -692,11 +696,11 @@ public async Task Example_GetSchedules_AllParameters_Async() await foreach (BinaryData item in client.GetSchedulesAsync("", "", filter: "", maxCount: 1234)) { 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()); + 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()); } } @@ -711,7 +715,7 @@ public void Example_GetAllDevBoxes_ShortVersion() foreach (BinaryData item in client.GetAllDevBoxes()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } } @@ -726,7 +730,7 @@ public async Task Example_GetAllDevBoxes_ShortVersion_Async() await foreach (BinaryData item in client.GetAllDevBoxesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } } @@ -741,31 +745,31 @@ public void Example_GetAllDevBoxes_AllParameters() foreach (BinaryData item in client.GetAllDevBoxes(filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } } @@ -780,31 +784,31 @@ public async Task Example_GetAllDevBoxes_AllParameters_Async() await foreach (BinaryData item in client.GetAllDevBoxesAsync(filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } } @@ -819,7 +823,7 @@ public void Example_GetAllDevBoxesByUser_ShortVersion() foreach (BinaryData item in client.GetAllDevBoxesByUser("me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } } @@ -834,7 +838,7 @@ public async Task Example_GetAllDevBoxesByUser_ShortVersion_Async() await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } } @@ -849,31 +853,31 @@ public void Example_GetAllDevBoxesByUser_AllParameters() foreach (BinaryData item in client.GetAllDevBoxesByUser("me", filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } } @@ -888,31 +892,31 @@ public async Task Example_GetAllDevBoxesByUser_AllParameters_Async() await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("me", filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } } @@ -927,7 +931,7 @@ public void Example_GetDevBoxes_ShortVersion() foreach (BinaryData item in client.GetDevBoxes("", "me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } } @@ -942,7 +946,7 @@ public async Task Example_GetDevBoxes_ShortVersion_Async() await foreach (BinaryData item in client.GetDevBoxesAsync("", "me")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result.GetProperty("poolName").ToString()); } } @@ -957,31 +961,31 @@ public void Example_GetDevBoxes_AllParameters() foreach (BinaryData item in client.GetDevBoxes("", "me", filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } } @@ -996,31 +1000,31 @@ public async Task Example_GetDevBoxes_AllParameters_Async() await foreach (BinaryData item in client.GetDevBoxesAsync("", "me", filter: "", maxCount: 1234)) { 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("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("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()); + 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("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").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()); } } @@ -1035,9 +1039,9 @@ public void Example_GetActions_ShortVersion() foreach (BinaryData item in client.GetActions("", "me", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); } } @@ -1052,9 +1056,9 @@ public async Task Example_GetActions_ShortVersion_Async() await foreach (BinaryData item in client.GetActionsAsync("", "me", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); } } @@ -1069,11 +1073,11 @@ public void Example_GetActions_AllParameters() foreach (BinaryData item in client.GetActions("", "me", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("sourceId").ToString()); - Console.WriteLine(result[0].GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result[0].GetProperty("next").GetProperty("scheduledTime").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); + Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); } } @@ -1088,11 +1092,11 @@ public async Task Example_GetActions_AllParameters_Async() await foreach (BinaryData item in client.GetActionsAsync("", "me", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("sourceId").ToString()); - Console.WriteLine(result[0].GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result[0].GetProperty("next").GetProperty("scheduledTime").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("suspendedUntil").ToString()); + Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString()); } } @@ -1107,8 +1111,8 @@ public void Example_DelayAllActions_ShortVersion() foreach (BinaryData item in client.DelayAllActions("", "me", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("result").ToString()); } } @@ -1123,8 +1127,8 @@ public async Task Example_DelayAllActions_ShortVersion_Async() await foreach (BinaryData item in client.DelayAllActionsAsync("", "me", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("result").ToString()); } } @@ -1139,16 +1143,16 @@ public void Example_DelayAllActions_AllParameters() foreach (BinaryData item in client.DelayAllActions("", "me", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("result").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("sourceId").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("next").GetProperty("scheduledTime").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.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("suspendedUntil").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("next").GetProperty("scheduledTime").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()); } } @@ -1163,16 +1167,16 @@ public async Task Example_DelayAllActions_AllParameters_Async() await foreach (BinaryData item in client.DelayAllActionsAsync("", "me", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"))) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("result").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("actionType").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("sourceId").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("suspendedUntil").ToString()); - Console.WriteLine(result[0].GetProperty("action").GetProperty("next").GetProperty("scheduledTime").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.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("actionType").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("sourceId").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("suspendedUntil").ToString()); + Console.WriteLine(result.GetProperty("action").GetProperty("next").GetProperty("scheduledTime").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()); } } 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 487c8bc366562..8c9c301a74506 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 @@ -16,7 +16,7 @@ namespace Azure.Developer.DevCenter.Samples { - public class Samples_DevCenterClient + public partial class Samples_DevCenterClient { [Test] [Ignore("Only validating compilation of examples")] @@ -89,7 +89,7 @@ public void Example_GetProjects_ShortVersion() foreach (BinaryData item in client.GetProjects()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -104,7 +104,7 @@ public async Task Example_GetProjects_ShortVersion_Async() await foreach (BinaryData item in client.GetProjectsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -119,9 +119,9 @@ public void Example_GetProjects_AllParameters() foreach (BinaryData item in client.GetProjects(filter: "", maxCount: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("maxDevBoxesPerUser").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); } } @@ -136,9 +136,9 @@ public async Task Example_GetProjects_AllParameters_Async() await foreach (BinaryData item in client.GetProjectsAsync(filter: "", maxCount: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("maxDevBoxesPerUser").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("maxDevBoxesPerUser").ToString()); } } } 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 2f6b3f1b134bb..259e1cacf00a5 100644 --- a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceManagementClient.xml +++ b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceManagementClient.xml @@ -166,6 +166,7 @@ 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. @@ -175,6 +176,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassAsync(""); + Console.WriteLine(response.Status); ]]> @@ -187,6 +189,7 @@ 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. @@ -196,6 +199,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClass(""); + Console.WriteLine(response.Status); ]]> @@ -558,6 +562,7 @@ 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. @@ -567,6 +572,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteGroupAsync(""); + Console.WriteLine(response.Status); ]]> @@ -579,6 +585,7 @@ 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. @@ -588,6 +595,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteGroup(""); + Console.WriteLine(response.Status); ]]> @@ -802,7 +810,7 @@ RequestContent content = RequestContent.Create(new }, }, groupId = "", - deviceClassSubgroups = new List() + deviceClassSubgroups = new object[] { "" }, @@ -895,7 +903,7 @@ RequestContent content = RequestContent.Create(new }, }, groupId = "", - deviceClassSubgroups = new List() + deviceClassSubgroups = new object[] { "" }, @@ -944,6 +952,7 @@ 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. @@ -953,6 +962,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -965,6 +975,7 @@ 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. @@ -974,6 +985,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeployment("", ""); + Console.WriteLine(response.Status); ]]> @@ -1152,6 +1164,7 @@ 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. @@ -1161,6 +1174,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassSubgroupAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -1173,6 +1187,7 @@ 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. @@ -1182,6 +1197,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClassSubgroup("", ""); + Console.WriteLine(response.Status); ]]> @@ -1426,6 +1442,7 @@ 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. @@ -1435,6 +1452,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentForDeviceClassSubgroupAsync("", "", ""); + Console.WriteLine(response.Status); ]]> @@ -1447,6 +1465,7 @@ 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. @@ -1456,6 +1475,7 @@ TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeploymentForDeviceClassSubgroup("", "", ""); + Console.WriteLine(response.Status); ]]> @@ -1823,7 +1843,7 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "() + deviceList = new object[] { new { @@ -1845,7 +1865,7 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "() + deviceList = new object[] { new { @@ -1877,7 +1897,7 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "() + deviceList = new object[] { new { @@ -1899,7 +1919,7 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "() + deviceList = new object[] { new { @@ -2064,8 +2084,8 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "").ToString()); + Console.WriteLine(result.GetProperty("deviceClassId").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } ]]> This sample shows how to call GetDeviceClassesAsync with all parameters and parse the result. @@ -2077,16 +2097,16 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2101,8 +2121,8 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "").ToString()); + Console.WriteLine(result.GetProperty("deviceClassId").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } ]]> This sample shows how to call GetDeviceClasses with all parameters and parse the result. @@ -2114,16 +2134,16 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2138,9 +2158,9 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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.GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); } ]]> This sample shows how to call GetInstallableUpdatesForDeviceClassesAsync with all parameters and parse the result. @@ -2152,11 +2172,11 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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()); + 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()); } ]]> @@ -2171,9 +2191,9 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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.GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); } ]]> This sample shows how to call GetInstallableUpdatesForDeviceClasses with all parameters and parse the result. @@ -2185,11 +2205,11 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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()); + 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()); } ]]> @@ -2204,9 +2224,9 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, " This sample shows how to call GetDevicesAsync with all parameters and parse the result. @@ -2218,35 +2238,35 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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("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()); + 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()); } ]]> @@ -2261,9 +2281,9 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, " This sample shows how to call GetDevices with all parameters and parse the result. @@ -2275,35 +2295,35 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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("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()); + 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()); } ]]> @@ -2318,9 +2338,9 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, " This sample shows how to call GetGroupsAsync with all parameters and parse the result. @@ -2332,14 +2352,14 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2354,9 +2374,9 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, " This sample shows how to call GetGroups with all parameters and parse the result. @@ -2368,14 +2388,14 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2390,12 +2410,12 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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("deviceCount").ToString()); + 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 GetBestUpdatesForGroupsAsync with all parameters and parse the result. @@ -2407,14 +2427,14 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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()); + 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()); } ]]> @@ -2429,12 +2449,12 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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("deviceCount").ToString()); + 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 GetBestUpdatesForGroups with all parameters and parse the result. @@ -2446,14 +2466,14 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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()); + 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()); } ]]> @@ -2468,12 +2488,12 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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 GetDeploymentsForGroupsAsync with all parameters and parse the result. @@ -2485,25 +2505,25 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2518,12 +2538,12 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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 GetDeploymentsForGroups with all parameters and parse the result. @@ -2535,25 +2555,25 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2568,9 +2588,9 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); - Console.WriteLine(result[0].GetProperty("groupId").ToString()); - Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("deviceClassId").ToString()); + Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } ]]> This sample shows how to call GetDeviceClassSubgroupsForGroupsAsync with all parameters and parse the result. @@ -2582,11 +2602,11 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2601,9 +2621,9 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); - Console.WriteLine(result[0].GetProperty("groupId").ToString()); - Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("deviceClassId").ToString()); + Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } ]]> This sample shows how to call GetDeviceClassSubgroupsForGroups with all parameters and parse the result. @@ -2615,11 +2635,11 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2634,12 +2654,12 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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 GetDeploymentsForDeviceClassSubgroupsAsync with all parameters and parse the result. @@ -2651,25 +2671,25 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", "", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2684,12 +2704,12 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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 GetDeploymentsForDeviceClassSubgroups with all parameters and parse the result. @@ -2701,25 +2721,25 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", "", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2734,10 +2754,10 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + Console.WriteLine(result.GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result.GetProperty("deviceState").ToString()); } ]]> This sample shows how to call GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync with all parameters and parse the result. @@ -2749,11 +2769,11 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", "", "", filter: "")) { 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("retryCount").ToString()); - Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result[0].GetProperty("deviceState").ToString()); + 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()); } ]]> @@ -2768,10 +2788,10 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + Console.WriteLine(result.GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result.GetProperty("deviceState").ToString()); } ]]> This sample shows how to call GetDeviceStatesForDeviceClassSubgroupDeployments with all parameters and parse the result. @@ -2783,11 +2803,11 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", "", "", filter: "")) { 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("retryCount").ToString()); - Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result[0].GetProperty("deviceState").ToString()); + 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()); } ]]> @@ -2802,10 +2822,10 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, " This sample shows how to call GetOperationStatusesAsync with all parameters and parse the result. @@ -2817,19 +2837,19 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2844,10 +2864,10 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, " This sample shows how to call GetOperationStatuses with all parameters and parse the result. @@ -2859,19 +2879,19 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -2886,7 +2906,7 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, " This sample shows how to call GetLogCollectionsAsync with all request content and parse the result. @@ -2898,13 +2918,13 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, " @@ -2919,7 +2939,7 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, " This sample shows how to call GetLogCollections with all request content and parse the result. @@ -2931,13 +2951,13 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, " @@ -2952,9 +2972,9 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceId").ToString()); - Console.WriteLine(result[0].GetProperty("state").ToString()); - Console.WriteLine(result[0].GetProperty("healthChecks")[0].ToString()); + Console.WriteLine(result.GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("healthChecks")[0].ToString()); } ]]> This sample shows how to call GetHealthOfDevicesAsync with all parameters and parse the result. @@ -2966,12 +2986,12 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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()); + 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()); } ]]> @@ -2986,9 +3006,9 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceId").ToString()); - Console.WriteLine(result[0].GetProperty("state").ToString()); - Console.WriteLine(result[0].GetProperty("healthChecks")[0].ToString()); + Console.WriteLine(result.GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("healthChecks")[0].ToString()); } ]]> This sample shows how to call GetHealthOfDevices with all parameters and parse the result. @@ -3000,12 +3020,12 @@ DeviceManagementClient client = new DeviceManagementClient(endpoint, "")) { 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()); + 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()); } ]]> 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 a933158955d28..1fff89c0226f6 100644 --- a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceUpdateClient.xml +++ b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceUpdateClient.xml @@ -302,13 +302,13 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetUpdatesAsync()) { 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("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()); + 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()); } ]]> This sample shows how to call GetUpdatesAsync with all parameters and parse the result. @@ -320,31 +320,31 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetUpdatesAsync(search: "", filter: "")) { 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()); - 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()); + 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()); } ]]> @@ -359,13 +359,13 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetUpdates()) { 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("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()); + 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()); } ]]> This sample shows how to call GetUpdates with all parameters and parse the result. @@ -377,31 +377,31 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetUpdates(search: "", filter: "")) { 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()); - 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()); + 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()); } ]]> @@ -416,7 +416,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetProvidersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetProvidersAsync with all request content and parse the result. @@ -428,7 +428,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetProvidersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> @@ -443,7 +443,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetProviders()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetProviders with all request content and parse the result. @@ -455,7 +455,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetProviders()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> @@ -470,7 +470,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetNamesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetNamesAsync with all parameters and parse the result. @@ -482,7 +482,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetNamesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> @@ -497,7 +497,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetNames("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetNames with all parameters and parse the result. @@ -509,7 +509,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetNames("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> @@ -524,7 +524,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetVersionsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetVersionsAsync with all parameters and parse the result. @@ -536,7 +536,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetVersionsAsync("", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> @@ -551,7 +551,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetVersions("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetVersions with all parameters and parse the result. @@ -563,7 +563,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetVersions("", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> @@ -578,7 +578,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetFilesAsync("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetFilesAsync with all parameters and parse the result. @@ -590,7 +590,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetFilesAsync("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> @@ -605,7 +605,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetFiles("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetFiles with all parameters and parse the result. @@ -617,7 +617,7 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetFiles("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> @@ -632,10 +632,10 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetOperationStatusesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } ]]> This sample shows how to call GetOperationStatusesAsync with all parameters and parse the result. @@ -647,25 +647,25 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre await foreach (BinaryData item in client.GetOperationStatusesAsync(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -680,10 +680,10 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetOperationStatuses()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } ]]> This sample shows how to call GetOperationStatuses with all parameters and parse the result. @@ -695,25 +695,25 @@ DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", cre foreach (BinaryData item in client.GetOperationStatuses(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -763,7 +763,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -786,7 +786,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -800,7 +800,7 @@ RequestContent content = RequestContent.Create(new List() }, }, friendlyName = "", - files = new List() + files = new object[] { new { @@ -821,7 +821,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -844,7 +844,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -858,7 +858,7 @@ RequestContent content = RequestContent.Create(new List() }, }, friendlyName = "", - files = new List() + files = new object[] { new { 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 9392039e95f10..a0f1623c3e0d3 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.IoT.DeviceUpdate.Samples { - public class Samples_DeviceManagementClient + public partial class Samples_DeviceManagementClient { [Test] [Ignore("Only validating compilation of examples")] @@ -196,6 +195,7 @@ public void Example_DeleteDeviceClass_ShortVersion() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClass(""); + Console.WriteLine(response.Status); } @@ -208,6 +208,7 @@ public async Task Example_DeleteDeviceClass_ShortVersion_Async() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassAsync(""); + Console.WriteLine(response.Status); } @@ -220,6 +221,7 @@ public void Example_DeleteDeviceClass_AllParameters() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClass(""); + Console.WriteLine(response.Status); } @@ -232,6 +234,7 @@ public async Task Example_DeleteDeviceClass_AllParameters_Async() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassAsync(""); + Console.WriteLine(response.Status); } @@ -618,6 +621,7 @@ public void Example_DeleteGroup_ShortVersion() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteGroup(""); + Console.WriteLine(response.Status); } @@ -630,6 +634,7 @@ public async Task Example_DeleteGroup_ShortVersion_Async() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteGroupAsync(""); + Console.WriteLine(response.Status); } @@ -642,6 +647,7 @@ public void Example_DeleteGroup_AllParameters() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteGroup(""); + Console.WriteLine(response.Status); } @@ -654,6 +660,7 @@ public async Task Example_DeleteGroup_AllParameters_Async() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteGroupAsync(""); + Console.WriteLine(response.Status); } @@ -917,10 +924,10 @@ public void Example_CreateOrUpdateDeployment_AllParameters() }, }, groupId = "", - deviceClassSubgroups = new List() -{ + deviceClassSubgroups = new object[] + { "" -}, + }, isCanceled = true, isRetried = true, rollbackPolicy = new @@ -979,10 +986,10 @@ public async Task Example_CreateOrUpdateDeployment_AllParameters_Async() }, }, groupId = "", - deviceClassSubgroups = new List() -{ + deviceClassSubgroups = new object[] + { "" -}, + }, isCanceled = true, isRetried = true, rollbackPolicy = new @@ -1028,6 +1035,7 @@ public void Example_DeleteDeployment_ShortVersion() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeployment("", ""); + Console.WriteLine(response.Status); } @@ -1040,6 +1048,7 @@ public async Task Example_DeleteDeployment_ShortVersion_Async() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentAsync("", ""); + Console.WriteLine(response.Status); } @@ -1052,6 +1061,7 @@ public void Example_DeleteDeployment_AllParameters() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeployment("", ""); + Console.WriteLine(response.Status); } @@ -1064,6 +1074,7 @@ public async Task Example_DeleteDeployment_AllParameters_Async() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentAsync("", ""); + Console.WriteLine(response.Status); } @@ -1254,6 +1265,7 @@ public void Example_DeleteDeviceClassSubgroup_ShortVersion() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClassSubgroup("", ""); + Console.WriteLine(response.Status); } @@ -1266,6 +1278,7 @@ public async Task Example_DeleteDeviceClassSubgroup_ShortVersion_Async() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassSubgroupAsync("", ""); + Console.WriteLine(response.Status); } @@ -1278,6 +1291,7 @@ public void Example_DeleteDeviceClassSubgroup_AllParameters() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClassSubgroup("", ""); + Console.WriteLine(response.Status); } @@ -1290,6 +1304,7 @@ public async Task Example_DeleteDeviceClassSubgroup_AllParameters_Async() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassSubgroupAsync("", ""); + Console.WriteLine(response.Status); } @@ -1552,6 +1567,7 @@ public void Example_DeleteDeploymentForDeviceClassSubgroup_ShortVersion() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeploymentForDeviceClassSubgroup("", "", ""); + Console.WriteLine(response.Status); } @@ -1564,6 +1580,7 @@ public async Task Example_DeleteDeploymentForDeviceClassSubgroup_ShortVersion_As DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentForDeviceClassSubgroupAsync("", "", ""); + Console.WriteLine(response.Status); } @@ -1576,6 +1593,7 @@ public void Example_DeleteDeploymentForDeviceClassSubgroup_AllParameters() DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeploymentForDeviceClassSubgroup("", "", ""); + Console.WriteLine(response.Status); } @@ -1588,6 +1606,7 @@ public async Task Example_DeleteDeploymentForDeviceClassSubgroup_AllParameters_A DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentForDeviceClassSubgroupAsync("", "", ""); + Console.WriteLine(response.Status); } @@ -1979,13 +1998,13 @@ public void Example_StartLogCollection_ShortVersion() RequestContent content = RequestContent.Create(new { - deviceList = new List() -{ + deviceList = new object[] + { new { deviceId = "", } -}, + }, }); Response response = client.StartLogCollection("", content); @@ -2003,13 +2022,13 @@ public async Task Example_StartLogCollection_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - deviceList = new List() -{ + deviceList = new object[] + { new { deviceId = "", } -}, + }, }); Response response = await client.StartLogCollectionAsync("", content); @@ -2028,14 +2047,14 @@ public void Example_StartLogCollection_AllParameters() RequestContent content = RequestContent.Create(new { operationId = "", - deviceList = new List() -{ + deviceList = new object[] + { new { deviceId = "", moduleId = "", } -}, + }, description = "", }); Response response = client.StartLogCollection("", content); @@ -2061,14 +2080,14 @@ public async Task Example_StartLogCollection_AllParameters_Async() RequestContent content = RequestContent.Create(new { operationId = "", - deviceList = new List() -{ + deviceList = new object[] + { new { deviceId = "", moduleId = "", } -}, + }, description = "", }); Response response = await client.StartLogCollectionAsync("", content); @@ -2238,8 +2257,8 @@ public void Example_GetDeviceClasses_ShortVersion() foreach (BinaryData item in client.GetDeviceClasses()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); - Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("deviceClassId").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } } @@ -2254,8 +2273,8 @@ public async Task Example_GetDeviceClasses_ShortVersion_Async() await foreach (BinaryData item in client.GetDeviceClassesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); - Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("deviceClassId").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } } @@ -2270,16 +2289,16 @@ public void Example_GetDeviceClasses_AllParameters() foreach (BinaryData item in client.GetDeviceClasses(filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2294,16 +2313,16 @@ public async Task Example_GetDeviceClasses_AllParameters_Async() await foreach (BinaryData item in client.GetDeviceClassesAsync(filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2318,9 +2337,9 @@ public void Example_GetInstallableUpdatesForDeviceClasses_ShortVersion() 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.GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); } } @@ -2335,9 +2354,9 @@ public async Task Example_GetInstallableUpdatesForDeviceClasses_ShortVersion_Asy 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.GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); } } @@ -2352,11 +2371,11 @@ public void Example_GetInstallableUpdatesForDeviceClasses_AllParameters() 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()); + 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()); } } @@ -2371,11 +2390,11 @@ public async Task Example_GetInstallableUpdatesForDeviceClasses_AllParameters_As 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()); + 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()); } } @@ -2390,9 +2409,9 @@ public void Example_GetDevices_ShortVersion() foreach (BinaryData item in client.GetDevices()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceId").ToString()); - Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); - Console.WriteLine(result[0].GetProperty("onLatestUpdate").ToString()); + Console.WriteLine(result.GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("deviceClassId").ToString()); + Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); } } @@ -2407,9 +2426,9 @@ public async Task Example_GetDevices_ShortVersion_Async() await foreach (BinaryData item in client.GetDevicesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceId").ToString()); - Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); - Console.WriteLine(result[0].GetProperty("onLatestUpdate").ToString()); + Console.WriteLine(result.GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("deviceClassId").ToString()); + Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); } } @@ -2424,35 +2443,35 @@ public void Example_GetDevices_AllParameters() foreach (BinaryData item in client.GetDevices(filter: "")) { 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("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()); + 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()); } } @@ -2467,35 +2486,35 @@ public async Task Example_GetDevices_AllParameters_Async() await foreach (BinaryData item in client.GetDevicesAsync(filter: "")) { 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("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()); + 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()); } } @@ -2510,9 +2529,9 @@ public void Example_GetGroups_ShortVersion() foreach (BinaryData item in client.GetGroups()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("groupId").ToString()); - Console.WriteLine(result[0].GetProperty("groupType").ToString()); - Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result.GetProperty("groupType").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } } @@ -2527,9 +2546,9 @@ public async Task Example_GetGroups_ShortVersion_Async() await foreach (BinaryData item in client.GetGroupsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("groupId").ToString()); - Console.WriteLine(result[0].GetProperty("groupType").ToString()); - Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result.GetProperty("groupType").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } } @@ -2544,14 +2563,14 @@ public void Example_GetGroups_AllParameters() foreach (BinaryData item in client.GetGroups(orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2566,14 +2585,14 @@ public async Task Example_GetGroups_AllParameters_Async() await foreach (BinaryData item in client.GetGroupsAsync(orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2588,12 +2607,12 @@ public void Example_GetBestUpdatesForGroups_ShortVersion() 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("deviceCount").ToString()); + 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()); } } @@ -2608,12 +2627,12 @@ public async Task Example_GetBestUpdatesForGroups_ShortVersion_Async() 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("deviceCount").ToString()); + 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()); } } @@ -2628,14 +2647,14 @@ public void Example_GetBestUpdatesForGroups_AllParameters() 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()); + 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()); } } @@ -2650,14 +2669,14 @@ public async Task Example_GetBestUpdatesForGroups_AllParameters_Async() 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()); + 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()); } } @@ -2672,12 +2691,12 @@ public void Example_GetDeploymentsForGroups_ShortVersion() foreach (BinaryData item in client.GetDeploymentsForGroups("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2692,12 +2711,12 @@ public async Task Example_GetDeploymentsForGroups_ShortVersion_Async() await foreach (BinaryData item in client.GetDeploymentsForGroupsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2712,25 +2731,25 @@ public void Example_GetDeploymentsForGroups_AllParameters() foreach (BinaryData item in client.GetDeploymentsForGroups("", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2745,25 +2764,25 @@ public async Task Example_GetDeploymentsForGroups_AllParameters_Async() await foreach (BinaryData item in client.GetDeploymentsForGroupsAsync("", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2778,9 +2797,9 @@ public void Example_GetDeviceClassSubgroupsForGroups_ShortVersion() foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroups("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); - Console.WriteLine(result[0].GetProperty("groupId").ToString()); - Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("deviceClassId").ToString()); + Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } } @@ -2795,9 +2814,9 @@ public async Task Example_GetDeviceClassSubgroupsForGroups_ShortVersion_Async() await foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroupsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); - Console.WriteLine(result[0].GetProperty("groupId").ToString()); - Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("deviceClassId").ToString()); + Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } } @@ -2812,11 +2831,11 @@ public void Example_GetDeviceClassSubgroupsForGroups_AllParameters() foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroups("", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2831,11 +2850,11 @@ public async Task Example_GetDeviceClassSubgroupsForGroups_AllParameters_Async() await foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroupsAsync("", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2850,12 +2869,12 @@ public void Example_GetDeploymentsForDeviceClassSubgroups_ShortVersion() foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroups("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2870,12 +2889,12 @@ public async Task Example_GetDeploymentsForDeviceClassSubgroups_ShortVersion_Asy await foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroupsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2890,25 +2909,25 @@ public void Example_GetDeploymentsForDeviceClassSubgroups_AllParameters() foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroups("", "", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2923,25 +2942,25 @@ public async Task Example_GetDeploymentsForDeviceClassSubgroups_AllParameters_As await foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroupsAsync("", "", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -2956,10 +2975,10 @@ public void Example_GetDeviceStatesForDeviceClassSubgroupDeployments_ShortVersio foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeployments("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + Console.WriteLine(result.GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result.GetProperty("deviceState").ToString()); } } @@ -2974,10 +2993,10 @@ public async Task Example_GetDeviceStatesForDeviceClassSubgroupDeployments_Short await foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + Console.WriteLine(result.GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result.GetProperty("deviceState").ToString()); } } @@ -2992,11 +3011,11 @@ public void Example_GetDeviceStatesForDeviceClassSubgroupDeployments_AllParamete foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeployments("", "", "", filter: "")) { 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("retryCount").ToString()); - Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result[0].GetProperty("deviceState").ToString()); + 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()); } } @@ -3011,11 +3030,11 @@ public async Task Example_GetDeviceStatesForDeviceClassSubgroupDeployments_AllPa await foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync("", "", "", filter: "")) { 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("retryCount").ToString()); - Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result[0].GetProperty("deviceState").ToString()); + 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()); } } @@ -3030,10 +3049,10 @@ public void Example_GetOperationStatuses_ShortVersion() foreach (BinaryData item in client.GetOperationStatuses()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } } @@ -3048,10 +3067,10 @@ public async Task Example_GetOperationStatuses_ShortVersion_Async() await foreach (BinaryData item in client.GetOperationStatusesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } } @@ -3066,19 +3085,19 @@ public void Example_GetOperationStatuses_AllParameters() foreach (BinaryData item in client.GetOperationStatuses(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -3093,19 +3112,19 @@ public async Task Example_GetOperationStatuses_AllParameters_Async() await foreach (BinaryData item in client.GetOperationStatusesAsync(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -3120,7 +3139,7 @@ public void Example_GetLogCollections_ShortVersion() foreach (BinaryData item in client.GetLogCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); } } @@ -3135,7 +3154,7 @@ public async Task Example_GetLogCollections_ShortVersion_Async() await foreach (BinaryData item in client.GetLogCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); } } @@ -3150,13 +3169,13 @@ public void Example_GetLogCollections_AllParameters() 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()); + 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()); } } @@ -3171,13 +3190,13 @@ public async Task Example_GetLogCollections_AllParameters_Async() 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()); + 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()); } } @@ -3192,9 +3211,9 @@ public void Example_GetHealthOfDevices_ShortVersion() 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("state").ToString()); - Console.WriteLine(result[0].GetProperty("healthChecks")[0].ToString()); + Console.WriteLine(result.GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("healthChecks")[0].ToString()); } } @@ -3209,9 +3228,9 @@ public async Task Example_GetHealthOfDevices_ShortVersion_Async() 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("state").ToString()); - Console.WriteLine(result[0].GetProperty("healthChecks")[0].ToString()); + Console.WriteLine(result.GetProperty("deviceId").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("healthChecks")[0].ToString()); } } @@ -3226,12 +3245,12 @@ public void Example_GetHealthOfDevices_AllParameters() 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()); + 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()); } } @@ -3246,12 +3265,12 @@ public async Task Example_GetHealthOfDevices_AllParameters_Async() 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()); + 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()); } } 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 1396ca28ac261..b938b4c9ad9a4 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.IoT.DeviceUpdate.Samples { - public class Samples_DeviceUpdateClient + public partial class Samples_DeviceUpdateClient { [Test] [Ignore("Only validating compilation of examples")] @@ -338,13 +337,13 @@ public void Example_GetUpdates_ShortVersion() foreach (BinaryData item in client.GetUpdates()) { 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("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()); + 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()); } } @@ -359,13 +358,13 @@ public async Task Example_GetUpdates_ShortVersion_Async() await foreach (BinaryData item in client.GetUpdatesAsync()) { 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("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()); + 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()); } } @@ -380,31 +379,31 @@ public void Example_GetUpdates_AllParameters() foreach (BinaryData item in client.GetUpdates(search: "", filter: "")) { 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()); - 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()); + 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()); } } @@ -419,31 +418,31 @@ public async Task Example_GetUpdates_AllParameters_Async() await foreach (BinaryData item in client.GetUpdatesAsync(search: "", filter: "")) { 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()); - 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()); + 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()); } } @@ -458,7 +457,7 @@ public void Example_GetProviders_ShortVersion() foreach (BinaryData item in client.GetProviders()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -473,7 +472,7 @@ public async Task Example_GetProviders_ShortVersion_Async() await foreach (BinaryData item in client.GetProvidersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -488,7 +487,7 @@ public void Example_GetProviders_AllParameters() foreach (BinaryData item in client.GetProviders()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -503,7 +502,7 @@ public async Task Example_GetProviders_AllParameters_Async() await foreach (BinaryData item in client.GetProvidersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -518,7 +517,7 @@ public void Example_GetNames_ShortVersion() foreach (BinaryData item in client.GetNames("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -533,7 +532,7 @@ public async Task Example_GetNames_ShortVersion_Async() await foreach (BinaryData item in client.GetNamesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -548,7 +547,7 @@ public void Example_GetNames_AllParameters() foreach (BinaryData item in client.GetNames("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -563,7 +562,7 @@ public async Task Example_GetNames_AllParameters_Async() await foreach (BinaryData item in client.GetNamesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -578,7 +577,7 @@ public void Example_GetVersions_ShortVersion() foreach (BinaryData item in client.GetVersions("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -593,7 +592,7 @@ public async Task Example_GetVersions_ShortVersion_Async() await foreach (BinaryData item in client.GetVersionsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -608,7 +607,7 @@ public void Example_GetVersions_AllParameters() foreach (BinaryData item in client.GetVersions("", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -623,7 +622,7 @@ public async Task Example_GetVersions_AllParameters_Async() await foreach (BinaryData item in client.GetVersionsAsync("", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -638,7 +637,7 @@ public void Example_GetFiles_ShortVersion() foreach (BinaryData item in client.GetFiles("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -653,7 +652,7 @@ public async Task Example_GetFiles_ShortVersion_Async() await foreach (BinaryData item in client.GetFilesAsync("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -668,7 +667,7 @@ public void Example_GetFiles_AllParameters() foreach (BinaryData item in client.GetFiles("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -683,7 +682,7 @@ public async Task Example_GetFiles_AllParameters_Async() await foreach (BinaryData item in client.GetFilesAsync("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -698,10 +697,10 @@ public void Example_GetOperationStatuses_ShortVersion() foreach (BinaryData item in client.GetOperationStatuses()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } } @@ -716,10 +715,10 @@ public async Task Example_GetOperationStatuses_ShortVersion_Async() await foreach (BinaryData item in client.GetOperationStatusesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } } @@ -734,25 +733,25 @@ public void Example_GetOperationStatuses_AllParameters() foreach (BinaryData item in client.GetOperationStatuses(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -767,25 +766,25 @@ public async Task Example_GetOperationStatuses_AllParameters_Async() await foreach (BinaryData item in client.GetOperationStatusesAsync(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -841,8 +840,8 @@ public void Example_StartImportUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { importManifest = new @@ -855,7 +854,7 @@ public void Example_StartImportUpdate_ShortVersion() }, }, } -}); + }); Operation operation = client.StartImportUpdate(WaitUntil.Completed, content); } @@ -867,8 +866,8 @@ public async Task Example_StartImportUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { importManifest = new @@ -881,7 +880,7 @@ public async Task Example_StartImportUpdate_ShortVersion_Async() }, }, } -}); + }); Operation operation = await client.StartImportUpdateAsync(WaitUntil.Completed, content); } @@ -893,8 +892,8 @@ public void Example_StartImportUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { importManifest = new @@ -907,7 +906,7 @@ public void Example_StartImportUpdate_AllParameters() }, }, friendlyName = "", -files = new List() +files = new object[] { new { @@ -916,7 +915,7 @@ public void Example_StartImportUpdate_AllParameters() } }, } -}); + }); Operation operation = client.StartImportUpdate(WaitUntil.Completed, content); } @@ -928,8 +927,8 @@ public async Task Example_StartImportUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { importManifest = new @@ -942,7 +941,7 @@ public async Task Example_StartImportUpdate_AllParameters_Async() }, }, friendlyName = "", -files = new List() +files = new object[] { new { @@ -951,7 +950,7 @@ public async Task Example_StartImportUpdate_AllParameters_Async() } }, } -}); + }); Operation operation = await client.StartImportUpdateAsync(WaitUntil.Completed, content); } } 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 090c48c290e44..da0a1e9cc5ed6 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") }); @@ -22,43 +22,34 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") { - Info = new PatientInfo() + Info = new PatientInfo { Sex = PatientInfoSex.Female, BirthDate = DateTimeOffset.Parse("2022-05-10"), - ClinicalInfo = + ClinicalInfo = {new ClinicalCodedElement("", "") { - new ClinicalCodedElement("","") - { - Name = "", - Value = "", - } - }, + Name = "", + Value = "", + }}, }, - Data = + Data = {new PatientDocument(DocumentType.Note, "", new DocumentContent(DocumentContentSourceType.Inline, "")) { - new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) - { - ClinicalType = ClinicalDocumentType.Consultation, - Language = "", - CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), - } - }, + ClinicalType = ClinicalDocumentType.Consultation, + Language = "", + CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + }}, } }) { - Configuration = new OncoPhenotypeModelConfiguration() + Configuration = new OncoPhenotypeModelConfiguration { Verbose = true, IncludeEvidence = true, - InferenceTypes = - { - OncoPhenotypeInferenceType.TumorSite - }, + InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, CheckForCancerCase = true, }, }; @@ -74,7 +65,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") }); @@ -87,43 +78,34 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") { - Info = new PatientInfo() + Info = new PatientInfo { Sex = PatientInfoSex.Female, BirthDate = DateTimeOffset.Parse("2022-05-10"), - ClinicalInfo = + ClinicalInfo = {new ClinicalCodedElement("", "") { - new ClinicalCodedElement("","") - { - Name = "", - Value = "", - } - }, + Name = "", + Value = "", + }}, }, - Data = + Data = {new PatientDocument(DocumentType.Note, "", new DocumentContent(DocumentContentSourceType.Inline, "")) { - new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) - { - ClinicalType = ClinicalDocumentType.Consultation, - Language = "", - CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), - } - }, + ClinicalType = ClinicalDocumentType.Consultation, + Language = "", + CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + }}, } }) { - Configuration = new OncoPhenotypeModelConfiguration() + Configuration = new OncoPhenotypeModelConfiguration { Verbose = true, IncludeEvidence = true, - InferenceTypes = - { - OncoPhenotypeInferenceType.TumorSite - }, + InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, CheckForCancerCase = true, }, }; @@ -141,7 +123,7 @@ CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - patients = new List() + patients = new object[] { new { @@ -159,6 +141,19 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); + +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(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 and request content and parse the result. "); @@ -167,7 +162,7 @@ CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - patients = new List() + patients = new object[] { new { @@ -176,7 +171,7 @@ RequestContent content = RequestContent.Create(new { sex = "female", birthDate = "2022-05-10", - clinicalInfo = new List() + clinicalInfo = new object[] { new { @@ -187,7 +182,7 @@ RequestContent content = RequestContent.Create(new } }, }, - data = new List() + data = new object[] { new { @@ -209,7 +204,7 @@ RequestContent content = RequestContent.Create(new { verbose = true, includeEvidence = true, - inferenceTypes = new List() + inferenceTypes = new object[] { "tumorSite" }, @@ -245,6 +240,46 @@ 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 InferCancerProfileAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); + +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +{ + 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 = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); +OncoPhenotypeResult responseData = operation.Value; ]]> @@ -257,7 +292,7 @@ CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - patients = new List() + patients = new object[] { new { @@ -275,6 +310,19 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); + +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(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 and request content and parse the result. "); @@ -283,7 +331,7 @@ CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - patients = new List() + patients = new object[] { new { @@ -292,7 +340,7 @@ RequestContent content = RequestContent.Create(new { sex = "female", birthDate = "2022-05-10", - clinicalInfo = new List() + clinicalInfo = new object[] { new { @@ -303,7 +351,7 @@ RequestContent content = RequestContent.Create(new } }, }, - data = new List() + data = new object[] { new { @@ -325,7 +373,7 @@ RequestContent content = RequestContent.Create(new { verbose = true, includeEvidence = true, - inferenceTypes = new List() + inferenceTypes = new object[] { "tumorSite" }, @@ -361,6 +409,46 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); + +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +{ + 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; ]]> 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 a3c7cf2d26926..061d2395cec91 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Health.Insights.CancerProfiling.Samples { - public class Samples_CancerProfilingClient + public partial class Samples_CancerProfilingClient { [Test] [Ignore("Only validating compilation of examples")] @@ -29,13 +28,13 @@ public void Example_InferCancerProfile_ShortVersion() RequestContent content = RequestContent.Create(new { - patients = new List() -{ + patients = new object[] + { new { id = "", } -}, + }, }); Operation operation = client.InferCancerProfile(WaitUntil.Completed, content); BinaryData responseData = operation.Value; @@ -58,13 +57,13 @@ public async Task Example_InferCancerProfile_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - patients = new List() -{ + patients = new object[] + { new { id = "", } -}, + }, }); Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; @@ -85,10 +84,10 @@ public void Example_InferCancerProfile_ShortVersion_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() -{ + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + { new PatientRecord("") -}); + }); Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); OncoPhenotypeResult responseData = operation.Value; } @@ -101,10 +100,10 @@ public async Task Example_InferCancerProfile_ShortVersion_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() -{ + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + { new PatientRecord("") -}); + }); Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); OncoPhenotypeResult responseData = operation.Value; } @@ -119,8 +118,8 @@ public void Example_InferCancerProfile_AllParameters() RequestContent content = RequestContent.Create(new { - patients = new List() -{ + patients = new object[] + { new { id = "", @@ -128,7 +127,7 @@ public void Example_InferCancerProfile_AllParameters() { sex = "female", birthDate = "2022-05-10", -clinicalInfo = new List() +clinicalInfo = new object[] { new { @@ -139,7 +138,7 @@ public void Example_InferCancerProfile_AllParameters() } }, }, -data = new List() +data = new object[] { new { @@ -156,15 +155,15 @@ public void Example_InferCancerProfile_AllParameters() } }, } -}, + }, configuration = new { verbose = true, includeEvidence = true, - inferenceTypes = new List() -{ + inferenceTypes = new object[] + { "tumorSite" -}, + }, checkForCancerCase = true, }, }); @@ -209,8 +208,8 @@ public async Task Example_InferCancerProfile_AllParameters_Async() RequestContent content = RequestContent.Create(new { - patients = new List() -{ + patients = new object[] + { new { id = "", @@ -218,7 +217,7 @@ public async Task Example_InferCancerProfile_AllParameters_Async() { sex = "female", birthDate = "2022-05-10", -clinicalInfo = new List() +clinicalInfo = new object[] { new { @@ -229,7 +228,7 @@ public async Task Example_InferCancerProfile_AllParameters_Async() } }, }, -data = new List() +data = new object[] { new { @@ -246,15 +245,15 @@ public async Task Example_InferCancerProfile_AllParameters_Async() } }, } -}, + }, configuration = new { verbose = true, includeEvidence = true, - inferenceTypes = new List() -{ + inferenceTypes = new object[] + { "tumorSite" -}, + }, checkForCancerCase = true, }, }); @@ -297,43 +296,34 @@ public void Example_InferCancerProfile_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() -{ + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + { new PatientRecord("") { -Info = new PatientInfo() +Info = new PatientInfo { Sex = PatientInfoSex.Female, BirthDate = DateTimeOffset.Parse("2022-05-10"), -ClinicalInfo = -{ -new ClinicalCodedElement("","") +ClinicalInfo = {new ClinicalCodedElement("", "") { Name = "", Value = "", -} +}}, }, -}, -Data = -{ -new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) +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() + Configuration = new OncoPhenotypeModelConfiguration { Verbose = true, IncludeEvidence = true, - InferenceTypes = -{ -OncoPhenotypeInferenceType.TumorSite -}, + InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, CheckForCancerCase = true, }, }; @@ -349,43 +339,34 @@ public async Task Example_InferCancerProfile_AllParameters_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() -{ + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + { new PatientRecord("") { -Info = new PatientInfo() +Info = new PatientInfo { Sex = PatientInfoSex.Female, BirthDate = DateTimeOffset.Parse("2022-05-10"), -ClinicalInfo = -{ -new ClinicalCodedElement("","") +ClinicalInfo = {new ClinicalCodedElement("", "") { Name = "", Value = "", -} -}, +}}, }, -Data = -{ -new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) +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() + Configuration = new OncoPhenotypeModelConfiguration { Verbose = true, IncludeEvidence = true, - InferenceTypes = -{ -OncoPhenotypeInferenceType.TumorSite -}, + InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, CheckForCancerCase = true, }, }; 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 5d8300677bdb3..026da23559da4 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -TrialMatcherData trialMatcherData = new TrialMatcherData(new List() +TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") }); @@ -22,142 +22,79 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -TrialMatcherData trialMatcherData = new TrialMatcherData(new List() +TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") { - Info = new PatientInfo() + Info = new PatientInfo { Sex = PatientInfoSex.Female, BirthDate = DateTimeOffset.Parse("2022-05-10"), - ClinicalInfo = + ClinicalInfo = {new ClinicalCodedElement("", "") { - new ClinicalCodedElement("","") - { - Name = "", - Value = "", - } - }, + Name = "", + Value = "", + }}, }, - Data = + Data = {new PatientDocument(DocumentType.Note, "", new DocumentContent(DocumentContentSourceType.Inline, "")) { - new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) - { - ClinicalType = ClinicalDocumentType.Consultation, - Language = "", - CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), - } - }, + ClinicalType = ClinicalDocumentType.Consultation, + Language = "", + CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + }}, } }) { - Configuration = new TrialMatcherModelConfiguration(new ClinicalTrials() + Configuration = new TrialMatcherModelConfiguration(new ClinicalTrials { - CustomTrials = + CustomTrials = {new ClinicalTrialDetails("", new ClinicalTrialMetadata(new string[]{""}) { - 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("", "") { - Phases = - { - ClinicalTrialPhase.NotApplicable - }, - StudyType = ClinicalTrialStudyType.Interventional, - RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, - Sponsors = - { - "" - }, - Contacts = - { - new ContactDetails() - { - Name = "", - Email = "", - Phone = "", - } - }, - Facilities = - { - 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,123.45F), - MaximumAge = null, - }, + MinimumAge = new AcceptedAge(AgeUnit.Years, 123.45F), + MaximumAge = default, }, - } - }, - RegistryFilters = + }, + }}, + RegistryFilters = {new ClinicalTrialRegistryFilter { - new ClinicalTrialRegistryFilter() + Conditions = {""}, + StudyTypes = {ClinicalTrialStudyType.Interventional}, + RecruitmentStatuses = {ClinicalTrialRecruitmentStatus.UnknownStatus}, + Sponsors = {""}, + Phases = {ClinicalTrialPhase.NotApplicable}, + Purposes = {ClinicalTrialPurpose.NotApplicable}, + Ids = {""}, + Sources = {ClinicalTrialSource.Custom}, + FacilityNames = {""}, + FacilityLocations = {new GeographicLocation("") { - 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)) - }, - } - }, + City = "", + State = "", + }}, + FacilityAreas = {new GeographicArea(GeoJsonType.Feature, new AreaGeometry(GeoJsonGeometryType.Point, new float[]{123.45F}), new AreaProperties(GeoJsonPropertiesSubType.Circle, 123.45))}, + }}, }) { Verbose = true, @@ -176,7 +113,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -TrialMatcherData trialMatcherData = new TrialMatcherData(new List() +TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") }); @@ -189,142 +126,79 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -TrialMatcherData trialMatcherData = new TrialMatcherData(new List() +TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") { - Info = new PatientInfo() + Info = new PatientInfo { Sex = PatientInfoSex.Female, BirthDate = DateTimeOffset.Parse("2022-05-10"), - ClinicalInfo = + ClinicalInfo = {new ClinicalCodedElement("", "") { - new ClinicalCodedElement("","") - { - Name = "", - Value = "", - } - }, + Name = "", + Value = "", + }}, }, - Data = + Data = {new PatientDocument(DocumentType.Note, "", new DocumentContent(DocumentContentSourceType.Inline, "")) { - new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) - { - ClinicalType = ClinicalDocumentType.Consultation, - Language = "", - CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), - } - }, + ClinicalType = ClinicalDocumentType.Consultation, + Language = "", + CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + }}, } }) { - Configuration = new TrialMatcherModelConfiguration(new ClinicalTrials() + Configuration = new TrialMatcherModelConfiguration(new ClinicalTrials { - CustomTrials = + CustomTrials = {new ClinicalTrialDetails("", new ClinicalTrialMetadata(new string[]{""}) { - 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("", "") { - Phases = - { - ClinicalTrialPhase.NotApplicable - }, - StudyType = ClinicalTrialStudyType.Interventional, - RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, - Sponsors = - { - "" - }, - Contacts = - { - new ContactDetails() - { - Name = "", - Email = "", - Phone = "", - } - }, - Facilities = - { - 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,123.45F), - MaximumAge = null, - }, + MinimumAge = new AcceptedAge(AgeUnit.Years, 123.45F), + MaximumAge = default, }, - } - }, - RegistryFilters = + }, + }}, + RegistryFilters = {new ClinicalTrialRegistryFilter { - new ClinicalTrialRegistryFilter() + Conditions = {""}, + StudyTypes = {ClinicalTrialStudyType.Interventional}, + RecruitmentStatuses = {ClinicalTrialRecruitmentStatus.UnknownStatus}, + Sponsors = {""}, + Phases = {ClinicalTrialPhase.NotApplicable}, + Purposes = {ClinicalTrialPurpose.NotApplicable}, + Ids = {""}, + Sources = {ClinicalTrialSource.Custom}, + FacilityNames = {""}, + FacilityLocations = {new GeographicLocation("") { - 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)) - }, - } - }, + City = "", + State = "", + }}, + FacilityAreas = {new GeographicArea(GeoJsonType.Feature, new AreaGeometry(GeoJsonGeometryType.Point, new float[]{123.45F}), new AreaProperties(GeoJsonPropertiesSubType.Circle, 123.45))}, + }}, }) { Verbose = true, @@ -345,7 +219,7 @@ ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential) RequestContent content = RequestContent.Create(new { - patients = new List() + patients = new object[] { new { @@ -363,6 +237,19 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); + +TrialMatcherData trialMatcherData = new TrialMatcherData(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 and request content and parse the result. "); @@ -371,7 +258,7 @@ ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential) RequestContent content = RequestContent.Create(new { - patients = new List() + patients = new object[] { new { @@ -380,7 +267,7 @@ RequestContent content = RequestContent.Create(new { sex = "female", birthDate = "2022-05-10", - clinicalInfo = new List() + clinicalInfo = new object[] { new { @@ -391,7 +278,7 @@ RequestContent content = RequestContent.Create(new } }, }, - data = new List() + data = new object[] { new { @@ -415,7 +302,7 @@ RequestContent content = RequestContent.Create(new includeEvidence = true, clinicalTrials = new { - customTrials = new List() + customTrials = new object[] { new { @@ -435,21 +322,21 @@ RequestContent content = RequestContent.Create(new }, metadata = new { - phases = new List() + phases = new object[] { "notApplicable" }, studyType = "interventional", recruitmentStatus = "unknownStatus", - conditions = new List() + conditions = new object[] { "" }, - sponsors = new List() + sponsors = new object[] { "" }, - contacts = new List() + contacts = new object[] { new { @@ -458,7 +345,7 @@ RequestContent content = RequestContent.Create(new phone = "", } }, - facilities = new List() + facilities = new object[] { new { @@ -471,47 +358,47 @@ RequestContent content = RequestContent.Create(new }, } }, - registryFilters = new List() + registryFilters = new object[] { new { - conditions = new List() + conditions = new object[] { "" }, - studyTypes = new List() + studyTypes = new object[] { "interventional" }, - recruitmentStatuses = new List() + recruitmentStatuses = new object[] { "unknownStatus" }, - sponsors = new List() + sponsors = new object[] { "" }, - phases = new List() + phases = new object[] { "notApplicable" }, - purposes = new List() + purposes = new object[] { "notApplicable" }, - ids = new List() + ids = new object[] { "" }, - sources = new List() + sources = new object[] { "custom" }, - facilityNames = new List() + facilityNames = new object[] { "" }, - facilityLocations = new List() + facilityLocations = new object[] { new { @@ -520,7 +407,7 @@ RequestContent content = RequestContent.Create(new countryOrRegion = "", } }, - facilityAreas = new List() + facilityAreas = new object[] { new { @@ -528,7 +415,7 @@ RequestContent content = RequestContent.Create(new geometry = new { type = "Point", - coordinates = new List() + coordinates = new object[] { 123.45F }, @@ -595,6 +482,94 @@ 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 MatchTrialsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); + +TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] +{ + 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 string[]{""}) + { + 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 = default, + }, + }, + }}, + 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 float[]{123.45F}), new AreaProperties(GeoJsonPropertiesSubType.Circle, 123.45))}, + }}, + }) + { + Verbose = true, + IncludeEvidence = true, + }, +}; +Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); +TrialMatcherResult responseData = operation.Value; ]]> @@ -607,7 +582,7 @@ ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential) RequestContent content = RequestContent.Create(new { - patients = new List() + patients = new object[] { new { @@ -625,6 +600,19 @@ 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. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); + +TrialMatcherData trialMatcherData = new TrialMatcherData(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 and request content and parse the result. "); @@ -633,7 +621,7 @@ ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential) RequestContent content = RequestContent.Create(new { - patients = new List() + patients = new object[] { new { @@ -642,7 +630,7 @@ RequestContent content = RequestContent.Create(new { sex = "female", birthDate = "2022-05-10", - clinicalInfo = new List() + clinicalInfo = new object[] { new { @@ -653,7 +641,7 @@ RequestContent content = RequestContent.Create(new } }, }, - data = new List() + data = new object[] { new { @@ -677,7 +665,7 @@ RequestContent content = RequestContent.Create(new includeEvidence = true, clinicalTrials = new { - customTrials = new List() + customTrials = new object[] { new { @@ -697,21 +685,21 @@ RequestContent content = RequestContent.Create(new }, metadata = new { - phases = new List() + phases = new object[] { "notApplicable" }, studyType = "interventional", recruitmentStatus = "unknownStatus", - conditions = new List() + conditions = new object[] { "" }, - sponsors = new List() + sponsors = new object[] { "" }, - contacts = new List() + contacts = new object[] { new { @@ -720,7 +708,7 @@ RequestContent content = RequestContent.Create(new phone = "", } }, - facilities = new List() + facilities = new object[] { new { @@ -733,47 +721,47 @@ RequestContent content = RequestContent.Create(new }, } }, - registryFilters = new List() + registryFilters = new object[] { new { - conditions = new List() + conditions = new object[] { "" }, - studyTypes = new List() + studyTypes = new object[] { "interventional" }, - recruitmentStatuses = new List() + recruitmentStatuses = new object[] { "unknownStatus" }, - sponsors = new List() + sponsors = new object[] { "" }, - phases = new List() + phases = new object[] { "notApplicable" }, - purposes = new List() + purposes = new object[] { "notApplicable" }, - ids = new List() + ids = new object[] { "" }, - sources = new List() + sources = new object[] { "custom" }, - facilityNames = new List() + facilityNames = new object[] { "" }, - facilityLocations = new List() + facilityLocations = new object[] { new { @@ -782,7 +770,7 @@ RequestContent content = RequestContent.Create(new countryOrRegion = "", } }, - facilityAreas = new List() + facilityAreas = new object[] { new { @@ -790,7 +778,7 @@ RequestContent content = RequestContent.Create(new geometry = new { type = "Point", - coordinates = new List() + coordinates = new object[] { 123.45F }, @@ -857,6 +845,94 @@ 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 all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); + +TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] +{ + 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 string[]{""}) + { + 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 = default, + }, + }, + }}, + 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 float[]{123.45F}), new AreaProperties(GeoJsonPropertiesSubType.Circle, 123.45))}, + }}, + }) + { + Verbose = true, + IncludeEvidence = true, + }, +}; +Operation operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); +TrialMatcherResult responseData = operation.Value; ]]> 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 0b2f278b62d25..4022d7bd033e4 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Health.Insights.ClinicalMatching.Samples { - public class Samples_ClinicalMatchingClient + public partial class Samples_ClinicalMatchingClient { [Test] [Ignore("Only validating compilation of examples")] @@ -29,13 +28,13 @@ public void Example_MatchTrials_ShortVersion() RequestContent content = RequestContent.Create(new { - patients = new List() -{ + patients = new object[] + { new { id = "", } -}, + }, }); Operation operation = client.MatchTrials(WaitUntil.Completed, content); BinaryData responseData = operation.Value; @@ -58,13 +57,13 @@ public async Task Example_MatchTrials_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - patients = new List() -{ + patients = new object[] + { new { id = "", } -}, + }, }); Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; @@ -85,10 +84,10 @@ public void Example_MatchTrials_ShortVersion_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - TrialMatcherData trialMatcherData = new TrialMatcherData(new List() -{ + TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] + { new PatientRecord("") -}); + }); Operation operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); TrialMatcherResult responseData = operation.Value; } @@ -101,10 +100,10 @@ public async Task Example_MatchTrials_ShortVersion_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - TrialMatcherData trialMatcherData = new TrialMatcherData(new List() -{ + TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] + { new PatientRecord("") -}); + }); Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); TrialMatcherResult responseData = operation.Value; } @@ -119,8 +118,8 @@ public void Example_MatchTrials_AllParameters() RequestContent content = RequestContent.Create(new { - patients = new List() -{ + patients = new object[] + { new { id = "", @@ -128,7 +127,7 @@ public void Example_MatchTrials_AllParameters() { sex = "female", birthDate = "2022-05-10", -clinicalInfo = new List() +clinicalInfo = new object[] { new { @@ -139,7 +138,7 @@ public void Example_MatchTrials_AllParameters() } }, }, -data = new List() +data = new object[] { new { @@ -156,15 +155,15 @@ public void Example_MatchTrials_AllParameters() } }, } -}, + }, configuration = new { verbose = true, includeEvidence = true, clinicalTrials = new { - customTrials = new List() -{ + customTrials = new object[] + { new { id = "", @@ -183,21 +182,21 @@ public void Example_MatchTrials_AllParameters() }, metadata = new { -phases = new List() +phases = new object[] { "notApplicable" }, studyType = "interventional", recruitmentStatus = "unknownStatus", -conditions = new List() +conditions = new object[] { "" }, -sponsors = new List() +sponsors = new object[] { "" }, -contacts = new List() +contacts = new object[] { new { @@ -206,7 +205,7 @@ public void Example_MatchTrials_AllParameters() phone = "", } }, -facilities = new List() +facilities = new object[] { new { @@ -218,48 +217,48 @@ public void Example_MatchTrials_AllParameters() }, }, } -}, - registryFilters = new List() -{ + }, + registryFilters = new object[] + { new { -conditions = new List() +conditions = new object[] { "" }, -studyTypes = new List() +studyTypes = new object[] { "interventional" }, -recruitmentStatuses = new List() +recruitmentStatuses = new object[] { "unknownStatus" }, -sponsors = new List() +sponsors = new object[] { "" }, -phases = new List() +phases = new object[] { "notApplicable" }, -purposes = new List() +purposes = new object[] { "notApplicable" }, -ids = new List() +ids = new object[] { "" }, -sources = new List() +sources = new object[] { "custom" }, -facilityNames = new List() +facilityNames = new object[] { "" }, -facilityLocations = new List() +facilityLocations = new object[] { new { @@ -268,7 +267,7 @@ public void Example_MatchTrials_AllParameters() countryOrRegion = "", } }, -facilityAreas = new List() +facilityAreas = new object[] { new { @@ -276,7 +275,7 @@ public void Example_MatchTrials_AllParameters() geometry = new { type = "Point", -coordinates = new List() +coordinates = new object[] { 123.45F }, @@ -289,7 +288,7 @@ public void Example_MatchTrials_AllParameters() } }, } -}, + }, }, }, }); @@ -355,8 +354,8 @@ public async Task Example_MatchTrials_AllParameters_Async() RequestContent content = RequestContent.Create(new { - patients = new List() -{ + patients = new object[] + { new { id = "", @@ -364,7 +363,7 @@ public async Task Example_MatchTrials_AllParameters_Async() { sex = "female", birthDate = "2022-05-10", -clinicalInfo = new List() +clinicalInfo = new object[] { new { @@ -375,7 +374,7 @@ public async Task Example_MatchTrials_AllParameters_Async() } }, }, -data = new List() +data = new object[] { new { @@ -392,15 +391,15 @@ public async Task Example_MatchTrials_AllParameters_Async() } }, } -}, + }, configuration = new { verbose = true, includeEvidence = true, clinicalTrials = new { - customTrials = new List() -{ + customTrials = new object[] + { new { id = "", @@ -419,21 +418,21 @@ public async Task Example_MatchTrials_AllParameters_Async() }, metadata = new { -phases = new List() +phases = new object[] { "notApplicable" }, studyType = "interventional", recruitmentStatus = "unknownStatus", -conditions = new List() +conditions = new object[] { "" }, -sponsors = new List() +sponsors = new object[] { "" }, -contacts = new List() +contacts = new object[] { new { @@ -442,7 +441,7 @@ public async Task Example_MatchTrials_AllParameters_Async() phone = "", } }, -facilities = new List() +facilities = new object[] { new { @@ -454,48 +453,48 @@ public async Task Example_MatchTrials_AllParameters_Async() }, }, } -}, - registryFilters = new List() -{ + }, + registryFilters = new object[] + { new { -conditions = new List() +conditions = new object[] { "" }, -studyTypes = new List() +studyTypes = new object[] { "interventional" }, -recruitmentStatuses = new List() +recruitmentStatuses = new object[] { "unknownStatus" }, -sponsors = new List() +sponsors = new object[] { "" }, -phases = new List() +phases = new object[] { "notApplicable" }, -purposes = new List() +purposes = new object[] { "notApplicable" }, -ids = new List() +ids = new object[] { "" }, -sources = new List() +sources = new object[] { "custom" }, -facilityNames = new List() +facilityNames = new object[] { "" }, -facilityLocations = new List() +facilityLocations = new object[] { new { @@ -504,7 +503,7 @@ public async Task Example_MatchTrials_AllParameters_Async() countryOrRegion = "", } }, -facilityAreas = new List() +facilityAreas = new object[] { new { @@ -512,7 +511,7 @@ public async Task Example_MatchTrials_AllParameters_Async() geometry = new { type = "Point", -coordinates = new List() +coordinates = new object[] { 123.45F }, @@ -525,7 +524,7 @@ public async Task Example_MatchTrials_AllParameters_Async() } }, } -}, + }, }, }, }); @@ -589,142 +588,79 @@ public void Example_MatchTrials_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - TrialMatcherData trialMatcherData = new TrialMatcherData(new List() -{ + TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] + { new PatientRecord("") { -Info = new PatientInfo() +Info = new PatientInfo { Sex = PatientInfoSex.Female, BirthDate = DateTimeOffset.Parse("2022-05-10"), -ClinicalInfo = -{ -new ClinicalCodedElement("","") +ClinicalInfo = {new ClinicalCodedElement("", "") { Name = "", Value = "", -} -}, +}}, }, -Data = -{ -new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) +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() + Configuration = new TrialMatcherModelConfiguration(new ClinicalTrials { - CustomTrials = -{ -new ClinicalTrialDetails("",new ClinicalTrialMetadata(new List() + CustomTrials = {new ClinicalTrialDetails("", new ClinicalTrialMetadata(new string[]{""}) { -"" -}) -{ -Phases = -{ -ClinicalTrialPhase.NotApplicable -}, +Phases = {ClinicalTrialPhase.NotApplicable}, StudyType = ClinicalTrialStudyType.Interventional, RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, -Sponsors = -{ -"" -}, -Contacts = -{ -new ContactDetails() +Sponsors = {""}, +Contacts = {new ContactDetails { Name = "", Email = "", Phone = "", -} -}, -Facilities = -{ -new ClinicalTrialResearchFacility("","") +}}, +Facilities = {new ClinicalTrialResearchFacility("", "") { City = "", State = "", -} -}, +}}, }) { EligibilityCriteriaText = "", -Demographics = new ClinicalTrialDemographics() +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 = +AcceptedAgeRange = new AcceptedAgeRange { -ClinicalTrialPurpose.NotApplicable +MinimumAge = new AcceptedAge(AgeUnit.Years, 123.45F), +MaximumAge = default, }, -Ids = -{ -"" -}, -Sources = -{ -ClinicalTrialSource.Custom -}, -FacilityNames = -{ -"" }, -FacilityLocations = +}}, + RegistryFilters = {new ClinicalTrialRegistryFilter { -new GeographicLocation("") +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)) -}, -} -}, +}}, +FacilityAreas = {new GeographicArea(GeoJsonType.Feature, new AreaGeometry(GeoJsonGeometryType.Point, new float[]{123.45F}), new AreaProperties(GeoJsonPropertiesSubType.Circle, 123.45))}, +}}, }) { Verbose = true, @@ -743,142 +679,79 @@ public async Task Example_MatchTrials_AllParameters_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - TrialMatcherData trialMatcherData = new TrialMatcherData(new List() -{ + TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] + { new PatientRecord("") { -Info = new PatientInfo() +Info = new PatientInfo { Sex = PatientInfoSex.Female, BirthDate = DateTimeOffset.Parse("2022-05-10"), -ClinicalInfo = -{ -new ClinicalCodedElement("","") +ClinicalInfo = {new ClinicalCodedElement("", "") { Name = "", Value = "", -} +}}, }, -}, -Data = -{ -new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) +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() + Configuration = new TrialMatcherModelConfiguration(new ClinicalTrials { - CustomTrials = -{ -new ClinicalTrialDetails("",new ClinicalTrialMetadata(new List() -{ -"" -}) + CustomTrials = {new ClinicalTrialDetails("", new ClinicalTrialMetadata(new string[]{""}) { -Phases = -{ -ClinicalTrialPhase.NotApplicable -}, +Phases = {ClinicalTrialPhase.NotApplicable}, StudyType = ClinicalTrialStudyType.Interventional, RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, -Sponsors = -{ -"" -}, -Contacts = -{ -new ContactDetails() +Sponsors = {""}, +Contacts = {new ContactDetails { Name = "", Email = "", Phone = "", -} -}, -Facilities = -{ -new ClinicalTrialResearchFacility("","") +}}, +Facilities = {new ClinicalTrialResearchFacility("", "") { City = "", State = "", -} -}, +}}, }) { EligibilityCriteriaText = "", -Demographics = new ClinicalTrialDemographics() +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 = +AcceptedAgeRange = new AcceptedAgeRange { -ClinicalTrialPurpose.NotApplicable +MinimumAge = new AcceptedAge(AgeUnit.Years, 123.45F), +MaximumAge = default, }, -Ids = -{ -"" -}, -Sources = -{ -ClinicalTrialSource.Custom -}, -FacilityNames = -{ -"" }, -FacilityLocations = +}}, + RegistryFilters = {new ClinicalTrialRegistryFilter { -new GeographicLocation("") +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)) -}, -} -}, +}}, +FacilityAreas = {new GeographicArea(GeoJsonType.Feature, new AreaGeometry(GeoJsonGeometryType.Point, new float[]{123.45F}), new AreaProperties(GeoJsonPropertiesSubType.Circle, 123.45))}, +}}, }) { Verbose = true, 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 76dfb188b905e..086796b55858b 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml @@ -290,6 +290,7 @@ 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. @@ -299,6 +300,7 @@ TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestAsync(""); + Console.WriteLine(response.Status); ]]> @@ -311,6 +313,7 @@ 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. @@ -320,6 +323,7 @@ TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTest(""); + Console.WriteLine(response.Status); ]]> @@ -493,8 +497,6 @@ Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); ]]> - - This sample shows how to call GetTestFileAsync and parse the result. @@ -564,6 +566,7 @@ 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. @@ -573,6 +576,7 @@ TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestFileAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -585,6 +589,7 @@ 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. @@ -594,6 +599,7 @@ TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTestFile("", ""); + Console.WriteLine(response.Status); ]]> @@ -963,8 +969,6 @@ Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); ]]> - - This sample shows how to call GetTestFilesAsync and parse the result. @@ -976,7 +980,7 @@ LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, await foreach (BinaryData item in client.GetTestFilesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetTestFilesAsync with all parameters and parse the result. @@ -988,12 +992,12 @@ LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, 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()); + 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()); } ]]> @@ -1008,7 +1012,7 @@ LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, foreach (BinaryData item in client.GetTestFiles("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetTestFiles with all parameters and parse the result. @@ -1020,12 +1024,12 @@ LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, 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()); + 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()); } ]]> 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 fb7bd3e0ee605..f5d78d844186f 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml @@ -1,8 +1,6 @@ - - This sample shows how to call GetTestRunAsync and parse the result. @@ -250,6 +248,7 @@ 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. @@ -259,6 +258,7 @@ TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.DeleteTestRunAsync(""); + Console.WriteLine(response.Status); ]]> @@ -271,6 +271,7 @@ 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. @@ -280,6 +281,7 @@ TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.DeleteTestRun(""); + Console.WriteLine(response.Status); ]]> @@ -1065,8 +1067,6 @@ Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); ]]> - - This sample shows how to call GetMetricsAsync and parse the result. @@ -1079,7 +1079,7 @@ RequestContent content = null; await foreach (BinaryData item in client.GetMetricsAsync("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetMetricsAsync with all parameters and request content and parse the result. @@ -1090,12 +1090,12 @@ LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - filters = new List() + filters = new object[] { new { name = "", - values = new List() + values = new object[] { "" }, @@ -1105,10 +1105,10 @@ RequestContent content = RequestContent.Create(new await foreach (BinaryData item in client.GetMetricsAsync("", "", "", "", content, aggregation: "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -1124,7 +1124,7 @@ RequestContent content = null; foreach (BinaryData item in client.GetMetrics("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetMetrics with all parameters and request content and parse the result. @@ -1135,12 +1135,12 @@ LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); RequestContent content = RequestContent.Create(new { - filters = new List() + filters = new object[] { new { name = "", - values = new List() + values = new object[] { "" }, @@ -1150,10 +1150,10 @@ RequestContent content = RequestContent.Create(new foreach (BinaryData item in client.GetMetrics("", "", "", "", content, aggregation: "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } ]]> @@ -1168,7 +1168,7 @@ LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("", "", "", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetMetricDimensionValuesAsync with all parameters and parse the result. @@ -1180,7 +1180,7 @@ LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("", "", "", "", "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> @@ -1195,7 +1195,7 @@ LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); foreach (BinaryData item in client.GetMetricDimensionValues("", "", "", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetMetricDimensionValues with all parameters and parse the result. @@ -1207,7 +1207,7 @@ LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); foreach (BinaryData item in client.GetMetricDimensionValues("", "", "", "", "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestAdministrationClient.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestAdministrationClient.cs index 8a210a261cada..bb697e555bc7f 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestAdministrationClient.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestAdministrationClient.cs @@ -294,7 +294,6 @@ public virtual Response GetTest(string testId, RequestContext context = null) /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task UploadTestFileAsync(string testId, string fileName, RequestContent content, string fileType = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testId, nameof(testId)); @@ -334,7 +333,6 @@ internal virtual async Task UploadTestFileAsync(string testId, string /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response UploadTestFile(string testId, string fileName, RequestContent content, string fileType = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testId, nameof(testId)); diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs index 1d314f0b63a5f..8513749ac977c 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/LoadTestRunClient.cs @@ -79,7 +79,6 @@ public LoadTestRunClient(Uri endpoint, TokenCredential credential, LoadTestingCl /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task CreateOrUpdateTestRunAsync(string testRunId, RequestContent content, string oldTestRunId = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); @@ -117,7 +116,6 @@ internal virtual async Task CreateOrUpdateTestRunAsync(string testRunI /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response CreateOrUpdateTestRun(string testRunId, RequestContent content, string oldTestRunId = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); 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 a195a7f6ebfe6..e5822c259d4ca 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 @@ -16,7 +16,7 @@ namespace Azure.Developer.LoadTesting.Samples { - public class Samples_LoadTestAdministrationClient + public partial class Samples_LoadTestAdministrationClient { [Test] [Ignore("Only validating compilation of examples")] @@ -313,6 +313,7 @@ public void Example_DeleteTest_ShortVersion() LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTest(""); + Console.WriteLine(response.Status); } @@ -325,6 +326,7 @@ public async Task Example_DeleteTest_ShortVersion_Async() LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestAsync(""); + Console.WriteLine(response.Status); } @@ -337,6 +339,7 @@ public void Example_DeleteTest_AllParameters() LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTest(""); + Console.WriteLine(response.Status); } @@ -349,6 +352,7 @@ public async Task Example_DeleteTest_AllParameters_Async() LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestAsync(""); + Console.WriteLine(response.Status); } @@ -603,6 +607,7 @@ public void Example_DeleteTestFile_ShortVersion() LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTestFile("", ""); + Console.WriteLine(response.Status); } @@ -615,6 +620,7 @@ public async Task Example_DeleteTestFile_ShortVersion_Async() LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestFileAsync("", ""); + Console.WriteLine(response.Status); } @@ -627,6 +633,7 @@ public void Example_DeleteTestFile_AllParameters() LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTestFile("", ""); + Console.WriteLine(response.Status); } @@ -639,6 +646,7 @@ public async Task Example_DeleteTestFile_AllParameters_Async() LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestFileAsync("", ""); + Console.WriteLine(response.Status); } @@ -1043,7 +1051,7 @@ public void Example_GetTestFiles_ShortVersion() foreach (BinaryData item in client.GetTestFiles("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1058,7 +1066,7 @@ public async Task Example_GetTestFiles_ShortVersion_Async() await foreach (BinaryData item in client.GetTestFilesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1073,12 +1081,12 @@ public void Example_GetTestFiles_AllParameters() 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()); + 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()); } } @@ -1093,12 +1101,12 @@ public async Task Example_GetTestFiles_AllParameters_Async() 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()); + 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()); } } } 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 4febfdc561109..9979f8280db8c 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Developer.LoadTesting.Samples { - public class Samples_LoadTestRunClient + public partial class Samples_LoadTestRunClient { [Test] [Ignore("Only validating compilation of examples")] @@ -272,6 +271,7 @@ public void Example_DeleteTestRun_ShortVersion() LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.DeleteTestRun(""); + Console.WriteLine(response.Status); } @@ -284,6 +284,7 @@ public async Task Example_DeleteTestRun_ShortVersion_Async() LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.DeleteTestRunAsync(""); + Console.WriteLine(response.Status); } @@ -296,6 +297,7 @@ public void Example_DeleteTestRun_AllParameters() LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.DeleteTestRun(""); + Console.WriteLine(response.Status); } @@ -308,6 +310,7 @@ public async Task Example_DeleteTestRun_AllParameters_Async() LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.DeleteTestRunAsync(""); + Console.WriteLine(response.Status); } @@ -1153,7 +1156,7 @@ public void Example_GetMetrics_ShortVersion() foreach (BinaryData item in client.GetMetrics("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1169,7 +1172,7 @@ public async Task Example_GetMetrics_ShortVersion_Async() await foreach (BinaryData item in client.GetMetricsAsync("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1183,25 +1186,25 @@ public void Example_GetMetrics_AllParameters() RequestContent content = RequestContent.Create(new { - filters = new List() -{ + filters = new object[] + { new { name = "", -values = new List() +values = new object[] { "" }, } -}, + }, }); foreach (BinaryData item in client.GetMetrics("", "", "", "", content, aggregation: "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -1215,25 +1218,25 @@ public async Task Example_GetMetrics_AllParameters_Async() RequestContent content = RequestContent.Create(new { - filters = new List() -{ + filters = new object[] + { new { name = "", -values = new List() +values = new object[] { "" }, } -}, + }, }); await foreach (BinaryData item in client.GetMetricsAsync("", "", "", "", content, aggregation: "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - 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()); + 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()); } } @@ -1248,7 +1251,7 @@ public void Example_GetMetricDimensionValues_ShortVersion() foreach (BinaryData item in client.GetMetricDimensionValues("", "", "", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1263,7 +1266,7 @@ public async Task Example_GetMetricDimensionValues_ShortVersion_Async() await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("", "", "", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1278,7 +1281,7 @@ public void Example_GetMetricDimensionValues_AllParameters() foreach (BinaryData item in client.GetMetricDimensionValues("", "", "", "", "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1293,7 +1296,7 @@ public async Task Example_GetMetricDimensionValues_AllParameters_Async() await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("", "", "", "", "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.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 65aaebc410e2f..33ddab341e4d8 100644 --- a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml +++ b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml @@ -9,11 +9,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = await client.UploadAsync("", "", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call UploadAsync with all parameters and request content. @@ -22,11 +23,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = await client.UploadAsync("", "", content, contentEncoding: ""); + Console.WriteLine(response.Status); ]]> @@ -38,11 +40,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = client.Upload("", "", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call Upload with all parameters and request content. @@ -51,11 +54,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = client.Upload("", "", content, contentEncoding: ""); + Console.WriteLine(response.Status); ]]> 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 e04b8b67dc97a..fbb7b292f6c8c 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Threading.Tasks; using Azure; using Azure.Core; @@ -16,7 +15,7 @@ namespace Azure.Monitor.Ingestion.Samples { - public class Samples_LogsIngestionClient + public partial class Samples_LogsIngestionClient { [Test] [Ignore("Only validating compilation of examples")] @@ -26,11 +25,12 @@ public void Example_Upload_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.Upload("", "", content); + Console.WriteLine(response.Status); } @@ -42,11 +42,12 @@ public async Task Example_Upload_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = await client.UploadAsync("", "", content); + Console.WriteLine(response.Status); } @@ -58,11 +59,12 @@ public void Example_Upload_AllParameters() TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.Upload("", "", content, contentEncoding: ""); + Console.WriteLine(response.Status); } @@ -74,11 +76,12 @@ public async Task Example_Upload_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); 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 deleted file mode 100644 index 81d67f3a17217..0000000000000 --- a/sdk/openai/Azure.AI.OpenAI/src/Generated/Docs/OpenAIClient.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/OpenAIClient.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/OpenAIClient.cs index 2275a9aef2c2b..5c9517355a947 100644 --- a/sdk/openai/Azure.AI.OpenAI/src/Generated/OpenAIClient.cs +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/OpenAIClient.cs @@ -42,7 +42,6 @@ protected OpenAIClient() /// Represents the request data used to generate images. /// The cancellation token to use. /// is null. - /// internal virtual async Task> BeginAzureBatchImageGenerationAsync(WaitUntil waitUntil, ImageGenerationOptions imageGenerationOptions, CancellationToken cancellationToken = default) { Argument.AssertNotNull(imageGenerationOptions, nameof(imageGenerationOptions)); @@ -57,7 +56,6 @@ internal virtual async Task> Be /// Represents the request data used to generate images. /// The cancellation token to use. /// is null. - /// internal virtual Operation BeginAzureBatchImageGeneration(WaitUntil waitUntil, ImageGenerationOptions imageGenerationOptions, CancellationToken cancellationToken = default) { Argument.AssertNotNull(imageGenerationOptions, nameof(imageGenerationOptions)); @@ -89,7 +87,6 @@ internal virtual Operation BeginAzureBatc /// is null. /// Service returned a non-success status code. /// The representing an asynchronous operation on the service. - /// internal virtual async Task> BeginAzureBatchImageGenerationAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -130,7 +127,6 @@ internal virtual async Task> BeginAzureBatchImageGeneratio /// is null. /// Service returned a non-success status code. /// The representing an asynchronous operation on the service. - /// internal virtual Operation BeginAzureBatchImageGeneration(WaitUntil waitUntil, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); 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 deleted file mode 100644 index 78a83161a2ad3..0000000000000 --- a/sdk/openai/Azure.AI.OpenAI/tests/Generated/Samples/Samples_OpenAIClient.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Identity; - -namespace Azure.AI.OpenAI.Samples -{ - public class Samples_OpenAIClient - { - } -} 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 1a4f3ac4a5dca..8b97b5e4f4a41 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 @@ -384,7 +384,7 @@ PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); await foreach (BinaryData item in client.GetCollectionsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetCollectionsAsync with all parameters and parse the result. @@ -396,18 +396,18 @@ 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()); + 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()); } ]]> @@ -422,7 +422,7 @@ PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); foreach (BinaryData item in client.GetCollections(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetCollections with all parameters and parse the result. @@ -434,18 +434,18 @@ 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()); + 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()); } ]]> @@ -460,7 +460,7 @@ PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); await foreach (BinaryData item in client.GetResourceSetRulesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetResourceSetRulesAsync with all parameters and parse the result. @@ -472,91 +472,91 @@ 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()); + 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()); } ]]> @@ -571,7 +571,7 @@ PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); foreach (BinaryData item in client.GetResourceSetRules(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetResourceSetRules with all parameters and parse the result. @@ -583,91 +583,91 @@ 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()); + 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()); } ]]> 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 f00b9ff55d4e6..6346b77e16ef3 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 @@ -174,6 +174,7 @@ 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. @@ -183,6 +184,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); + Console.WriteLine(response.Status); ]]> @@ -195,6 +197,7 @@ 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. @@ -204,6 +207,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); + Console.WriteLine(response.Status); ]]> @@ -270,7 +274,7 @@ PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPur await foreach (BinaryData item in client.GetChildCollectionNamesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetChildCollectionNamesAsync with all parameters and parse the result. @@ -282,8 +286,8 @@ PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPur 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()); + Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -298,7 +302,7 @@ PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPur foreach (BinaryData item in client.GetChildCollectionNames(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetChildCollectionNames with all parameters and parse the result. @@ -310,8 +314,8 @@ PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPur 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()); + Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> 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 5954c0c59a1ab..4e2e9530fe1a4 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 @@ -248,7 +248,7 @@ RequestContent content = RequestContent.Create(new }, pathPatternConfig = new { - acceptedPatterns = new List() + acceptedPatterns = new object[] { new { @@ -260,7 +260,7 @@ RequestContent content = RequestContent.Create(new path = "", } }, - complexReplacers = new List() + complexReplacers = new object[] { new { @@ -278,14 +278,14 @@ RequestContent content = RequestContent.Create(new enableDefaultPatterns = true, lastUpdatedTimestamp = 1234L, modifiedBy = "", - normalizationRules = new List() + normalizationRules = new object[] { new { description = "", disabled = true, dynamicReplacement = true, - entityTypes = new List() + entityTypes = new object[] { "" }, @@ -309,7 +309,7 @@ RequestContent content = RequestContent.Create(new version = 123.45, } }, - regexReplacers = new List() + regexReplacers = new object[] { new { @@ -324,16 +324,16 @@ RequestContent content = RequestContent.Create(new replaceWith = "", } }, - rejectedPatterns = new List() + rejectedPatterns = new object[] { null }, - scopedRules = new List() + scopedRules = new object[] { new { bindingUrl = "", - rules = new List() + rules = new object[] { new { @@ -469,7 +469,7 @@ RequestContent content = RequestContent.Create(new }, pathPatternConfig = new { - acceptedPatterns = new List() + acceptedPatterns = new object[] { new { @@ -481,7 +481,7 @@ RequestContent content = RequestContent.Create(new path = "", } }, - complexReplacers = new List() + complexReplacers = new object[] { new { @@ -499,14 +499,14 @@ RequestContent content = RequestContent.Create(new enableDefaultPatterns = true, lastUpdatedTimestamp = 1234L, modifiedBy = "", - normalizationRules = new List() + normalizationRules = new object[] { new { description = "", disabled = true, dynamicReplacement = true, - entityTypes = new List() + entityTypes = new object[] { "" }, @@ -530,7 +530,7 @@ RequestContent content = RequestContent.Create(new version = 123.45, } }, - regexReplacers = new List() + regexReplacers = new object[] { new { @@ -545,16 +545,16 @@ RequestContent content = RequestContent.Create(new replaceWith = "", } }, - rejectedPatterns = new List() + rejectedPatterns = new object[] { null }, - scopedRules = new List() + scopedRules = new object[] { new { bindingUrl = "", - rules = new List() + rules = new object[] { new { @@ -670,6 +670,7 @@ 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. @@ -679,6 +680,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = await client.DeleteResourceSetRuleAsync(); + Console.WriteLine(response.Status); ]]> @@ -691,6 +693,7 @@ 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. @@ -700,6 +703,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); + Console.WriteLine(response.Status); ]]> 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 bd44be3e187e0..329250bf5bd41 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 @@ -16,7 +16,7 @@ namespace Azure.Analytics.Purview.Account.Samples { - public class Samples_PurviewAccountClient + public partial class Samples_PurviewAccountClient { [Test] [Ignore("Only validating compilation of examples")] @@ -425,7 +425,7 @@ public void Example_GetCollections_ShortVersion() foreach (BinaryData item in client.GetCollections(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -440,7 +440,7 @@ public async Task Example_GetCollections_ShortVersion_Async() await foreach (BinaryData item in client.GetCollectionsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -455,18 +455,18 @@ public void Example_GetCollections_AllParameters() 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()); + 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()); } } @@ -481,18 +481,18 @@ public async Task Example_GetCollections_AllParameters_Async() 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()); + 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()); } } @@ -507,7 +507,7 @@ public void Example_GetResourceSetRules_ShortVersion() foreach (BinaryData item in client.GetResourceSetRules(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -522,7 +522,7 @@ public async Task Example_GetResourceSetRules_ShortVersion_Async() await foreach (BinaryData item in client.GetResourceSetRulesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -537,91 +537,91 @@ public void Example_GetResourceSetRules_AllParameters() 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()); + 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()); } } @@ -636,91 +636,91 @@ public async Task Example_GetResourceSetRules_AllParameters_Async() 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()); + 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()); } } } 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 74737a17af1d9..3371b78c1c0fa 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 @@ -16,7 +16,7 @@ namespace Azure.Analytics.Purview.Account.Samples { - internal class Samples_PurviewCollection + public partial class Samples_PurviewCollection { [Test] [Ignore("Only validating compilation of examples")] @@ -203,6 +203,7 @@ public void Example_DeleteCollection_ShortVersion() PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); + Console.WriteLine(response.Status); } @@ -215,6 +216,7 @@ public async Task Example_DeleteCollection_ShortVersion_Async() PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); + Console.WriteLine(response.Status); } @@ -227,6 +229,7 @@ public void Example_DeleteCollection_AllParameters() PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); + Console.WriteLine(response.Status); } @@ -239,6 +242,7 @@ public async Task Example_DeleteCollection_AllParameters_Async() PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); + Console.WriteLine(response.Status); } @@ -311,7 +315,7 @@ public void Example_GetChildCollectionNames_ShortVersion() foreach (BinaryData item in client.GetChildCollectionNames(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -326,7 +330,7 @@ public async Task Example_GetChildCollectionNames_ShortVersion_Async() await foreach (BinaryData item in client.GetChildCollectionNamesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -341,8 +345,8 @@ public void Example_GetChildCollectionNames_AllParameters() 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()); + Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -357,8 +361,8 @@ public async Task Example_GetChildCollectionNames_AllParameters_Async() 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()); + Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result.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 d675c0de8edd2..1c413281ab74e 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Analytics.Purview.Account.Samples { - internal class Samples_PurviewResourceSetRule + public partial class Samples_PurviewResourceSetRule { [Test] [Ignore("Only validating compilation of examples")] @@ -290,8 +289,8 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() }, pathPatternConfig = new { - acceptedPatterns = new List() -{ + acceptedPatterns = new object[] + { new { createdBy = "", @@ -301,9 +300,9 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() name = "", path = "", } -}, - complexReplacers = new List() -{ + }, + complexReplacers = new object[] + { new { createdBy = "", @@ -315,19 +314,19 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() name = "", typeName = "", } -}, + }, createdBy = "", enableDefaultPatterns = true, lastUpdatedTimestamp = 1234L, modifiedBy = "", - normalizationRules = new List() -{ + normalizationRules = new object[] + { new { description = "", disabled = true, dynamicReplacement = true, -entityTypes = new List() +entityTypes = new object[] { "" }, @@ -350,9 +349,9 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() replaceWith = "", version = 123.45, } -}, - regexReplacers = new List() -{ + }, + regexReplacers = new object[] + { new { condition = "", @@ -365,17 +364,17 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() name = "", replaceWith = "", } -}, - rejectedPatterns = new List() -{ + }, + rejectedPatterns = new object[] + { null -}, - scopedRules = new List() -{ + }, + scopedRules = new object[] + { new { bindingUrl = "", -rules = new List() +rules = new object[] { new { @@ -388,7 +387,7 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() }, storeType = "", } -}, + }, version = 1234, }, }); @@ -499,8 +498,8 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() }, pathPatternConfig = new { - acceptedPatterns = new List() -{ + acceptedPatterns = new object[] + { new { createdBy = "", @@ -510,9 +509,9 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() name = "", path = "", } -}, - complexReplacers = new List() -{ + }, + complexReplacers = new object[] + { new { createdBy = "", @@ -524,19 +523,19 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() name = "", typeName = "", } -}, + }, createdBy = "", enableDefaultPatterns = true, lastUpdatedTimestamp = 1234L, modifiedBy = "", - normalizationRules = new List() -{ + normalizationRules = new object[] + { new { description = "", disabled = true, dynamicReplacement = true, -entityTypes = new List() +entityTypes = new object[] { "" }, @@ -559,9 +558,9 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() replaceWith = "", version = 123.45, } -}, - regexReplacers = new List() -{ + }, + regexReplacers = new object[] + { new { condition = "", @@ -574,17 +573,17 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() name = "", replaceWith = "", } -}, - rejectedPatterns = new List() -{ + }, + rejectedPatterns = new object[] + { null -}, - scopedRules = new List() -{ + }, + scopedRules = new object[] + { new { bindingUrl = "", -rules = new List() +rules = new object[] { new { @@ -597,7 +596,7 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() }, storeType = "", } -}, + }, version = 1234, }, }); @@ -700,6 +699,7 @@ public void Example_DeleteResourceSetRule_ShortVersion() PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); + Console.WriteLine(response.Status); } @@ -712,6 +712,7 @@ public async Task Example_DeleteResourceSetRule_ShortVersion_Async() PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = await client.DeleteResourceSetRuleAsync(); + Console.WriteLine(response.Status); } @@ -724,6 +725,7 @@ public void Example_DeleteResourceSetRule_AllParameters() PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); + Console.WriteLine(response.Status); } @@ -736,6 +738,7 @@ public async Task Example_DeleteResourceSetRule_AllParameters_Async() 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 1a4f3ac4a5dca..8b97b5e4f4a41 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 @@ -384,7 +384,7 @@ PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); await foreach (BinaryData item in client.GetCollectionsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetCollectionsAsync with all parameters and parse the result. @@ -396,18 +396,18 @@ 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()); + 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()); } ]]> @@ -422,7 +422,7 @@ PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); foreach (BinaryData item in client.GetCollections(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetCollections with all parameters and parse the result. @@ -434,18 +434,18 @@ 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()); + 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()); } ]]> @@ -460,7 +460,7 @@ PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); await foreach (BinaryData item in client.GetResourceSetRulesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetResourceSetRulesAsync with all parameters and parse the result. @@ -472,91 +472,91 @@ 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()); + 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()); } ]]> @@ -571,7 +571,7 @@ PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); foreach (BinaryData item in client.GetResourceSetRules(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetResourceSetRules with all parameters and parse the result. @@ -583,91 +583,91 @@ 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()); + 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()); } ]]> 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 f00b9ff55d4e6..6346b77e16ef3 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 @@ -174,6 +174,7 @@ 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. @@ -183,6 +184,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); + Console.WriteLine(response.Status); ]]> @@ -195,6 +197,7 @@ 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. @@ -204,6 +207,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); + Console.WriteLine(response.Status); ]]> @@ -270,7 +274,7 @@ PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPur await foreach (BinaryData item in client.GetChildCollectionNamesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetChildCollectionNamesAsync with all parameters and parse the result. @@ -282,8 +286,8 @@ PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPur 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()); + Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -298,7 +302,7 @@ PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPur foreach (BinaryData item in client.GetChildCollectionNames(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetChildCollectionNames with all parameters and parse the result. @@ -310,8 +314,8 @@ PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPur 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()); + Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> 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 8e0b54d7d8339..5ac94438c086f 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 @@ -29,25 +29,25 @@ RequestContent content = RequestContent.Create(new properties = new { description = "", - decisionRules = new List() + decisionRules = new object[] { new { effect = "Deny", - dnfCondition = new List() + dnfCondition = new object[] { - new List() + new object[] { new { attributeName = "", attributeValueIncludes = "", - attributeValueIncludedIn = new List() + attributeValueIncludedIn = new object[] { "" }, attributeValueExcludes = "", - attributeValueExcludedIn = new List() + attributeValueExcludedIn = new object[] { "" }, @@ -56,15 +56,15 @@ RequestContent content = RequestContent.Create(new }, } }, - attributeRules = new List() + attributeRules = new object[] { new { id = "", name = "", - dnfCondition = new List() + dnfCondition = new object[] { - new List() + new object[] { null } @@ -133,25 +133,25 @@ RequestContent content = RequestContent.Create(new properties = new { description = "", - decisionRules = new List() + decisionRules = new object[] { new { effect = "Deny", - dnfCondition = new List() + dnfCondition = new object[] { - new List() + new object[] { new { attributeName = "", attributeValueIncludes = "", - attributeValueIncludedIn = new List() + attributeValueIncludedIn = new object[] { "" }, attributeValueExcludes = "", - attributeValueExcludedIn = new List() + attributeValueExcludedIn = new object[] { "" }, @@ -160,15 +160,15 @@ RequestContent content = RequestContent.Create(new }, } }, - attributeRules = new List() + attributeRules = new object[] { new { id = "", name = "", - dnfCondition = new List() + dnfCondition = new object[] { - new List() + new object[] { null } @@ -311,8 +311,6 @@ PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, " 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. @@ -323,8 +321,6 @@ PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, " await foreach (BinaryData item in client.GetMetadataPoliciesAsync(null)) { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); } ]]> @@ -338,8 +334,6 @@ PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, " 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. @@ -350,8 +344,6 @@ PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, " foreach (BinaryData item in client.GetMetadataPolicies(null)) { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); } ]]> 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 5d4c8020ab202..806c32b02e551 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 @@ -11,8 +11,6 @@ PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, cre 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. @@ -23,8 +21,6 @@ PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, cre await foreach (BinaryData item in client.GetMetadataRolesAsync(null)) { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); } ]]> @@ -38,8 +34,6 @@ PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, cre 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. @@ -50,8 +44,6 @@ PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, cre foreach (BinaryData item in client.GetMetadataRoles(null)) { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); } ]]> 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 5954c0c59a1ab..4e2e9530fe1a4 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 @@ -248,7 +248,7 @@ RequestContent content = RequestContent.Create(new }, pathPatternConfig = new { - acceptedPatterns = new List() + acceptedPatterns = new object[] { new { @@ -260,7 +260,7 @@ RequestContent content = RequestContent.Create(new path = "", } }, - complexReplacers = new List() + complexReplacers = new object[] { new { @@ -278,14 +278,14 @@ RequestContent content = RequestContent.Create(new enableDefaultPatterns = true, lastUpdatedTimestamp = 1234L, modifiedBy = "", - normalizationRules = new List() + normalizationRules = new object[] { new { description = "", disabled = true, dynamicReplacement = true, - entityTypes = new List() + entityTypes = new object[] { "" }, @@ -309,7 +309,7 @@ RequestContent content = RequestContent.Create(new version = 123.45, } }, - regexReplacers = new List() + regexReplacers = new object[] { new { @@ -324,16 +324,16 @@ RequestContent content = RequestContent.Create(new replaceWith = "", } }, - rejectedPatterns = new List() + rejectedPatterns = new object[] { null }, - scopedRules = new List() + scopedRules = new object[] { new { bindingUrl = "", - rules = new List() + rules = new object[] { new { @@ -469,7 +469,7 @@ RequestContent content = RequestContent.Create(new }, pathPatternConfig = new { - acceptedPatterns = new List() + acceptedPatterns = new object[] { new { @@ -481,7 +481,7 @@ RequestContent content = RequestContent.Create(new path = "", } }, - complexReplacers = new List() + complexReplacers = new object[] { new { @@ -499,14 +499,14 @@ RequestContent content = RequestContent.Create(new enableDefaultPatterns = true, lastUpdatedTimestamp = 1234L, modifiedBy = "", - normalizationRules = new List() + normalizationRules = new object[] { new { description = "", disabled = true, dynamicReplacement = true, - entityTypes = new List() + entityTypes = new object[] { "" }, @@ -530,7 +530,7 @@ RequestContent content = RequestContent.Create(new version = 123.45, } }, - regexReplacers = new List() + regexReplacers = new object[] { new { @@ -545,16 +545,16 @@ RequestContent content = RequestContent.Create(new replaceWith = "", } }, - rejectedPatterns = new List() + rejectedPatterns = new object[] { null }, - scopedRules = new List() + scopedRules = new object[] { new { bindingUrl = "", - rules = new List() + rules = new object[] { new { @@ -670,6 +670,7 @@ 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. @@ -679,6 +680,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = await client.DeleteResourceSetRuleAsync(); + Console.WriteLine(response.Status); ]]> @@ -691,6 +693,7 @@ 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. @@ -700,6 +703,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); + Console.WriteLine(response.Status); ]]> 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 e7b66d1715408..14a1f819f6b7a 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 @@ -16,7 +16,7 @@ namespace Azure.Analytics.Purview.Administration.Samples { - public class Samples_PurviewAccountClient + public partial class Samples_PurviewAccountClient { [Test] [Ignore("Only validating compilation of examples")] @@ -425,7 +425,7 @@ public void Example_GetCollections_ShortVersion() foreach (BinaryData item in client.GetCollections(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -440,7 +440,7 @@ public async Task Example_GetCollections_ShortVersion_Async() await foreach (BinaryData item in client.GetCollectionsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -455,18 +455,18 @@ public void Example_GetCollections_AllParameters() 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()); + 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()); } } @@ -481,18 +481,18 @@ public async Task Example_GetCollections_AllParameters_Async() 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()); + 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()); } } @@ -507,7 +507,7 @@ public void Example_GetResourceSetRules_ShortVersion() foreach (BinaryData item in client.GetResourceSetRules(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -522,7 +522,7 @@ public async Task Example_GetResourceSetRules_ShortVersion_Async() await foreach (BinaryData item in client.GetResourceSetRulesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -537,91 +537,91 @@ public void Example_GetResourceSetRules_AllParameters() 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()); + 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()); } } @@ -636,91 +636,91 @@ public async Task Example_GetResourceSetRules_AllParameters_Async() 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()); + 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()); } } } 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 3b1646000f467..6a684bcbf0510 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 @@ -16,7 +16,7 @@ namespace Azure.Analytics.Purview.Administration.Samples { - internal class Samples_PurviewCollection + public partial class Samples_PurviewCollection { [Test] [Ignore("Only validating compilation of examples")] @@ -203,6 +203,7 @@ public void Example_DeleteCollection_ShortVersion() PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); + Console.WriteLine(response.Status); } @@ -215,6 +216,7 @@ public async Task Example_DeleteCollection_ShortVersion_Async() PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); + Console.WriteLine(response.Status); } @@ -227,6 +229,7 @@ public void Example_DeleteCollection_AllParameters() PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); + Console.WriteLine(response.Status); } @@ -239,6 +242,7 @@ public async Task Example_DeleteCollection_AllParameters_Async() PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); + Console.WriteLine(response.Status); } @@ -311,7 +315,7 @@ public void Example_GetChildCollectionNames_ShortVersion() foreach (BinaryData item in client.GetChildCollectionNames(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -326,7 +330,7 @@ public async Task Example_GetChildCollectionNames_ShortVersion_Async() await foreach (BinaryData item in client.GetChildCollectionNamesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -341,8 +345,8 @@ public void Example_GetChildCollectionNames_AllParameters() 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()); + Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -357,8 +361,8 @@ public async Task Example_GetChildCollectionNames_AllParameters_Async() 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()); + Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result.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 8f52d1bc53bca..47446903eef4c 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Analytics.Purview.Administration.Samples { - public class Samples_PurviewMetadataPolicyClient + public partial class Samples_PurviewMetadataPolicyClient { [Test] [Ignore("Only validating compilation of examples")] @@ -65,25 +64,25 @@ public void Example_UpdateMetadataPolicy_AllParameters() properties = new { description = "", - decisionRules = new List() -{ + decisionRules = new object[] + { new { effect = "Deny", -dnfCondition = new List() +dnfCondition = new object[] { -new List() +new object[] { new { attributeName = "", attributeValueIncludes = "", -attributeValueIncludedIn = new List() +attributeValueIncludedIn = new object[] { "" }, attributeValueExcludes = "", -attributeValueExcludedIn = new List() +attributeValueExcludedIn = new object[] { "" }, @@ -91,22 +90,22 @@ public void Example_UpdateMetadataPolicy_AllParameters() } }, } -}, - attributeRules = new List() -{ + }, + attributeRules = new object[] + { new { id = "", name = "", -dnfCondition = new List() +dnfCondition = new object[] { -new List() +new object[] { null } }, } -}, + }, collection = new { referenceName = "", @@ -157,25 +156,25 @@ public async Task Example_UpdateMetadataPolicy_AllParameters_Async() properties = new { description = "", - decisionRules = new List() -{ + decisionRules = new object[] + { new { effect = "Deny", -dnfCondition = new List() +dnfCondition = new object[] { -new List() +new object[] { new { attributeName = "", attributeValueIncludes = "", -attributeValueIncludedIn = new List() +attributeValueIncludedIn = new object[] { "" }, attributeValueExcludes = "", -attributeValueExcludedIn = new List() +attributeValueExcludedIn = new object[] { "" }, @@ -183,22 +182,22 @@ public async Task Example_UpdateMetadataPolicy_AllParameters_Async() } }, } -}, - attributeRules = new List() -{ + }, + attributeRules = new object[] + { new { id = "", name = "", -dnfCondition = new List() +dnfCondition = new object[] { -new List() +new object[] { null } }, } -}, + }, collection = new { referenceName = "", @@ -341,8 +340,6 @@ public void Example_GetMetadataPolicies_ShortVersion() foreach (BinaryData item in client.GetMetadataPolicies(null)) { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); } } @@ -356,8 +353,6 @@ public async Task Example_GetMetadataPolicies_ShortVersion_Async() await foreach (BinaryData item in client.GetMetadataPoliciesAsync(null)) { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); } } @@ -371,8 +366,6 @@ public void Example_GetMetadataPolicies_AllParameters() foreach (BinaryData item in client.GetMetadataPolicies(null)) { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); } } @@ -386,8 +379,6 @@ public async Task Example_GetMetadataPolicies_AllParameters_Async() 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 85707d83b5d80..74847864753f8 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,7 +6,6 @@ #nullable disable using System; -using System.Text.Json; using System.Threading.Tasks; using Azure.Analytics.Purview.Administration; using Azure.Core; @@ -15,7 +14,7 @@ namespace Azure.Analytics.Purview.Administration.Samples { - public class Samples_PurviewMetadataRolesClient + public partial class Samples_PurviewMetadataRolesClient { [Test] [Ignore("Only validating compilation of examples")] @@ -27,8 +26,6 @@ public void Example_GetMetadataRoles_ShortVersion() foreach (BinaryData item in client.GetMetadataRoles(null)) { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); } } @@ -42,8 +39,6 @@ public async Task Example_GetMetadataRoles_ShortVersion_Async() await foreach (BinaryData item in client.GetMetadataRolesAsync(null)) { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); } } @@ -57,8 +52,6 @@ public void Example_GetMetadataRoles_AllParameters() foreach (BinaryData item in client.GetMetadataRoles(null)) { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); } } @@ -72,8 +65,6 @@ public async Task Example_GetMetadataRoles_AllParameters_Async() 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 a7c6321b2af86..17fa92639c525 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Analytics.Purview.Administration.Samples { - internal class Samples_PurviewResourceSetRule + public partial class Samples_PurviewResourceSetRule { [Test] [Ignore("Only validating compilation of examples")] @@ -290,8 +289,8 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() }, pathPatternConfig = new { - acceptedPatterns = new List() -{ + acceptedPatterns = new object[] + { new { createdBy = "", @@ -301,9 +300,9 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() name = "", path = "", } -}, - complexReplacers = new List() -{ + }, + complexReplacers = new object[] + { new { createdBy = "", @@ -315,19 +314,19 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() name = "", typeName = "", } -}, + }, createdBy = "", enableDefaultPatterns = true, lastUpdatedTimestamp = 1234L, modifiedBy = "", - normalizationRules = new List() -{ + normalizationRules = new object[] + { new { description = "", disabled = true, dynamicReplacement = true, -entityTypes = new List() +entityTypes = new object[] { "" }, @@ -350,9 +349,9 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() replaceWith = "", version = 123.45, } -}, - regexReplacers = new List() -{ + }, + regexReplacers = new object[] + { new { condition = "", @@ -365,17 +364,17 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() name = "", replaceWith = "", } -}, - rejectedPatterns = new List() -{ + }, + rejectedPatterns = new object[] + { null -}, - scopedRules = new List() -{ + }, + scopedRules = new object[] + { new { bindingUrl = "", -rules = new List() +rules = new object[] { new { @@ -388,7 +387,7 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() }, storeType = "", } -}, + }, version = 1234, }, }); @@ -499,8 +498,8 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() }, pathPatternConfig = new { - acceptedPatterns = new List() -{ + acceptedPatterns = new object[] + { new { createdBy = "", @@ -510,9 +509,9 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() name = "", path = "", } -}, - complexReplacers = new List() -{ + }, + complexReplacers = new object[] + { new { createdBy = "", @@ -524,19 +523,19 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() name = "", typeName = "", } -}, + }, createdBy = "", enableDefaultPatterns = true, lastUpdatedTimestamp = 1234L, modifiedBy = "", - normalizationRules = new List() -{ + normalizationRules = new object[] + { new { description = "", disabled = true, dynamicReplacement = true, -entityTypes = new List() +entityTypes = new object[] { "" }, @@ -559,9 +558,9 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() replaceWith = "", version = 123.45, } -}, - regexReplacers = new List() -{ + }, + regexReplacers = new object[] + { new { condition = "", @@ -574,17 +573,17 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() name = "", replaceWith = "", } -}, - rejectedPatterns = new List() -{ + }, + rejectedPatterns = new object[] + { null -}, - scopedRules = new List() -{ + }, + scopedRules = new object[] + { new { bindingUrl = "", -rules = new List() +rules = new object[] { new { @@ -597,7 +596,7 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() }, storeType = "", } -}, + }, version = 1234, }, }); @@ -700,6 +699,7 @@ public void Example_DeleteResourceSetRule_ShortVersion() PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); + Console.WriteLine(response.Status); } @@ -712,6 +712,7 @@ public async Task Example_DeleteResourceSetRule_ShortVersion_Async() PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = await client.DeleteResourceSetRuleAsync(); + Console.WriteLine(response.Status); } @@ -724,6 +725,7 @@ public void Example_DeleteResourceSetRule_AllParameters() PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); + Console.WriteLine(response.Status); } @@ -736,6 +738,7 @@ public async Task Example_DeleteResourceSetRule_AllParameters_Async() 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 42abab397468e..356fa88a35086 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 @@ -27,7 +27,7 @@ RequestContent content = RequestContent.Create(new offset = 1234, limit = 1234, filter = new object(), - facets = new List() + facets = new object[] { new { @@ -38,7 +38,7 @@ RequestContent content = RequestContent.Create(new }, taxonomySetting = new { - assetTypes = new List() + assetTypes = new object[] { "" }, @@ -112,7 +112,7 @@ RequestContent content = RequestContent.Create(new offset = 1234, limit = 1234, filter = new object(), - facets = new List() + facets = new object[] { new { @@ -123,7 +123,7 @@ RequestContent content = RequestContent.Create(new }, taxonomySetting = new { - assetTypes = new List() + assetTypes = new object[] { "" }, 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 3572b2732f365..2d4f6919dddf0 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 @@ -29,14 +29,14 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -67,11 +67,11 @@ RequestContent content = RequestContent.Create(new guid = "", homeId = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -104,7 +104,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -120,9 +120,7 @@ RequestContent content = RequestContent.Create(new typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = await client.CreateOrUpdateEntityAsync("", content); @@ -220,14 +218,14 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -258,11 +256,11 @@ RequestContent content = RequestContent.Create(new guid = "", homeId = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -295,7 +293,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -311,9 +309,7 @@ RequestContent content = RequestContent.Create(new typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = client.CreateOrUpdateEntity("", content); @@ -405,7 +401,7 @@ PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPu RequestContent content = RequestContent.Create(new { - entities = new List() + entities = new object[] { new { @@ -413,14 +409,14 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -451,11 +447,11 @@ RequestContent content = RequestContent.Create(new guid = "", homeId = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -488,7 +484,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -505,9 +501,7 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = await client.CreateOrUpdateEntityInBulkAsync("", content); @@ -599,7 +593,7 @@ PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPu RequestContent content = RequestContent.Create(new { - entities = new List() + entities = new object[] { new { @@ -607,14 +601,14 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -645,11 +639,11 @@ RequestContent content = RequestContent.Create(new guid = "", homeId = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -682,7 +676,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -699,9 +693,7 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = client.CreateOrUpdateEntityInBulk("", content); @@ -793,7 +785,7 @@ PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPu RequestContent content = RequestContent.Create(new { - entityGuids = new List() + entityGuids = new object[] { "" }, @@ -888,7 +880,7 @@ PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPu RequestContent content = RequestContent.Create(new { - entityGuids = new List() + entityGuids = new object[] { "" }, 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 f00ce855d85db..c55dbe50ff178 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 @@ -29,14 +29,14 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -67,11 +67,11 @@ RequestContent content = RequestContent.Create(new guid = "", homeId = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -104,7 +104,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -120,9 +120,7 @@ RequestContent content = RequestContent.Create(new typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = await client.CreateOrUpdateAsync(content); @@ -220,14 +218,14 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -258,11 +256,11 @@ RequestContent content = RequestContent.Create(new guid = "", homeId = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -295,7 +293,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -311,9 +309,7 @@ RequestContent content = RequestContent.Create(new typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = client.CreateOrUpdate(content); @@ -391,10 +387,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.GetByGuidsAsync(new List() -{ - "" -}, null, null, null, null); +Response response = await client.GetByGuidsAsync(new string[] { "" }, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -405,13 +398,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.GetByGuidsAsync(new List() -{ - "" -}, true, true, new List() -{ - "" -}, null); +Response response = await client.GetByGuidsAsync(new string[] { "" }, true, true, new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); @@ -510,10 +497,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.GetByGuids(new List() -{ - "" -}, null, null, null, null); +Response response = client.GetByGuids(new string[] { "" }, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -524,13 +508,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.GetByGuids(new List() -{ - "" -}, true, true, new List() -{ - "" -}, null); +Response response = client.GetByGuids(new string[] { "" }, true, true, new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); @@ -643,7 +621,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi RequestContent content = RequestContent.Create(new { - entities = new List() + entities = new object[] { new { @@ -651,14 +629,14 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -689,11 +667,11 @@ RequestContent content = RequestContent.Create(new guid = "", homeId = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -726,7 +704,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -743,9 +721,7 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = await client.CreateOrUpdateEntitiesAsync(content); @@ -837,7 +813,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi RequestContent content = RequestContent.Create(new { - entities = new List() + entities = new object[] { new { @@ -845,14 +821,14 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -883,11 +859,11 @@ RequestContent content = RequestContent.Create(new guid = "", homeId = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -920,7 +896,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -937,9 +913,7 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = client.CreateOrUpdateEntities(content); @@ -1017,10 +991,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.DeleteByGuidsAsync(new List() -{ - "" -}, null); +Response response = await client.DeleteByGuidsAsync(new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1031,10 +1002,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.DeleteByGuidsAsync(new List() -{ - "" -}, null); +Response response = await client.DeleteByGuidsAsync(new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); @@ -1110,10 +1078,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.DeleteByGuids(new List() -{ - "" -}, null); +Response response = client.DeleteByGuids(new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1124,10 +1089,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.DeleteByGuids(new List() -{ - "" -}, null); +Response response = client.DeleteByGuids(new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); @@ -1205,6 +1167,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi RequestContent content = RequestContent.Create(new object()); Response response = await client.AddClassificationAsync(content); + Console.WriteLine(response.Status); ]]> This sample shows how to call AddClassificationAsync with all request content. @@ -1220,7 +1183,7 @@ RequestContent content = RequestContent.Create(new entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -1241,12 +1204,13 @@ RequestContent content = RequestContent.Create(new typeName = "", lastModifiedTS = "", }, - entityGuids = new List() + entityGuids = new object[] { "" }, }); Response response = await client.AddClassificationAsync(content); + Console.WriteLine(response.Status); ]]> @@ -1260,6 +1224,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi RequestContent content = RequestContent.Create(new object()); Response response = client.AddClassification(content); + Console.WriteLine(response.Status); ]]> This sample shows how to call AddClassification with all request content. @@ -1275,7 +1240,7 @@ RequestContent content = RequestContent.Create(new entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -1296,12 +1261,13 @@ RequestContent content = RequestContent.Create(new typeName = "", lastModifiedTS = "", }, - entityGuids = new List() + entityGuids = new object[] { "" }, }); Response response = client.AddClassification(content); + Console.WriteLine(response.Status); ]]> @@ -1956,6 +1922,7 @@ 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. @@ -1965,6 +1932,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -1977,6 +1945,7 @@ 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. @@ -1986,6 +1955,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassification("", ""); + Console.WriteLine(response.Status); ]]> @@ -2057,11 +2027,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = await client.AddClassificationsAsync("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call AddClassificationsAsync with all parameters and request content. @@ -2070,14 +2041,14 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -2100,6 +2071,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = await client.AddClassificationsAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -2111,11 +2083,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = client.AddClassifications("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call AddClassifications with all parameters and request content. @@ -2124,14 +2097,14 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -2154,6 +2127,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = client.AddClassifications("", content); + Console.WriteLine(response.Status); ]]> @@ -2165,11 +2139,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = await client.UpdateClassificationsAsync("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateClassificationsAsync with all parameters and request content. @@ -2178,14 +2153,14 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -2208,6 +2183,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = await client.UpdateClassificationsAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -2219,11 +2195,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = client.UpdateClassifications("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateClassifications with all parameters and request content. @@ -2232,14 +2209,14 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -2262,6 +2239,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = client.UpdateClassifications("", content); + Console.WriteLine(response.Status); ]]> @@ -2513,14 +2491,14 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -2551,11 +2529,11 @@ RequestContent content = RequestContent.Create(new guid = "", homeId = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -2588,7 +2566,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -2604,9 +2582,7 @@ RequestContent content = RequestContent.Create(new typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", content, attrQualifiedName: ""); @@ -2704,14 +2680,14 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -2742,11 +2718,11 @@ RequestContent content = RequestContent.Create(new guid = "", homeId = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -2779,7 +2755,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -2795,9 +2771,7 @@ RequestContent content = RequestContent.Create(new typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = client.PartialUpdateEntityByUniqueAttributes("", content, attrQualifiedName: ""); @@ -3050,6 +3024,7 @@ 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. @@ -3059,6 +3034,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationByUniqueAttributeAsync("", "", attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -3071,6 +3047,7 @@ 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. @@ -3080,6 +3057,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassificationByUniqueAttribute("", "", attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -3091,11 +3069,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = await client.AddClassificationsByUniqueAttributeAsync("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call AddClassificationsByUniqueAttributeAsync with all parameters and request content. @@ -3104,14 +3083,14 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -3134,6 +3113,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = await client.AddClassificationsByUniqueAttributeAsync("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -3145,11 +3125,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = client.AddClassificationsByUniqueAttribute("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call AddClassificationsByUniqueAttribute with all parameters and request content. @@ -3158,14 +3139,14 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -3188,6 +3169,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = client.AddClassificationsByUniqueAttribute("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -3199,11 +3181,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateClassificationsByUniqueAttributeAsync with all parameters and request content. @@ -3212,14 +3195,14 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -3242,6 +3225,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -3253,11 +3237,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = client.UpdateClassificationsByUniqueAttribute("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateClassificationsByUniqueAttribute with all parameters and request content. @@ -3266,14 +3251,14 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -3296,6 +3281,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = client.UpdateClassificationsByUniqueAttribute("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -3325,18 +3311,18 @@ RequestContent content = RequestContent.Create(new { key = new { - classificationNames = new List() + classificationNames = new object[] { "" }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -3361,15 +3347,15 @@ RequestContent content = RequestContent.Create(new displayText = "", guid = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meaningNames = new List() + meaningNames = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -3427,18 +3413,18 @@ RequestContent content = RequestContent.Create(new { key = new { - classificationNames = new List() + classificationNames = new object[] { "" }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -3463,15 +3449,15 @@ RequestContent content = RequestContent.Create(new displayText = "", guid = "", isIncomplete = true, - labels = new List() + labels = new object[] { "" }, - meaningNames = new List() + meaningNames = new object[] { "" }, - meanings = new List() + meanings = new object[] { new { @@ -3843,6 +3829,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -3856,6 +3843,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }); Response response = await client.DeleteBusinessMetadataAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -3869,6 +3857,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -3882,6 +3871,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }); Response response = client.DeleteBusinessMetadata("", content); + Console.WriteLine(response.Status); ]]> @@ -3895,6 +3885,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -3908,6 +3899,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }); Response response = await client.AddOrUpdateBusinessMetadataAsync("", content, isOverwrite: true); + Console.WriteLine(response.Status); ]]> @@ -3921,6 +3913,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -3934,6 +3927,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }); Response response = client.AddOrUpdateBusinessMetadata("", content, isOverwrite: true); + Console.WriteLine(response.Status); ]]> @@ -3947,6 +3941,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -3960,6 +3955,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }); Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", content); + Console.WriteLine(response.Status); ]]> @@ -3973,6 +3969,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -3986,6 +3983,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }); Response response = client.DeleteBusinessMetadataAttributes("", "", content); + Console.WriteLine(response.Status); ]]> @@ -3999,6 +3997,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4012,6 +4011,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }); Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); + Console.WriteLine(response.Status); ]]> @@ -4025,6 +4025,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4038,6 +4039,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }); Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); + Console.WriteLine(response.Status); ]]> @@ -4050,12 +4052,11 @@ 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); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> This sample shows how to call GetSampleBusinessMetadataTemplateAsync with all parameters and parse the result. @@ -4065,12 +4066,11 @@ 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); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> @@ -4083,12 +4083,11 @@ 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); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> This sample shows how to call GetSampleBusinessMetadataTemplate with all parameters and parse the result. @@ -4098,12 +4097,11 @@ 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); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } ]]> @@ -4185,6 +4183,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4193,11 +4192,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = await client.DeleteLabelsAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -4211,6 +4211,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4219,11 +4220,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = client.DeleteLabels("", content); + Console.WriteLine(response.Status); ]]> @@ -4237,6 +4239,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4245,11 +4248,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = await client.SetLabelsAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -4263,6 +4267,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4271,11 +4276,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = client.SetLabels("", content); + Console.WriteLine(response.Status); ]]> @@ -4289,6 +4295,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4297,11 +4304,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = await client.AddLabelAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -4315,6 +4323,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4323,11 +4332,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = client.AddLabel("", content); + Console.WriteLine(response.Status); ]]> @@ -4341,6 +4351,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4349,11 +4360,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = await client.DeleteLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -4367,6 +4379,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4375,11 +4388,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = client.DeleteLabelsByUniqueAttribute("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -4393,6 +4407,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4401,11 +4416,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = await client.SetLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -4419,6 +4435,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4427,11 +4444,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = client.SetLabelsByUniqueAttribute("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -4445,6 +4463,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4453,11 +4472,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = await client.AddLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> @@ -4471,6 +4491,7 @@ PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurvi 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. @@ -4479,11 +4500,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); Response response = client.AddLabelsByUniqueAttribute("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); ]]> 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 cf4769ebccdfe..45fd3f9508e45 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 @@ -135,7 +135,7 @@ PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPur RequestContent content = RequestContent.Create(new { - categories = new List() + categories = new object[] { new { @@ -147,7 +147,7 @@ RequestContent content = RequestContent.Create(new } }, language = "", - terms = new List() + terms = new object[] { new { @@ -162,14 +162,14 @@ RequestContent content = RequestContent.Create(new } }, usage = "", - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -257,7 +257,7 @@ PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPur RequestContent content = RequestContent.Create(new { - categories = new List() + categories = new object[] { new { @@ -269,7 +269,7 @@ RequestContent content = RequestContent.Create(new } }, language = "", - terms = new List() + terms = new object[] { new { @@ -284,14 +284,14 @@ RequestContent content = RequestContent.Create(new } }, usage = "", - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -365,7 +365,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -380,7 +380,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -390,7 +390,7 @@ RequestContent content = RequestContent.Create(new List() glossaryGuid = "", relationGuid = "", }, - childrenCategories = new List() + childrenCategories = new object[] { new { @@ -401,7 +401,7 @@ RequestContent content = RequestContent.Create(new List() relationGuid = "", } }, - terms = new List() + terms = new object[] { new { @@ -415,14 +415,14 @@ RequestContent content = RequestContent.Create(new List() termGuid = "", } }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -503,7 +503,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -518,7 +518,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -528,7 +528,7 @@ RequestContent content = RequestContent.Create(new List() glossaryGuid = "", relationGuid = "", }, - childrenCategories = new List() + childrenCategories = new object[] { new { @@ -539,7 +539,7 @@ RequestContent content = RequestContent.Create(new List() relationGuid = "", } }, - terms = new List() + terms = new object[] { new { @@ -553,14 +553,14 @@ RequestContent content = RequestContent.Create(new List() termGuid = "", } }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -661,7 +661,7 @@ RequestContent content = RequestContent.Create(new glossaryGuid = "", relationGuid = "", }, - childrenCategories = new List() + childrenCategories = new object[] { new { @@ -672,7 +672,7 @@ RequestContent content = RequestContent.Create(new relationGuid = "", } }, - terms = new List() + terms = new object[] { new { @@ -686,14 +686,14 @@ RequestContent content = RequestContent.Create(new termGuid = "", } }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -793,7 +793,7 @@ RequestContent content = RequestContent.Create(new glossaryGuid = "", relationGuid = "", }, - childrenCategories = new List() + childrenCategories = new object[] { new { @@ -804,7 +804,7 @@ RequestContent content = RequestContent.Create(new relationGuid = "", } }, - terms = new List() + terms = new object[] { new { @@ -818,14 +818,14 @@ RequestContent content = RequestContent.Create(new termGuid = "", } }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -1049,7 +1049,7 @@ RequestContent content = RequestContent.Create(new glossaryGuid = "", relationGuid = "", }, - childrenCategories = new List() + childrenCategories = new object[] { new { @@ -1060,7 +1060,7 @@ RequestContent content = RequestContent.Create(new relationGuid = "", } }, - terms = new List() + terms = new object[] { new { @@ -1074,14 +1074,14 @@ RequestContent content = RequestContent.Create(new termGuid = "", } }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -1181,7 +1181,7 @@ RequestContent content = RequestContent.Create(new glossaryGuid = "", relationGuid = "", }, - childrenCategories = new List() + childrenCategories = new object[] { new { @@ -1192,7 +1192,7 @@ RequestContent content = RequestContent.Create(new relationGuid = "", } }, - terms = new List() + terms = new object[] { new { @@ -1206,14 +1206,14 @@ RequestContent content = RequestContent.Create(new termGuid = "", } }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -1294,6 +1294,7 @@ 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. @@ -1303,6 +1304,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryCategoryAsync(""); + Console.WriteLine(response.Status); ]]> @@ -1315,6 +1317,7 @@ 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. @@ -1324,6 +1327,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryCategory(""); + Console.WriteLine(response.Status); ]]> @@ -1612,7 +1616,7 @@ PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPur RequestContent content = RequestContent.Create(new { abbreviation = "", - templateName = new List() + templateName = new object[] { new object() }, @@ -1622,7 +1626,7 @@ RequestContent content = RequestContent.Create(new glossaryGuid = "", relationGuid = "", }, - antonyms = new List() + antonyms = new object[] { new { @@ -1641,7 +1645,7 @@ RequestContent content = RequestContent.Create(new updateTime = 123.45F, updatedBy = "", status = "Draft", - resources = new List() + resources = new object[] { new { @@ -1651,7 +1655,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -1667,7 +1671,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }, }, - assignedEntities = new List() + assignedEntities = new object[] { new { @@ -1693,7 +1697,7 @@ RequestContent content = RequestContent.Create(new }, } }, - categories = new List() + categories = new object[] { new { @@ -1704,67 +1708,67 @@ RequestContent content = RequestContent.Create(new status = "DRAFT", } }, - classifies = new List() + classifies = new object[] { null }, - examples = new List() + examples = new object[] { "" }, - isA = new List() + isA = new object[] { null }, - preferredTerms = new List() + preferredTerms = new object[] { null }, - preferredToTerms = new List() + preferredToTerms = new object[] { null }, - replacedBy = new List() + replacedBy = new object[] { null }, - replacementTerms = new List() + replacementTerms = new object[] { null }, - seeAlso = new List() + seeAlso = new object[] { null }, - synonyms = new List() + synonyms = new object[] { null }, - translatedTerms = new List() + translatedTerms = new object[] { null }, - translationTerms = new List() + translationTerms = new object[] { null }, usage = "", - validValues = new List() + validValues = new object[] { null }, - validValuesFor = new List() + validValuesFor = new object[] { null }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -1975,7 +1979,7 @@ PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPur RequestContent content = RequestContent.Create(new { abbreviation = "", - templateName = new List() + templateName = new object[] { new object() }, @@ -1985,7 +1989,7 @@ RequestContent content = RequestContent.Create(new glossaryGuid = "", relationGuid = "", }, - antonyms = new List() + antonyms = new object[] { new { @@ -2004,7 +2008,7 @@ RequestContent content = RequestContent.Create(new updateTime = 123.45F, updatedBy = "", status = "Draft", - resources = new List() + resources = new object[] { new { @@ -2014,7 +2018,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -2030,7 +2034,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }, }, - assignedEntities = new List() + assignedEntities = new object[] { new { @@ -2056,7 +2060,7 @@ RequestContent content = RequestContent.Create(new }, } }, - categories = new List() + categories = new object[] { new { @@ -2067,67 +2071,67 @@ RequestContent content = RequestContent.Create(new status = "DRAFT", } }, - classifies = new List() + classifies = new object[] { null }, - examples = new List() + examples = new object[] { "" }, - isA = new List() + isA = new object[] { null }, - preferredTerms = new List() + preferredTerms = new object[] { null }, - preferredToTerms = new List() + preferredToTerms = new object[] { null }, - replacedBy = new List() + replacedBy = new object[] { null }, - replacementTerms = new List() + replacementTerms = new object[] { null }, - seeAlso = new List() + seeAlso = new object[] { null }, - synonyms = new List() + synonyms = new object[] { null }, - translatedTerms = new List() + translatedTerms = new object[] { null }, - translationTerms = new List() + translationTerms = new object[] { null }, usage = "", - validValues = new List() + validValues = new object[] { null }, - validValuesFor = new List() + validValuesFor = new object[] { null }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -2334,10 +2338,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetGlossaryTermAsync("", true, new List() -{ - "" -}, null); +Response response = await client.GetGlossaryTermAsync("", true, new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -2515,10 +2516,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetGlossaryTerm("", true, new List() -{ - "" -}, null); +Response response = client.GetGlossaryTerm("", true, new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -2700,7 +2698,7 @@ PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPur RequestContent content = RequestContent.Create(new { abbreviation = "", - templateName = new List() + templateName = new object[] { new object() }, @@ -2710,7 +2708,7 @@ RequestContent content = RequestContent.Create(new glossaryGuid = "", relationGuid = "", }, - antonyms = new List() + antonyms = new object[] { new { @@ -2729,7 +2727,7 @@ RequestContent content = RequestContent.Create(new updateTime = 123.45F, updatedBy = "", status = "Draft", - resources = new List() + resources = new object[] { new { @@ -2739,7 +2737,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -2755,7 +2753,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }, }, - assignedEntities = new List() + assignedEntities = new object[] { new { @@ -2781,7 +2779,7 @@ RequestContent content = RequestContent.Create(new }, } }, - categories = new List() + categories = new object[] { new { @@ -2792,67 +2790,67 @@ RequestContent content = RequestContent.Create(new status = "DRAFT", } }, - classifies = new List() + classifies = new object[] { null }, - examples = new List() + examples = new object[] { "" }, - isA = new List() + isA = new object[] { null }, - preferredTerms = new List() + preferredTerms = new object[] { null }, - preferredToTerms = new List() + preferredToTerms = new object[] { null }, - replacedBy = new List() + replacedBy = new object[] { null }, - replacementTerms = new List() + replacementTerms = new object[] { null }, - seeAlso = new List() + seeAlso = new object[] { null }, - synonyms = new List() + synonyms = new object[] { null }, - translatedTerms = new List() + translatedTerms = new object[] { null }, - translationTerms = new List() + translationTerms = new object[] { null }, usage = "", - validValues = new List() + validValues = new object[] { null }, - validValuesFor = new List() + validValuesFor = new object[] { null }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -3063,7 +3061,7 @@ PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPur RequestContent content = RequestContent.Create(new { abbreviation = "", - templateName = new List() + templateName = new object[] { new object() }, @@ -3073,7 +3071,7 @@ RequestContent content = RequestContent.Create(new glossaryGuid = "", relationGuid = "", }, - antonyms = new List() + antonyms = new object[] { new { @@ -3092,7 +3090,7 @@ RequestContent content = RequestContent.Create(new updateTime = 123.45F, updatedBy = "", status = "Draft", - resources = new List() + resources = new object[] { new { @@ -3102,7 +3100,7 @@ RequestContent content = RequestContent.Create(new }, contacts = new { - key = new List() + key = new object[] { new { @@ -3118,7 +3116,7 @@ RequestContent content = RequestContent.Create(new key = new object(), }, }, - assignedEntities = new List() + assignedEntities = new object[] { new { @@ -3144,7 +3142,7 @@ RequestContent content = RequestContent.Create(new }, } }, - categories = new List() + categories = new object[] { new { @@ -3155,67 +3153,67 @@ RequestContent content = RequestContent.Create(new status = "DRAFT", } }, - classifies = new List() + classifies = new object[] { null }, - examples = new List() + examples = new object[] { "" }, - isA = new List() + isA = new object[] { null }, - preferredTerms = new List() + preferredTerms = new object[] { null }, - preferredToTerms = new List() + preferredToTerms = new object[] { null }, - replacedBy = new List() + replacedBy = new object[] { null }, - replacementTerms = new List() + replacementTerms = new object[] { null }, - seeAlso = new List() + seeAlso = new object[] { null }, - synonyms = new List() + synonyms = new object[] { null }, - translatedTerms = new List() + translatedTerms = new object[] { null }, - translationTerms = new List() + translationTerms = new object[] { null }, usage = "", - validValues = new List() + validValues = new object[] { null }, - validValuesFor = new List() + validValuesFor = new object[] { null }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -3412,6 +3410,7 @@ 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. @@ -3421,6 +3420,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryTermAsync(""); + Console.WriteLine(response.Status); ]]> @@ -3433,6 +3433,7 @@ 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. @@ -3442,6 +3443,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryTerm(""); + Console.WriteLine(response.Status); ]]> @@ -3825,7 +3827,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3840,12 +3842,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { abbreviation = "", - templateName = new List() + templateName = new object[] { new object() }, @@ -3855,7 +3857,7 @@ RequestContent content = RequestContent.Create(new List() glossaryGuid = "", relationGuid = "", }, - antonyms = new List() + antonyms = new object[] { new { @@ -3874,7 +3876,7 @@ RequestContent content = RequestContent.Create(new List() updateTime = 123.45F, updatedBy = "", status = "Draft", - resources = new List() + resources = new object[] { new { @@ -3884,7 +3886,7 @@ RequestContent content = RequestContent.Create(new List() }, contacts = new { - key = new List() + key = new object[] { new { @@ -3900,7 +3902,7 @@ RequestContent content = RequestContent.Create(new List() key = new object(), }, }, - assignedEntities = new List() + assignedEntities = new object[] { new { @@ -3926,7 +3928,7 @@ RequestContent content = RequestContent.Create(new List() }, } }, - categories = new List() + categories = new object[] { new { @@ -3937,67 +3939,67 @@ RequestContent content = RequestContent.Create(new List() status = "DRAFT", } }, - classifies = new List() + classifies = new object[] { null }, - examples = new List() + examples = new object[] { "" }, - isA = new List() + isA = new object[] { null }, - preferredTerms = new List() + preferredTerms = new object[] { null }, - preferredToTerms = new List() + preferredToTerms = new object[] { null }, - replacedBy = new List() + replacedBy = new object[] { null }, - replacementTerms = new List() + replacementTerms = new object[] { null }, - seeAlso = new List() + seeAlso = new object[] { null }, - synonyms = new List() + synonyms = new object[] { null }, - translatedTerms = new List() + translatedTerms = new object[] { null }, - translationTerms = new List() + translationTerms = new object[] { null }, usage = "", - validValues = new List() + validValues = new object[] { null }, - validValuesFor = new List() + validValuesFor = new object[] { null }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -4194,7 +4196,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4209,12 +4211,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { abbreviation = "", - templateName = new List() + templateName = new object[] { new object() }, @@ -4224,7 +4226,7 @@ RequestContent content = RequestContent.Create(new List() glossaryGuid = "", relationGuid = "", }, - antonyms = new List() + antonyms = new object[] { new { @@ -4243,7 +4245,7 @@ RequestContent content = RequestContent.Create(new List() updateTime = 123.45F, updatedBy = "", status = "Draft", - resources = new List() + resources = new object[] { new { @@ -4253,7 +4255,7 @@ RequestContent content = RequestContent.Create(new List() }, contacts = new { - key = new List() + key = new object[] { new { @@ -4269,7 +4271,7 @@ RequestContent content = RequestContent.Create(new List() key = new object(), }, }, - assignedEntities = new List() + assignedEntities = new object[] { new { @@ -4295,7 +4297,7 @@ RequestContent content = RequestContent.Create(new List() }, } }, - categories = new List() + categories = new object[] { new { @@ -4306,67 +4308,67 @@ RequestContent content = RequestContent.Create(new List() status = "DRAFT", } }, - classifies = new List() + classifies = new object[] { null }, - examples = new List() + examples = new object[] { "" }, - isA = new List() + isA = new object[] { null }, - preferredTerms = new List() + preferredTerms = new object[] { null }, - preferredToTerms = new List() + preferredToTerms = new object[] { null }, - replacedBy = new List() + replacedBy = new object[] { null }, - replacementTerms = new List() + replacementTerms = new object[] { null }, - seeAlso = new List() + seeAlso = new object[] { null }, - synonyms = new List() + synonyms = new object[] { null }, - translatedTerms = new List() + translatedTerms = new object[] { null }, - translationTerms = new List() + translationTerms = new object[] { null }, usage = "", - validValues = new List() + validValues = new object[] { null }, - validValuesFor = new List() + validValuesFor = new object[] { null }, - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -4633,11 +4635,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = await client.AssignTermToEntitiesAsync("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call AssignTermToEntitiesAsync with all parameters and request content. @@ -4646,7 +4649,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -4673,6 +4676,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = await client.AssignTermToEntitiesAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -4684,11 +4688,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = client.AssignTermToEntities("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call AssignTermToEntities with all parameters and request content. @@ -4697,7 +4702,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -4724,6 +4729,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = client.AssignTermToEntities("", content); + Console.WriteLine(response.Status); ]]> @@ -4735,11 +4741,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call RemoveTermAssignmentFromEntitiesAsync with all parameters and request content. @@ -4748,7 +4755,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -4775,6 +4782,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -4786,11 +4794,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = client.RemoveTermAssignmentFromEntities("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call RemoveTermAssignmentFromEntities with all parameters and request content. @@ -4799,7 +4808,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -4826,6 +4835,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = client.RemoveTermAssignmentFromEntities("", content); + Console.WriteLine(response.Status); ]]> @@ -4837,11 +4847,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteTermAssignmentFromEntitiesAsync with all parameters and request content. @@ -4850,7 +4861,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -4877,6 +4888,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); + Console.WriteLine(response.Status); ]]> @@ -4888,11 +4900,12 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new object() }); Response response = client.DeleteTermAssignmentFromEntities("", content); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteTermAssignmentFromEntities with all parameters and request content. @@ -4901,7 +4914,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { new { @@ -4928,6 +4941,7 @@ RequestContent content = RequestContent.Create(new List() } }); Response response = client.DeleteTermAssignmentFromEntities("", content); + Console.WriteLine(response.Status); ]]> @@ -5129,7 +5143,7 @@ PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPur RequestContent content = RequestContent.Create(new { - categories = new List() + categories = new object[] { new { @@ -5141,7 +5155,7 @@ RequestContent content = RequestContent.Create(new } }, language = "", - terms = new List() + terms = new object[] { new { @@ -5156,14 +5170,14 @@ RequestContent content = RequestContent.Create(new } }, usage = "", - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -5251,7 +5265,7 @@ PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPur RequestContent content = RequestContent.Create(new { - categories = new List() + categories = new object[] { new { @@ -5263,7 +5277,7 @@ RequestContent content = RequestContent.Create(new } }, language = "", - terms = new List() + terms = new object[] { new { @@ -5278,14 +5292,14 @@ RequestContent content = RequestContent.Create(new } }, usage = "", - classifications = new List() + classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() + validityPeriods = new object[] { new { @@ -5360,6 +5374,7 @@ 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. @@ -5369,6 +5384,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryAsync(""); + Console.WriteLine(response.Status); ]]> @@ -5381,6 +5397,7 @@ 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. @@ -5390,6 +5407,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossary(""); + Console.WriteLine(response.Status); ]]> @@ -6691,7 +6709,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); @@ -6706,7 +6724,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); @@ -6724,7 +6742,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); @@ -6739,7 +6757,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new List() +RequestContent content = RequestContent.Create(new object[] { "" }); 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 7c043dba14e89..6ea5e09d8e448 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 @@ -446,6 +446,7 @@ 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. @@ -455,6 +456,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); ]]> @@ -467,6 +469,7 @@ 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. @@ -476,6 +479,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); Response response = client.Delete(""); + Console.WriteLine(response.Status); ]]> 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 7239c5faf36dc..ebdc9f82adb1a 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 @@ -1958,6 +1958,7 @@ 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. @@ -1967,6 +1968,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); Response response = await client.DeleteTypeByNameAsync(""); + Console.WriteLine(response.Status); ]]> @@ -1979,6 +1981,7 @@ 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. @@ -1988,6 +1991,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); Response response = client.DeleteTypeByName(""); + Console.WriteLine(response.Status); ]]> @@ -2727,24 +2731,24 @@ PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewT RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() + businessMetadataDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { new { cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { - new Dictionary() + new Dictionary { ["params"] = new { key = new object(), }, - ["type"] = "", + ["type"] = "" } }, defaultValue = "", @@ -2768,7 +2772,7 @@ RequestContent content = RequestContent.Create(new createdBy = "", dateFormatter = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -2776,7 +2780,7 @@ RequestContent content = RequestContent.Create(new lenient = true, numberFormat = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -2789,18 +2793,17 @@ RequestContent content = RequestContent.Create(new parseIntegerOnly = true, roundingMode = "UP", }, - timeZone = new Dictionary() + timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", - ["availableIds"] = new List() + ["availableIds"] = new object[] { "" }, - ["default"] = null - , + ["default"] = null, ["displayName"] = "", - ["rawOffset"] = 1234, + ["rawOffset"] = 1234 }, }, description = "", @@ -2818,23 +2821,23 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - classificationDefs = new List() + classificationDefs = new object[] { new { - entityTypes = new List() + entityTypes = new object[] { "" }, - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -2856,26 +2859,26 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - entityDefs = new List() + entityDefs = new object[] { new { - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - relationshipAttributeDefs = new List() + relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { null }, @@ -2895,7 +2898,7 @@ RequestContent content = RequestContent.Create(new valuesMinCount = 1234, } }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -2917,12 +2920,12 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - enumDefs = new List() + enumDefs = new object[] { new { defaultValue = "", - elementDefs = new List() + elementDefs = new object[] { new { @@ -2949,7 +2952,7 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - relationshipDefs = new List() + relationshipDefs = new object[] { new { @@ -2964,7 +2967,7 @@ RequestContent content = RequestContent.Create(new }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -2986,11 +2989,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - structDefs = new List() + structDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -3012,11 +3015,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - termTemplateDefs = new List() + termTemplateDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -3399,24 +3402,24 @@ PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewT RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() + businessMetadataDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { new { cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { - new Dictionary() + new Dictionary { ["params"] = new { key = new object(), }, - ["type"] = "", + ["type"] = "" } }, defaultValue = "", @@ -3440,7 +3443,7 @@ RequestContent content = RequestContent.Create(new createdBy = "", dateFormatter = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -3448,7 +3451,7 @@ RequestContent content = RequestContent.Create(new lenient = true, numberFormat = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -3461,18 +3464,17 @@ RequestContent content = RequestContent.Create(new parseIntegerOnly = true, roundingMode = "UP", }, - timeZone = new Dictionary() + timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", - ["availableIds"] = new List() + ["availableIds"] = new object[] { "" }, - ["default"] = null - , + ["default"] = null, ["displayName"] = "", - ["rawOffset"] = 1234, + ["rawOffset"] = 1234 }, }, description = "", @@ -3490,23 +3492,23 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - classificationDefs = new List() + classificationDefs = new object[] { new { - entityTypes = new List() + entityTypes = new object[] { "" }, - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -3528,26 +3530,26 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - entityDefs = new List() + entityDefs = new object[] { new { - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - relationshipAttributeDefs = new List() + relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { null }, @@ -3567,7 +3569,7 @@ RequestContent content = RequestContent.Create(new valuesMinCount = 1234, } }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -3589,12 +3591,12 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - enumDefs = new List() + enumDefs = new object[] { new { defaultValue = "", - elementDefs = new List() + elementDefs = new object[] { new { @@ -3621,7 +3623,7 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - relationshipDefs = new List() + relationshipDefs = new object[] { new { @@ -3636,7 +3638,7 @@ RequestContent content = RequestContent.Create(new }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -3658,11 +3660,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - structDefs = new List() + structDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -3684,11 +3686,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - termTemplateDefs = new List() + termTemplateDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -4071,24 +4073,24 @@ PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewT RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() + businessMetadataDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { new { cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { - new Dictionary() + new Dictionary { ["params"] = new { key = new object(), }, - ["type"] = "", + ["type"] = "" } }, defaultValue = "", @@ -4112,7 +4114,7 @@ RequestContent content = RequestContent.Create(new createdBy = "", dateFormatter = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -4120,7 +4122,7 @@ RequestContent content = RequestContent.Create(new lenient = true, numberFormat = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -4133,18 +4135,17 @@ RequestContent content = RequestContent.Create(new parseIntegerOnly = true, roundingMode = "UP", }, - timeZone = new Dictionary() + timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", - ["availableIds"] = new List() + ["availableIds"] = new object[] { "" }, - ["default"] = null - , + ["default"] = null, ["displayName"] = "", - ["rawOffset"] = 1234, + ["rawOffset"] = 1234 }, }, description = "", @@ -4162,23 +4163,23 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - classificationDefs = new List() + classificationDefs = new object[] { new { - entityTypes = new List() + entityTypes = new object[] { "" }, - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -4200,26 +4201,26 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - entityDefs = new List() + entityDefs = new object[] { new { - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - relationshipAttributeDefs = new List() + relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { null }, @@ -4239,7 +4240,7 @@ RequestContent content = RequestContent.Create(new valuesMinCount = 1234, } }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -4261,12 +4262,12 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - enumDefs = new List() + enumDefs = new object[] { new { defaultValue = "", - elementDefs = new List() + elementDefs = new object[] { new { @@ -4293,7 +4294,7 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - relationshipDefs = new List() + relationshipDefs = new object[] { new { @@ -4308,7 +4309,7 @@ RequestContent content = RequestContent.Create(new }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -4330,11 +4331,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - structDefs = new List() + structDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -4356,11 +4357,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - termTemplateDefs = new List() + termTemplateDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -4743,24 +4744,24 @@ PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewT RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() + businessMetadataDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { new { cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { - new Dictionary() + new Dictionary { ["params"] = new { key = new object(), }, - ["type"] = "", + ["type"] = "" } }, defaultValue = "", @@ -4784,7 +4785,7 @@ RequestContent content = RequestContent.Create(new createdBy = "", dateFormatter = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -4792,7 +4793,7 @@ RequestContent content = RequestContent.Create(new lenient = true, numberFormat = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -4805,18 +4806,17 @@ RequestContent content = RequestContent.Create(new parseIntegerOnly = true, roundingMode = "UP", }, - timeZone = new Dictionary() + timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", - ["availableIds"] = new List() + ["availableIds"] = new object[] { "" }, - ["default"] = null - , + ["default"] = null, ["displayName"] = "", - ["rawOffset"] = 1234, + ["rawOffset"] = 1234 }, }, description = "", @@ -4834,23 +4834,23 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - classificationDefs = new List() + classificationDefs = new object[] { new { - entityTypes = new List() + entityTypes = new object[] { "" }, - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -4872,26 +4872,26 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - entityDefs = new List() + entityDefs = new object[] { new { - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - relationshipAttributeDefs = new List() + relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { null }, @@ -4911,7 +4911,7 @@ RequestContent content = RequestContent.Create(new valuesMinCount = 1234, } }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -4933,12 +4933,12 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - enumDefs = new List() + enumDefs = new object[] { new { defaultValue = "", - elementDefs = new List() + elementDefs = new object[] { new { @@ -4965,7 +4965,7 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - relationshipDefs = new List() + relationshipDefs = new object[] { new { @@ -4980,7 +4980,7 @@ RequestContent content = RequestContent.Create(new }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -5002,11 +5002,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - structDefs = new List() + structDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -5028,11 +5028,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - termTemplateDefs = new List() + termTemplateDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -5403,6 +5403,7 @@ PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewT RequestContent content = RequestContent.Create(new object()); Response response = await client.DeleteTypeDefinitionsAsync(content); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteTypeDefinitionsAsync with all request content. @@ -5413,24 +5414,24 @@ PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewT RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() + businessMetadataDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { new { cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { - new Dictionary() + new Dictionary { ["params"] = new { key = new object(), }, - ["type"] = "", + ["type"] = "" } }, defaultValue = "", @@ -5454,7 +5455,7 @@ RequestContent content = RequestContent.Create(new createdBy = "", dateFormatter = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -5462,7 +5463,7 @@ RequestContent content = RequestContent.Create(new lenient = true, numberFormat = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -5475,18 +5476,17 @@ RequestContent content = RequestContent.Create(new parseIntegerOnly = true, roundingMode = "UP", }, - timeZone = new Dictionary() + timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", - ["availableIds"] = new List() + ["availableIds"] = new object[] { "" }, - ["default"] = null - , + ["default"] = null, ["displayName"] = "", - ["rawOffset"] = 1234, + ["rawOffset"] = 1234 }, }, description = "", @@ -5504,23 +5504,23 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - classificationDefs = new List() + classificationDefs = new object[] { new { - entityTypes = new List() + entityTypes = new object[] { "" }, - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -5542,26 +5542,26 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - entityDefs = new List() + entityDefs = new object[] { new { - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - relationshipAttributeDefs = new List() + relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { null }, @@ -5581,7 +5581,7 @@ RequestContent content = RequestContent.Create(new valuesMinCount = 1234, } }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -5603,12 +5603,12 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - enumDefs = new List() + enumDefs = new object[] { new { defaultValue = "", - elementDefs = new List() + elementDefs = new object[] { new { @@ -5635,7 +5635,7 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - relationshipDefs = new List() + relationshipDefs = new object[] { new { @@ -5650,7 +5650,7 @@ RequestContent content = RequestContent.Create(new }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -5672,11 +5672,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - structDefs = new List() + structDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -5698,11 +5698,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - termTemplateDefs = new List() + termTemplateDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -5726,6 +5726,7 @@ RequestContent content = RequestContent.Create(new }, }); Response response = await client.DeleteTypeDefinitionsAsync(content); + Console.WriteLine(response.Status); ]]> @@ -5739,6 +5740,7 @@ PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewT RequestContent content = RequestContent.Create(new object()); Response response = client.DeleteTypeDefinitions(content); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteTypeDefinitions with all request content. @@ -5749,24 +5751,24 @@ PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewT RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() + businessMetadataDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { new { cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { - new Dictionary() + new Dictionary { ["params"] = new { key = new object(), }, - ["type"] = "", + ["type"] = "" } }, defaultValue = "", @@ -5790,7 +5792,7 @@ RequestContent content = RequestContent.Create(new createdBy = "", dateFormatter = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -5798,7 +5800,7 @@ RequestContent content = RequestContent.Create(new lenient = true, numberFormat = new { - availableLocales = new List() + availableLocales = new object[] { "" }, @@ -5811,18 +5813,17 @@ RequestContent content = RequestContent.Create(new parseIntegerOnly = true, roundingMode = "UP", }, - timeZone = new Dictionary() + timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", - ["availableIds"] = new List() + ["availableIds"] = new object[] { "" }, - ["default"] = null - , + ["default"] = null, ["displayName"] = "", - ["rawOffset"] = 1234, + ["rawOffset"] = 1234 }, }, description = "", @@ -5840,23 +5841,23 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - classificationDefs = new List() + classificationDefs = new object[] { new { - entityTypes = new List() + entityTypes = new object[] { "" }, - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -5878,26 +5879,26 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - entityDefs = new List() + entityDefs = new object[] { new { - subTypes = new List() + subTypes = new object[] { "" }, - superTypes = new List() + superTypes = new object[] { "" }, - relationshipAttributeDefs = new List() + relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", - constraints = new List() + constraints = new object[] { null }, @@ -5917,7 +5918,7 @@ RequestContent content = RequestContent.Create(new valuesMinCount = 1234, } }, - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -5939,12 +5940,12 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - enumDefs = new List() + enumDefs = new object[] { new { defaultValue = "", - elementDefs = new List() + elementDefs = new object[] { new { @@ -5971,7 +5972,7 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - relationshipDefs = new List() + relationshipDefs = new object[] { new { @@ -5986,7 +5987,7 @@ RequestContent content = RequestContent.Create(new }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -6008,11 +6009,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - structDefs = new List() + structDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -6034,11 +6035,11 @@ RequestContent content = RequestContent.Create(new lastModifiedTS = "", } }, - termTemplateDefs = new List() + termTemplateDefs = new object[] { new { - attributeDefs = new List() + attributeDefs = new object[] { null }, @@ -6062,6 +6063,7 @@ RequestContent content = RequestContent.Create(new }, }); Response response = client.DeleteTypeDefinitions(content); + Console.WriteLine(response.Status); ]]> 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 9ba9b2b58ca41..09aeb0e5786e9 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Analytics.Purview.Catalog.Samples { - public class Samples_PurviewCatalogClient + public partial class Samples_PurviewCatalogClient { [Test] [Ignore("Only validating compilation of examples")] @@ -63,21 +62,21 @@ public void Example_Search_AllParameters() offset = 1234, limit = 1234, filter = new object(), - facets = new List() -{ + facets = new object[] + { new { count = 1234, facet = "", sort = new object(), } -}, + }, taxonomySetting = new { - assetTypes = new List() -{ + assetTypes = new object[] + { "" -}, + }, }, }); Response response = client.Search(content); @@ -136,21 +135,21 @@ public async Task Example_Search_AllParameters_Async() offset = 1234, limit = 1234, filter = new object(), - facets = new List() -{ + facets = new object[] + { new { count = 1234, facet = "", sort = new object(), } -}, + }, taxonomySetting = new { - assetTypes = new List() -{ + assetTypes = new object[] + { "" -}, + }, }, }); Response response = await client.SearchAsync(content); 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 05360b98ba535..f880b055d3a52 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Analytics.Purview.Catalog.Samples { - internal class Samples_PurviewCollections + public partial class Samples_PurviewCollections { [Test] [Ignore("Only validating compilation of examples")] @@ -65,14 +64,14 @@ public void Example_CreateOrUpdateEntity_AllParameters() { key = new object(), }, - classifications = new List() -{ + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -93,7 +92,7 @@ public void Example_CreateOrUpdateEntity_AllParameters() typeName = "", lastModifiedTS = "", } -}, + }, createTime = 123.45F, createdBy = "", customAttributes = new @@ -103,12 +102,12 @@ public void Example_CreateOrUpdateEntity_AllParameters() guid = "", homeId = "", isIncomplete = true, - labels = new List() -{ + labels = new object[] + { "" -}, - meanings = new List() -{ + }, + meanings = new object[] + { new { confidence = 1234, @@ -122,7 +121,7 @@ public void Example_CreateOrUpdateEntity_AllParameters() steward = "", termGuid = "", } -}, + }, provenanceType = 123.45F, proxy = true, relationshipAttributes = new @@ -140,14 +139,14 @@ public void Example_CreateOrUpdateEntity_AllParameters() }, contacts = new { - key = new List() -{ + key = new object[] + { new { id = "", info = "", } -}, + }, }, attributes = new { @@ -156,9 +155,7 @@ public void Example_CreateOrUpdateEntity_AllParameters() typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = client.CreateOrUpdateEntity("", content); @@ -244,14 +241,14 @@ public async Task Example_CreateOrUpdateEntity_AllParameters_Async() { key = new object(), }, - classifications = new List() -{ + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -272,7 +269,7 @@ public async Task Example_CreateOrUpdateEntity_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, + }, createTime = 123.45F, createdBy = "", customAttributes = new @@ -282,12 +279,12 @@ public async Task Example_CreateOrUpdateEntity_AllParameters_Async() guid = "", homeId = "", isIncomplete = true, - labels = new List() -{ + labels = new object[] + { "" -}, - meanings = new List() -{ + }, + meanings = new object[] + { new { confidence = 1234, @@ -301,7 +298,7 @@ public async Task Example_CreateOrUpdateEntity_AllParameters_Async() steward = "", termGuid = "", } -}, + }, provenanceType = 123.45F, proxy = true, relationshipAttributes = new @@ -319,14 +316,14 @@ public async Task Example_CreateOrUpdateEntity_AllParameters_Async() }, contacts = new { - key = new List() -{ + key = new object[] + { new { id = "", info = "", } -}, + }, }, attributes = new { @@ -335,9 +332,7 @@ public async Task Example_CreateOrUpdateEntity_AllParameters_Async() typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = await client.CreateOrUpdateEntityAsync("", content); @@ -447,22 +442,22 @@ public void Example_CreateOrUpdateEntityInBulk_AllParameters() RequestContent content = RequestContent.Create(new { - entities = new List() -{ + entities = new object[] + { new { businessAttributes = new { key = new object(), }, -classifications = new List() +classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -493,11 +488,11 @@ public void Example_CreateOrUpdateEntityInBulk_AllParameters() guid = "", homeId = "", isIncomplete = true, -labels = new List() +labels = new object[] { "" }, -meanings = new List() +meanings = new object[] { new { @@ -530,7 +525,7 @@ public void Example_CreateOrUpdateEntityInBulk_AllParameters() }, contacts = new { -key = new List() +key = new object[] { new { @@ -546,10 +541,8 @@ public void Example_CreateOrUpdateEntityInBulk_AllParameters() typeName = "", lastModifiedTS = "", } -}, - referredEntities = new - { - }, + }, + referredEntities = new { }, }); Response response = client.CreateOrUpdateEntityInBulk("", content); @@ -629,22 +622,22 @@ public async Task Example_CreateOrUpdateEntityInBulk_AllParameters_Async() RequestContent content = RequestContent.Create(new { - entities = new List() -{ + entities = new object[] + { new { businessAttributes = new { key = new object(), }, -classifications = new List() +classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -675,11 +668,11 @@ public async Task Example_CreateOrUpdateEntityInBulk_AllParameters_Async() guid = "", homeId = "", isIncomplete = true, -labels = new List() +labels = new object[] { "" }, -meanings = new List() +meanings = new object[] { new { @@ -712,7 +705,7 @@ public async Task Example_CreateOrUpdateEntityInBulk_AllParameters_Async() }, contacts = new { -key = new List() +key = new object[] { new { @@ -728,10 +721,8 @@ public async Task Example_CreateOrUpdateEntityInBulk_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, - referredEntities = new - { - }, + }, + referredEntities = new { }, }); Response response = await client.CreateOrUpdateEntityInBulkAsync("", content); @@ -841,10 +832,10 @@ public void Example_MoveEntitiesToCollection_AllParameters() RequestContent content = RequestContent.Create(new { - entityGuids = new List() -{ + entityGuids = new object[] + { "" -}, + }, }); Response response = client.MoveEntitiesToCollection("", content); @@ -924,10 +915,10 @@ public async Task Example_MoveEntitiesToCollection_AllParameters_Async() RequestContent content = RequestContent.Create(new { - entityGuids = new List() -{ + entityGuids = new object[] + { "" -}, + }, }); Response response = await client.MoveEntitiesToCollectionAsync("", content); 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 05410110afab1..0b28d91fbcb9a 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.IO; using System.Text.Json; using System.Threading.Tasks; @@ -18,7 +17,7 @@ namespace Azure.Analytics.Purview.Catalog.Samples { - internal class Samples_PurviewEntities + public partial class Samples_PurviewEntities { [Test] [Ignore("Only validating compilation of examples")] @@ -66,14 +65,14 @@ public void Example_CreateOrUpdate_AllParameters() { key = new object(), }, - classifications = new List() -{ + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -94,7 +93,7 @@ public void Example_CreateOrUpdate_AllParameters() typeName = "", lastModifiedTS = "", } -}, + }, createTime = 123.45F, createdBy = "", customAttributes = new @@ -104,12 +103,12 @@ public void Example_CreateOrUpdate_AllParameters() guid = "", homeId = "", isIncomplete = true, - labels = new List() -{ + labels = new object[] + { "" -}, - meanings = new List() -{ + }, + meanings = new object[] + { new { confidence = 1234, @@ -123,7 +122,7 @@ public void Example_CreateOrUpdate_AllParameters() steward = "", termGuid = "", } -}, + }, provenanceType = 123.45F, proxy = true, relationshipAttributes = new @@ -141,14 +140,14 @@ public void Example_CreateOrUpdate_AllParameters() }, contacts = new { - key = new List() -{ + key = new object[] + { new { id = "", info = "", } -}, + }, }, attributes = new { @@ -157,9 +156,7 @@ public void Example_CreateOrUpdate_AllParameters() typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = client.CreateOrUpdate(content); @@ -245,14 +242,14 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() { key = new object(), }, - classifications = new List() -{ + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -273,7 +270,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, + }, createTime = 123.45F, createdBy = "", customAttributes = new @@ -283,12 +280,12 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() guid = "", homeId = "", isIncomplete = true, - labels = new List() -{ + labels = new object[] + { "" -}, - meanings = new List() -{ + }, + meanings = new object[] + { new { confidence = 1234, @@ -302,7 +299,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() steward = "", termGuid = "", } -}, + }, provenanceType = 123.45F, proxy = true, relationshipAttributes = new @@ -320,14 +317,14 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() }, contacts = new { - key = new List() -{ + key = new object[] + { new { id = "", info = "", } -}, + }, }, attributes = new { @@ -336,9 +333,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = await client.CreateOrUpdateAsync(content); @@ -416,10 +411,7 @@ public void Example_GetByGuids_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetByGuids(new List() -{ -"" -}, null, null, null, null); + Response response = client.GetByGuids(new string[] { "" }, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -433,10 +425,7 @@ public async Task Example_GetByGuids_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetByGuidsAsync(new List() -{ -"" -}, null, null, null, null); + Response response = await client.GetByGuidsAsync(new string[] { "" }, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -450,13 +439,7 @@ public void Example_GetByGuids_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetByGuids(new List() -{ -"" -}, true, true, new List() -{ -"" -}, null); + Response response = client.GetByGuids(new string[] { "" }, true, true, new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); @@ -555,13 +538,7 @@ public async Task Example_GetByGuids_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetByGuidsAsync(new List() -{ -"" -}, true, true, new List() -{ -"" -}, null); + Response response = await client.GetByGuidsAsync(new string[] { "" }, true, true, new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); @@ -692,22 +669,22 @@ public void Example_CreateOrUpdateEntities_AllParameters() RequestContent content = RequestContent.Create(new { - entities = new List() -{ + entities = new object[] + { new { businessAttributes = new { key = new object(), }, -classifications = new List() +classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -738,11 +715,11 @@ public void Example_CreateOrUpdateEntities_AllParameters() guid = "", homeId = "", isIncomplete = true, -labels = new List() +labels = new object[] { "" }, -meanings = new List() +meanings = new object[] { new { @@ -775,7 +752,7 @@ public void Example_CreateOrUpdateEntities_AllParameters() }, contacts = new { -key = new List() +key = new object[] { new { @@ -791,10 +768,8 @@ public void Example_CreateOrUpdateEntities_AllParameters() typeName = "", lastModifiedTS = "", } -}, - referredEntities = new - { - }, + }, + referredEntities = new { }, }); Response response = client.CreateOrUpdateEntities(content); @@ -874,22 +849,22 @@ public async Task Example_CreateOrUpdateEntities_AllParameters_Async() RequestContent content = RequestContent.Create(new { - entities = new List() -{ + entities = new object[] + { new { businessAttributes = new { key = new object(), }, -classifications = new List() +classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -920,11 +895,11 @@ public async Task Example_CreateOrUpdateEntities_AllParameters_Async() guid = "", homeId = "", isIncomplete = true, -labels = new List() +labels = new object[] { "" }, -meanings = new List() +meanings = new object[] { new { @@ -957,7 +932,7 @@ public async Task Example_CreateOrUpdateEntities_AllParameters_Async() }, contacts = new { -key = new List() +key = new object[] { new { @@ -973,10 +948,8 @@ public async Task Example_CreateOrUpdateEntities_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, - referredEntities = new - { - }, + }, + referredEntities = new { }, }); Response response = await client.CreateOrUpdateEntitiesAsync(content); @@ -1054,10 +1027,7 @@ public void Example_DeleteByGuids_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteByGuids(new List() -{ -"" -}, null); + Response response = client.DeleteByGuids(new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1071,10 +1041,7 @@ public async Task Example_DeleteByGuids_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteByGuidsAsync(new List() -{ -"" -}, null); + Response response = await client.DeleteByGuidsAsync(new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1088,10 +1055,7 @@ public void Example_DeleteByGuids_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteByGuids(new List() -{ -"" -}, null); + Response response = client.DeleteByGuids(new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); @@ -1167,10 +1131,7 @@ public async Task Example_DeleteByGuids_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteByGuidsAsync(new List() -{ -"" -}, null); + Response response = await client.DeleteByGuidsAsync(new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); @@ -1248,6 +1209,7 @@ public void Example_AddClassification_ShortVersion() RequestContent content = RequestContent.Create(new object()); Response response = client.AddClassification(content); + Console.WriteLine(response.Status); } @@ -1261,6 +1223,7 @@ public async Task Example_AddClassification_ShortVersion_Async() RequestContent content = RequestContent.Create(new object()); Response response = await client.AddClassificationAsync(content); + Console.WriteLine(response.Status); } @@ -1279,15 +1242,15 @@ public void Example_AddClassification_AllParameters() entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() -{ + validityPeriods = new object[] + { new { endTime = "", startTime = "", timeZone = "", } -}, + }, source = "", sourceDetails = new { @@ -1300,12 +1263,13 @@ public void Example_AddClassification_AllParameters() typeName = "", lastModifiedTS = "", }, - entityGuids = new List() -{ + entityGuids = new object[] + { "" -}, + }, }); Response response = client.AddClassification(content); + Console.WriteLine(response.Status); } @@ -1324,15 +1288,15 @@ public async Task Example_AddClassification_AllParameters_Async() entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, - validityPeriods = new List() -{ + validityPeriods = new object[] + { new { endTime = "", startTime = "", timeZone = "", } -}, + }, source = "", sourceDetails = new { @@ -1345,12 +1309,13 @@ public async Task Example_AddClassification_AllParameters_Async() typeName = "", lastModifiedTS = "", }, - entityGuids = new List() -{ + entityGuids = new object[] + { "" -}, + }, }); Response response = await client.AddClassificationAsync(content); + Console.WriteLine(response.Status); } @@ -2029,6 +1994,7 @@ public void Example_DeleteClassification_ShortVersion() PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassification("", ""); + Console.WriteLine(response.Status); } @@ -2041,6 +2007,7 @@ public async Task Example_DeleteClassification_ShortVersion_Async() PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationAsync("", ""); + Console.WriteLine(response.Status); } @@ -2053,6 +2020,7 @@ public void Example_DeleteClassification_AllParameters() PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassification("", ""); + Console.WriteLine(response.Status); } @@ -2065,6 +2033,7 @@ public async Task Example_DeleteClassification_AllParameters_Async() PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationAsync("", ""); + Console.WriteLine(response.Status); } @@ -2142,11 +2111,12 @@ public void Example_AddClassifications_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.AddClassifications("", content); + Console.WriteLine(response.Status); } @@ -2158,11 +2128,12 @@ public async Task Example_AddClassifications_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = await client.AddClassificationsAsync("", content); + Console.WriteLine(response.Status); } @@ -2174,14 +2145,14 @@ public void Example_AddClassifications_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -2202,8 +2173,9 @@ public void Example_AddClassifications_AllParameters() typeName = "", lastModifiedTS = "", } -}); + }); Response response = client.AddClassifications("", content); + Console.WriteLine(response.Status); } @@ -2215,14 +2187,14 @@ public async Task Example_AddClassifications_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -2243,8 +2215,9 @@ public async Task Example_AddClassifications_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}); + }); Response response = await client.AddClassificationsAsync("", content); + Console.WriteLine(response.Status); } @@ -2256,11 +2229,12 @@ public void Example_UpdateClassifications_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.UpdateClassifications("", content); + Console.WriteLine(response.Status); } @@ -2272,11 +2246,12 @@ public async Task Example_UpdateClassifications_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = await client.UpdateClassificationsAsync("", content); + Console.WriteLine(response.Status); } @@ -2288,14 +2263,14 @@ public void Example_UpdateClassifications_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -2316,8 +2291,9 @@ public void Example_UpdateClassifications_AllParameters() typeName = "", lastModifiedTS = "", } -}); + }); Response response = client.UpdateClassifications("", content); + Console.WriteLine(response.Status); } @@ -2329,14 +2305,14 @@ public async Task Example_UpdateClassifications_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -2357,8 +2333,9 @@ public async Task Example_UpdateClassifications_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}); + }); Response response = await client.UpdateClassificationsAsync("", content); + Console.WriteLine(response.Status); } @@ -2634,14 +2611,14 @@ public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() { key = new object(), }, - classifications = new List() -{ + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -2662,7 +2639,7 @@ public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() typeName = "", lastModifiedTS = "", } -}, + }, createTime = 123.45F, createdBy = "", customAttributes = new @@ -2672,12 +2649,12 @@ public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() guid = "", homeId = "", isIncomplete = true, - labels = new List() -{ + labels = new object[] + { "" -}, - meanings = new List() -{ + }, + meanings = new object[] + { new { confidence = 1234, @@ -2691,7 +2668,7 @@ public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() steward = "", termGuid = "", } -}, + }, provenanceType = 123.45F, proxy = true, relationshipAttributes = new @@ -2709,14 +2686,14 @@ public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() }, contacts = new { - key = new List() -{ + key = new object[] + { new { id = "", info = "", } -}, + }, }, attributes = new { @@ -2725,9 +2702,7 @@ public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = client.PartialUpdateEntityByUniqueAttributes("", content, attrQualifiedName: ""); @@ -2813,14 +2788,14 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_As { key = new object(), }, - classifications = new List() -{ + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -2841,7 +2816,7 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_As typeName = "", lastModifiedTS = "", } -}, + }, createTime = 123.45F, createdBy = "", customAttributes = new @@ -2851,12 +2826,12 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_As guid = "", homeId = "", isIncomplete = true, - labels = new List() -{ + labels = new object[] + { "" -}, - meanings = new List() -{ + }, + meanings = new object[] + { new { confidence = 1234, @@ -2870,7 +2845,7 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_As steward = "", termGuid = "", } -}, + }, provenanceType = 123.45F, proxy = true, relationshipAttributes = new @@ -2888,14 +2863,14 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_As }, contacts = new { - key = new List() -{ + key = new object[] + { new { id = "", info = "", } -}, + }, }, attributes = new { @@ -2904,9 +2879,7 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_As typeName = "", lastModifiedTS = "", }, - referredEntities = new - { - }, + referredEntities = new { }, }); Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", content, attrQualifiedName: ""); @@ -3165,6 +3138,7 @@ public void Example_DeleteClassificationByUniqueAttribute_ShortVersion() PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassificationByUniqueAttribute("", ""); + Console.WriteLine(response.Status); } @@ -3177,6 +3151,7 @@ public async Task Example_DeleteClassificationByUniqueAttribute_ShortVersion_Asy PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationByUniqueAttributeAsync("", ""); + Console.WriteLine(response.Status); } @@ -3189,6 +3164,7 @@ public void Example_DeleteClassificationByUniqueAttribute_AllParameters() PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassificationByUniqueAttribute("", "", attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -3201,6 +3177,7 @@ public async Task Example_DeleteClassificationByUniqueAttribute_AllParameters_As PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationByUniqueAttributeAsync("", "", attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -3212,11 +3189,12 @@ public void Example_AddClassificationsByUniqueAttribute_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.AddClassificationsByUniqueAttribute("", content); + Console.WriteLine(response.Status); } @@ -3228,11 +3206,12 @@ public async Task Example_AddClassificationsByUniqueAttribute_ShortVersion_Async TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = await client.AddClassificationsByUniqueAttributeAsync("", content); + Console.WriteLine(response.Status); } @@ -3244,14 +3223,14 @@ public void Example_AddClassificationsByUniqueAttribute_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -3272,8 +3251,9 @@ public void Example_AddClassificationsByUniqueAttribute_AllParameters() typeName = "", lastModifiedTS = "", } -}); + }); Response response = client.AddClassificationsByUniqueAttribute("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -3285,14 +3265,14 @@ public async Task Example_AddClassificationsByUniqueAttribute_AllParameters_Asyn TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -3313,8 +3293,9 @@ public async Task Example_AddClassificationsByUniqueAttribute_AllParameters_Asyn typeName = "", lastModifiedTS = "", } -}); + }); Response response = await client.AddClassificationsByUniqueAttributeAsync("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -3326,11 +3307,12 @@ public void Example_UpdateClassificationsByUniqueAttribute_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.UpdateClassificationsByUniqueAttribute("", content); + Console.WriteLine(response.Status); } @@ -3342,11 +3324,12 @@ public async Task Example_UpdateClassificationsByUniqueAttribute_ShortVersion_As TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", content); + Console.WriteLine(response.Status); } @@ -3358,14 +3341,14 @@ public void Example_UpdateClassificationsByUniqueAttribute_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -3386,8 +3369,9 @@ public void Example_UpdateClassificationsByUniqueAttribute_AllParameters() typeName = "", lastModifiedTS = "", } -}); + }); Response response = client.UpdateClassificationsByUniqueAttribute("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -3399,14 +3383,14 @@ public async Task Example_UpdateClassificationsByUniqueAttribute_AllParameters_A TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -3427,8 +3411,9 @@ public async Task Example_UpdateClassificationsByUniqueAttribute_AllParameters_A typeName = "", lastModifiedTS = "", } -}); + }); Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -3476,18 +3461,18 @@ public void Example_SetClassifications_AllParameters() { key = new { - classificationNames = new List() -{ + classificationNames = new object[] + { "" -}, - classifications = new List() -{ + }, + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -3508,20 +3493,20 @@ public void Example_SetClassifications_AllParameters() typeName = "", lastModifiedTS = "", } -}, + }, displayText = "", guid = "", isIncomplete = true, - labels = new List() -{ + labels = new object[] + { "" -}, - meaningNames = new List() -{ + }, + meaningNames = new object[] + { "" -}, - meanings = new List() -{ + }, + meanings = new object[] + { new { confidence = 1234, @@ -3535,7 +3520,7 @@ public void Example_SetClassifications_AllParameters() steward = "", termGuid = "", } -}, + }, status = "ACTIVE", attributes = new { @@ -3566,18 +3551,18 @@ public async Task Example_SetClassifications_AllParameters_Async() { key = new { - classificationNames = new List() -{ + classificationNames = new object[] + { "" -}, - classifications = new List() -{ + }, + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -3598,20 +3583,20 @@ public async Task Example_SetClassifications_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, + }, displayText = "", guid = "", isIncomplete = true, - labels = new List() -{ + labels = new object[] + { "" -}, - meaningNames = new List() -{ + }, + meaningNames = new object[] + { "" -}, - meanings = new List() -{ + }, + meanings = new object[] + { new { confidence = 1234, @@ -3625,7 +3610,7 @@ public async Task Example_SetClassifications_AllParameters_Async() steward = "", termGuid = "", } -}, + }, status = "ACTIVE", attributes = new { @@ -3994,6 +3979,7 @@ public void Example_DeleteBusinessMetadata_ShortVersion() RequestContent content = null; Response response = client.DeleteBusinessMetadata("", content); + Console.WriteLine(response.Status); } @@ -4007,6 +3993,7 @@ public async Task Example_DeleteBusinessMetadata_ShortVersion_Async() RequestContent content = null; Response response = await client.DeleteBusinessMetadataAsync("", content); + Console.WriteLine(response.Status); } @@ -4023,6 +4010,7 @@ public void Example_DeleteBusinessMetadata_AllParameters() key = new object(), }); Response response = client.DeleteBusinessMetadata("", content); + Console.WriteLine(response.Status); } @@ -4039,6 +4027,7 @@ public async Task Example_DeleteBusinessMetadata_AllParameters_Async() key = new object(), }); Response response = await client.DeleteBusinessMetadataAsync("", content); + Console.WriteLine(response.Status); } @@ -4052,6 +4041,7 @@ public void Example_AddOrUpdateBusinessMetadata_ShortVersion() RequestContent content = null; Response response = client.AddOrUpdateBusinessMetadata("", content); + Console.WriteLine(response.Status); } @@ -4065,6 +4055,7 @@ public async Task Example_AddOrUpdateBusinessMetadata_ShortVersion_Async() RequestContent content = null; Response response = await client.AddOrUpdateBusinessMetadataAsync("", content); + Console.WriteLine(response.Status); } @@ -4081,6 +4072,7 @@ public void Example_AddOrUpdateBusinessMetadata_AllParameters() key = new object(), }); Response response = client.AddOrUpdateBusinessMetadata("", content, isOverwrite: true); + Console.WriteLine(response.Status); } @@ -4097,6 +4089,7 @@ public async Task Example_AddOrUpdateBusinessMetadata_AllParameters_Async() key = new object(), }); Response response = await client.AddOrUpdateBusinessMetadataAsync("", content, isOverwrite: true); + Console.WriteLine(response.Status); } @@ -4110,6 +4103,7 @@ public void Example_DeleteBusinessMetadataAttributes_ShortVersion() RequestContent content = null; Response response = client.DeleteBusinessMetadataAttributes("", "", content); + Console.WriteLine(response.Status); } @@ -4123,6 +4117,7 @@ public async Task Example_DeleteBusinessMetadataAttributes_ShortVersion_Async() RequestContent content = null; Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", content); + Console.WriteLine(response.Status); } @@ -4139,6 +4134,7 @@ public void Example_DeleteBusinessMetadataAttributes_AllParameters() key = new object(), }); Response response = client.DeleteBusinessMetadataAttributes("", "", content); + Console.WriteLine(response.Status); } @@ -4155,6 +4151,7 @@ public async Task Example_DeleteBusinessMetadataAttributes_AllParameters_Async() key = new object(), }); Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", content); + Console.WriteLine(response.Status); } @@ -4168,6 +4165,7 @@ public void Example_AddOrUpdateBusinessMetadataAttributes_ShortVersion() RequestContent content = null; Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); + Console.WriteLine(response.Status); } @@ -4181,6 +4179,7 @@ public async Task Example_AddOrUpdateBusinessMetadataAttributes_ShortVersion_Asy RequestContent content = null; Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); + Console.WriteLine(response.Status); } @@ -4197,6 +4196,7 @@ public void Example_AddOrUpdateBusinessMetadataAttributes_AllParameters() key = new object(), }); Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); + Console.WriteLine(response.Status); } @@ -4213,6 +4213,7 @@ public async Task Example_AddOrUpdateBusinessMetadataAttributes_AllParameters_As key = new object(), }); Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); + Console.WriteLine(response.Status); } @@ -4225,12 +4226,11 @@ public void Example_GetSampleBusinessMetadataTemplate_ShortVersion() 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); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -4243,12 +4243,11 @@ public async Task Example_GetSampleBusinessMetadataTemplate_ShortVersion_Async() 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); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -4261,12 +4260,11 @@ public void Example_GetSampleBusinessMetadataTemplate_AllParameters() 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); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -4279,12 +4277,11 @@ public async Task Example_GetSampleBusinessMetadataTemplate_AllParameters_Async( 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); - } + using Stream outFileStream = File.OpenWrite(""); + response.ContentStream.CopyTo(outFileStream); } } @@ -4372,6 +4369,7 @@ public void Example_DeleteLabels_ShortVersion() RequestContent content = null; Response response = client.DeleteLabels("", content); + Console.WriteLine(response.Status); } @@ -4385,6 +4383,7 @@ public async Task Example_DeleteLabels_ShortVersion_Async() RequestContent content = null; Response response = await client.DeleteLabelsAsync("", content); + Console.WriteLine(response.Status); } @@ -4396,11 +4395,12 @@ public void Example_DeleteLabels_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = client.DeleteLabels("", content); + Console.WriteLine(response.Status); } @@ -4412,11 +4412,12 @@ public async Task Example_DeleteLabels_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = await client.DeleteLabelsAsync("", content); + Console.WriteLine(response.Status); } @@ -4430,6 +4431,7 @@ public void Example_SetLabels_ShortVersion() RequestContent content = null; Response response = client.SetLabels("", content); + Console.WriteLine(response.Status); } @@ -4443,6 +4445,7 @@ public async Task Example_SetLabels_ShortVersion_Async() RequestContent content = null; Response response = await client.SetLabelsAsync("", content); + Console.WriteLine(response.Status); } @@ -4454,11 +4457,12 @@ public void Example_SetLabels_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = client.SetLabels("", content); + Console.WriteLine(response.Status); } @@ -4470,11 +4474,12 @@ public async Task Example_SetLabels_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = await client.SetLabelsAsync("", content); + Console.WriteLine(response.Status); } @@ -4488,6 +4493,7 @@ public void Example_AddLabel_ShortVersion() RequestContent content = null; Response response = client.AddLabel("", content); + Console.WriteLine(response.Status); } @@ -4501,6 +4507,7 @@ public async Task Example_AddLabel_ShortVersion_Async() RequestContent content = null; Response response = await client.AddLabelAsync("", content); + Console.WriteLine(response.Status); } @@ -4512,11 +4519,12 @@ public void Example_AddLabel_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = client.AddLabel("", content); + Console.WriteLine(response.Status); } @@ -4528,11 +4536,12 @@ public async Task Example_AddLabel_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = await client.AddLabelAsync("", content); + Console.WriteLine(response.Status); } @@ -4546,6 +4555,7 @@ public void Example_DeleteLabelsByUniqueAttribute_ShortVersion() RequestContent content = null; Response response = client.DeleteLabelsByUniqueAttribute("", content); + Console.WriteLine(response.Status); } @@ -4559,6 +4569,7 @@ public async Task Example_DeleteLabelsByUniqueAttribute_ShortVersion_Async() RequestContent content = null; Response response = await client.DeleteLabelsByUniqueAttributeAsync("", content); + Console.WriteLine(response.Status); } @@ -4570,11 +4581,12 @@ public void Example_DeleteLabelsByUniqueAttribute_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = client.DeleteLabelsByUniqueAttribute("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -4586,11 +4598,12 @@ public async Task Example_DeleteLabelsByUniqueAttribute_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = await client.DeleteLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -4604,6 +4617,7 @@ public void Example_SetLabelsByUniqueAttribute_ShortVersion() RequestContent content = null; Response response = client.SetLabelsByUniqueAttribute("", content); + Console.WriteLine(response.Status); } @@ -4617,6 +4631,7 @@ public async Task Example_SetLabelsByUniqueAttribute_ShortVersion_Async() RequestContent content = null; Response response = await client.SetLabelsByUniqueAttributeAsync("", content); + Console.WriteLine(response.Status); } @@ -4628,11 +4643,12 @@ public void Example_SetLabelsByUniqueAttribute_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = client.SetLabelsByUniqueAttribute("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -4644,11 +4660,12 @@ public async Task Example_SetLabelsByUniqueAttribute_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = await client.SetLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -4662,6 +4679,7 @@ public void Example_AddLabelsByUniqueAttribute_ShortVersion() RequestContent content = null; Response response = client.AddLabelsByUniqueAttribute("", content); + Console.WriteLine(response.Status); } @@ -4675,6 +4693,7 @@ public async Task Example_AddLabelsByUniqueAttribute_ShortVersion_Async() RequestContent content = null; Response response = await client.AddLabelsByUniqueAttributeAsync("", content); + Console.WriteLine(response.Status); } @@ -4686,11 +4705,12 @@ public void Example_AddLabelsByUniqueAttribute_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = client.AddLabelsByUniqueAttribute("", content, attrQualifiedName: ""); + Console.WriteLine(response.Status); } @@ -4702,11 +4722,12 @@ public async Task Example_AddLabelsByUniqueAttribute_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); 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 46cda60cf31d3..e98b46336ed41 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 @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.IO; using System.Text.Json; using System.Threading.Tasks; @@ -18,7 +17,7 @@ namespace Azure.Analytics.Purview.Catalog.Samples { - internal class Samples_PurviewGlossaries + public partial class Samples_PurviewGlossaries { [Test] [Ignore("Only validating compilation of examples")] @@ -178,8 +177,8 @@ public void Example_CreateGlossary_AllParameters() RequestContent content = RequestContent.Create(new { - categories = new List() -{ + categories = new object[] + { new { categoryGuid = "", @@ -188,10 +187,10 @@ public void Example_CreateGlossary_AllParameters() parentCategoryGuid = "", relationGuid = "", } -}, + }, language = "", - terms = new List() -{ + terms = new object[] + { new { description = "", @@ -203,16 +202,16 @@ public void Example_CreateGlossary_AllParameters() steward = "", termGuid = "", } -}, + }, usage = "", - classifications = new List() -{ + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -233,7 +232,7 @@ public void Example_CreateGlossary_AllParameters() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -288,8 +287,8 @@ public async Task Example_CreateGlossary_AllParameters_Async() RequestContent content = RequestContent.Create(new { - categories = new List() -{ + categories = new object[] + { new { categoryGuid = "", @@ -298,10 +297,10 @@ public async Task Example_CreateGlossary_AllParameters_Async() parentCategoryGuid = "", relationGuid = "", } -}, + }, language = "", - terms = new List() -{ + terms = new object[] + { new { description = "", @@ -313,16 +312,16 @@ public async Task Example_CreateGlossary_AllParameters_Async() steward = "", termGuid = "", } -}, + }, usage = "", - classifications = new List() -{ + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -343,7 +342,7 @@ public async Task Example_CreateGlossary_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -396,10 +395,10 @@ public void Example_CreateGlossaryCategories_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.CreateGlossaryCategories(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -414,10 +413,10 @@ public async Task Example_CreateGlossaryCategories_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = await client.CreateGlossaryCategoriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -432,8 +431,8 @@ public void Example_CreateGlossaryCategories_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { anchor = new @@ -442,7 +441,7 @@ public void Example_CreateGlossaryCategories_AllParameters() glossaryGuid = "", relationGuid = "", }, -childrenCategories = new List() +childrenCategories = new object[] { new { @@ -453,7 +452,7 @@ public void Example_CreateGlossaryCategories_AllParameters() relationGuid = "", } }, -terms = new List() +terms = new object[] { new { @@ -467,14 +466,14 @@ public void Example_CreateGlossaryCategories_AllParameters() termGuid = "", } }, -classifications = new List() +classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -503,7 +502,7 @@ public void Example_CreateGlossaryCategories_AllParameters() lastModifiedTS = "", guid = "", } -}); + }); Response response = client.CreateGlossaryCategories(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -555,8 +554,8 @@ public async Task Example_CreateGlossaryCategories_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { anchor = new @@ -565,7 +564,7 @@ public async Task Example_CreateGlossaryCategories_AllParameters_Async() glossaryGuid = "", relationGuid = "", }, -childrenCategories = new List() +childrenCategories = new object[] { new { @@ -576,7 +575,7 @@ public async Task Example_CreateGlossaryCategories_AllParameters_Async() relationGuid = "", } }, -terms = new List() +terms = new object[] { new { @@ -590,14 +589,14 @@ public async Task Example_CreateGlossaryCategories_AllParameters_Async() termGuid = "", } }, -classifications = new List() +classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -626,7 +625,7 @@ public async Task Example_CreateGlossaryCategories_AllParameters_Async() lastModifiedTS = "", guid = "", } -}); + }); Response response = await client.CreateGlossaryCategoriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -716,8 +715,8 @@ public void Example_CreateGlossaryCategory_AllParameters() glossaryGuid = "", relationGuid = "", }, - childrenCategories = new List() -{ + childrenCategories = new object[] + { new { categoryGuid = "", @@ -726,9 +725,9 @@ public void Example_CreateGlossaryCategory_AllParameters() parentCategoryGuid = "", relationGuid = "", } -}, - terms = new List() -{ + }, + terms = new object[] + { new { description = "", @@ -740,15 +739,15 @@ public void Example_CreateGlossaryCategory_AllParameters() steward = "", termGuid = "", } -}, - classifications = new List() -{ + }, + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -769,7 +768,7 @@ public void Example_CreateGlossaryCategory_AllParameters() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -836,8 +835,8 @@ public async Task Example_CreateGlossaryCategory_AllParameters_Async() glossaryGuid = "", relationGuid = "", }, - childrenCategories = new List() -{ + childrenCategories = new object[] + { new { categoryGuid = "", @@ -846,9 +845,9 @@ public async Task Example_CreateGlossaryCategory_AllParameters_Async() parentCategoryGuid = "", relationGuid = "", } -}, - terms = new List() -{ + }, + terms = new object[] + { new { description = "", @@ -860,15 +859,15 @@ public async Task Example_CreateGlossaryCategory_AllParameters_Async() steward = "", termGuid = "", } -}, - classifications = new List() -{ + }, + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -889,7 +888,7 @@ public async Task Example_CreateGlossaryCategory_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -1116,8 +1115,8 @@ public void Example_UpdateGlossaryCategory_AllParameters() glossaryGuid = "", relationGuid = "", }, - childrenCategories = new List() -{ + childrenCategories = new object[] + { new { categoryGuid = "", @@ -1126,9 +1125,9 @@ public void Example_UpdateGlossaryCategory_AllParameters() parentCategoryGuid = "", relationGuid = "", } -}, - terms = new List() -{ + }, + terms = new object[] + { new { description = "", @@ -1140,15 +1139,15 @@ public void Example_UpdateGlossaryCategory_AllParameters() steward = "", termGuid = "", } -}, - classifications = new List() -{ + }, + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -1169,7 +1168,7 @@ public void Example_UpdateGlossaryCategory_AllParameters() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -1236,8 +1235,8 @@ public async Task Example_UpdateGlossaryCategory_AllParameters_Async() glossaryGuid = "", relationGuid = "", }, - childrenCategories = new List() -{ + childrenCategories = new object[] + { new { categoryGuid = "", @@ -1246,9 +1245,9 @@ public async Task Example_UpdateGlossaryCategory_AllParameters_Async() parentCategoryGuid = "", relationGuid = "", } -}, - terms = new List() -{ + }, + terms = new object[] + { new { description = "", @@ -1260,15 +1259,15 @@ public async Task Example_UpdateGlossaryCategory_AllParameters_Async() steward = "", termGuid = "", } -}, - classifications = new List() -{ + }, + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -1289,7 +1288,7 @@ public async Task Example_UpdateGlossaryCategory_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -1349,6 +1348,7 @@ public void Example_DeleteGlossaryCategory_ShortVersion() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryCategory(""); + Console.WriteLine(response.Status); } @@ -1361,6 +1361,7 @@ public async Task Example_DeleteGlossaryCategory_ShortVersion_Async() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryCategoryAsync(""); + Console.WriteLine(response.Status); } @@ -1373,6 +1374,7 @@ public void Example_DeleteGlossaryCategory_AllParameters() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryCategory(""); + Console.WriteLine(response.Status); } @@ -1385,6 +1387,7 @@ public async Task Example_DeleteGlossaryCategory_AllParameters_Async() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryCategoryAsync(""); + Console.WriteLine(response.Status); } @@ -1709,18 +1712,18 @@ public void Example_CreateGlossaryTerm_AllParameters() RequestContent content = RequestContent.Create(new { abbreviation = "", - templateName = new List() -{ + templateName = new object[] + { new object() -}, + }, anchor = new { displayText = "", glossaryGuid = "", relationGuid = "", }, - antonyms = new List() -{ + antonyms = new object[] + { new { description = "", @@ -1732,30 +1735,30 @@ public void Example_CreateGlossaryTerm_AllParameters() steward = "", termGuid = "", } -}, + }, createTime = 123.45F, createdBy = "", updateTime = 123.45F, updatedBy = "", status = "Draft", - resources = new List() -{ + resources = new object[] + { new { displayName = "", url = "", } -}, + }, contacts = new { - key = new List() -{ + key = new object[] + { new { id = "", info = "", } -}, + }, }, attributes = new { @@ -1764,8 +1767,8 @@ public void Example_CreateGlossaryTerm_AllParameters() key = new object(), }, }, - assignedEntities = new List() -{ + assignedEntities = new object[] + { new { displayText = "", @@ -1789,9 +1792,9 @@ public void Example_CreateGlossaryTerm_AllParameters() key = new object(), }, } -}, - categories = new List() -{ + }, + categories = new object[] + { new { categoryGuid = "", @@ -1800,68 +1803,68 @@ public void Example_CreateGlossaryTerm_AllParameters() relationGuid = "", status = "DRAFT", } -}, - classifies = new List() -{ + }, + classifies = new object[] + { null -}, - examples = new List() -{ + }, + examples = new object[] + { "" -}, - isA = new List() -{ + }, + isA = new object[] + { null -}, - preferredTerms = new List() -{ + }, + preferredTerms = new object[] + { null -}, - preferredToTerms = new List() -{ + }, + preferredToTerms = new object[] + { null -}, - replacedBy = new List() -{ + }, + replacedBy = new object[] + { null -}, - replacementTerms = new List() -{ + }, + replacementTerms = new object[] + { null -}, - seeAlso = new List() -{ + }, + seeAlso = new object[] + { null -}, - synonyms = new List() -{ + }, + synonyms = new object[] + { null -}, - translatedTerms = new List() -{ + }, + translatedTerms = new object[] + { null -}, - translationTerms = new List() -{ + }, + translationTerms = new object[] + { null -}, + }, usage = "", - validValues = new List() -{ + validValues = new object[] + { null -}, - validValuesFor = new List() -{ + }, + validValuesFor = new object[] + { null -}, - classifications = new List() -{ + }, + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -1882,7 +1885,7 @@ public void Example_CreateGlossaryTerm_AllParameters() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -2060,18 +2063,18 @@ public async Task Example_CreateGlossaryTerm_AllParameters_Async() RequestContent content = RequestContent.Create(new { abbreviation = "", - templateName = new List() -{ + templateName = new object[] + { new object() -}, + }, anchor = new { displayText = "", glossaryGuid = "", relationGuid = "", }, - antonyms = new List() -{ + antonyms = new object[] + { new { description = "", @@ -2083,30 +2086,30 @@ public async Task Example_CreateGlossaryTerm_AllParameters_Async() steward = "", termGuid = "", } -}, + }, createTime = 123.45F, createdBy = "", updateTime = 123.45F, updatedBy = "", status = "Draft", - resources = new List() -{ + resources = new object[] + { new { displayName = "", url = "", } -}, + }, contacts = new { - key = new List() -{ + key = new object[] + { new { id = "", info = "", } -}, + }, }, attributes = new { @@ -2115,8 +2118,8 @@ public async Task Example_CreateGlossaryTerm_AllParameters_Async() key = new object(), }, }, - assignedEntities = new List() -{ + assignedEntities = new object[] + { new { displayText = "", @@ -2140,9 +2143,9 @@ public async Task Example_CreateGlossaryTerm_AllParameters_Async() key = new object(), }, } -}, - categories = new List() -{ + }, + categories = new object[] + { new { categoryGuid = "", @@ -2151,68 +2154,68 @@ public async Task Example_CreateGlossaryTerm_AllParameters_Async() relationGuid = "", status = "DRAFT", } -}, - classifies = new List() -{ + }, + classifies = new object[] + { null -}, - examples = new List() -{ + }, + examples = new object[] + { "" -}, - isA = new List() -{ + }, + isA = new object[] + { null -}, - preferredTerms = new List() -{ + }, + preferredTerms = new object[] + { null -}, - preferredToTerms = new List() -{ + }, + preferredToTerms = new object[] + { null -}, - replacedBy = new List() -{ + }, + replacedBy = new object[] + { null -}, - replacementTerms = new List() -{ + }, + replacementTerms = new object[] + { null -}, - seeAlso = new List() -{ + }, + seeAlso = new object[] + { null -}, - synonyms = new List() -{ + }, + synonyms = new object[] + { null -}, - translatedTerms = new List() -{ + }, + translatedTerms = new object[] + { null -}, - translationTerms = new List() -{ + }, + translationTerms = new object[] + { null -}, + }, usage = "", - validValues = new List() -{ + validValues = new object[] + { null -}, - validValuesFor = new List() -{ + }, + validValuesFor = new object[] + { null -}, - classifications = new List() -{ + }, + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -2233,7 +2236,7 @@ public async Task Example_CreateGlossaryTerm_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -2436,10 +2439,7 @@ public void Example_GetGlossaryTerm_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryTerm("", true, new List() -{ -"" -}, null); + Response response = client.GetGlossaryTerm("", true, new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -2606,10 +2606,7 @@ public async Task Example_GetGlossaryTerm_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryTermAsync("", true, new List() -{ -"" -}, null); + Response response = await client.GetGlossaryTermAsync("", true, new string[] { "" }, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -2809,18 +2806,18 @@ public void Example_UpdateGlossaryTerm_AllParameters() RequestContent content = RequestContent.Create(new { abbreviation = "", - templateName = new List() -{ + templateName = new object[] + { new object() -}, + }, anchor = new { displayText = "", glossaryGuid = "", relationGuid = "", }, - antonyms = new List() -{ + antonyms = new object[] + { new { description = "", @@ -2832,30 +2829,30 @@ public void Example_UpdateGlossaryTerm_AllParameters() steward = "", termGuid = "", } -}, + }, createTime = 123.45F, createdBy = "", updateTime = 123.45F, updatedBy = "", status = "Draft", - resources = new List() -{ + resources = new object[] + { new { displayName = "", url = "", } -}, + }, contacts = new { - key = new List() -{ + key = new object[] + { new { id = "", info = "", } -}, + }, }, attributes = new { @@ -2864,8 +2861,8 @@ public void Example_UpdateGlossaryTerm_AllParameters() key = new object(), }, }, - assignedEntities = new List() -{ + assignedEntities = new object[] + { new { displayText = "", @@ -2889,9 +2886,9 @@ public void Example_UpdateGlossaryTerm_AllParameters() key = new object(), }, } -}, - categories = new List() -{ + }, + categories = new object[] + { new { categoryGuid = "", @@ -2900,68 +2897,68 @@ public void Example_UpdateGlossaryTerm_AllParameters() relationGuid = "", status = "DRAFT", } -}, - classifies = new List() -{ + }, + classifies = new object[] + { null -}, - examples = new List() -{ + }, + examples = new object[] + { "" -}, - isA = new List() -{ + }, + isA = new object[] + { null -}, - preferredTerms = new List() -{ + }, + preferredTerms = new object[] + { null -}, - preferredToTerms = new List() -{ + }, + preferredToTerms = new object[] + { null -}, - replacedBy = new List() -{ + }, + replacedBy = new object[] + { null -}, - replacementTerms = new List() -{ + }, + replacementTerms = new object[] + { null -}, - seeAlso = new List() -{ + }, + seeAlso = new object[] + { null -}, - synonyms = new List() -{ + }, + synonyms = new object[] + { null -}, - translatedTerms = new List() -{ + }, + translatedTerms = new object[] + { null -}, - translationTerms = new List() -{ + }, + translationTerms = new object[] + { null -}, + }, usage = "", - validValues = new List() -{ + validValues = new object[] + { null -}, - validValuesFor = new List() -{ + }, + validValuesFor = new object[] + { null -}, - classifications = new List() -{ + }, + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -2982,7 +2979,7 @@ public void Example_UpdateGlossaryTerm_AllParameters() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -3160,18 +3157,18 @@ public async Task Example_UpdateGlossaryTerm_AllParameters_Async() RequestContent content = RequestContent.Create(new { abbreviation = "", - templateName = new List() -{ + templateName = new object[] + { new object() -}, + }, anchor = new { displayText = "", glossaryGuid = "", relationGuid = "", }, - antonyms = new List() -{ + antonyms = new object[] + { new { description = "", @@ -3183,30 +3180,30 @@ public async Task Example_UpdateGlossaryTerm_AllParameters_Async() steward = "", termGuid = "", } -}, + }, createTime = 123.45F, createdBy = "", updateTime = 123.45F, updatedBy = "", status = "Draft", - resources = new List() -{ + resources = new object[] + { new { displayName = "", url = "", } -}, + }, contacts = new { - key = new List() -{ + key = new object[] + { new { id = "", info = "", } -}, + }, }, attributes = new { @@ -3215,8 +3212,8 @@ public async Task Example_UpdateGlossaryTerm_AllParameters_Async() key = new object(), }, }, - assignedEntities = new List() -{ + assignedEntities = new object[] + { new { displayText = "", @@ -3240,9 +3237,9 @@ public async Task Example_UpdateGlossaryTerm_AllParameters_Async() key = new object(), }, } -}, - categories = new List() -{ + }, + categories = new object[] + { new { categoryGuid = "", @@ -3251,68 +3248,68 @@ public async Task Example_UpdateGlossaryTerm_AllParameters_Async() relationGuid = "", status = "DRAFT", } -}, - classifies = new List() -{ + }, + classifies = new object[] + { null -}, - examples = new List() -{ + }, + examples = new object[] + { "" -}, - isA = new List() -{ + }, + isA = new object[] + { null -}, - preferredTerms = new List() -{ + }, + preferredTerms = new object[] + { null -}, - preferredToTerms = new List() -{ + }, + preferredToTerms = new object[] + { null -}, - replacedBy = new List() -{ + }, + replacedBy = new object[] + { null -}, - replacementTerms = new List() -{ + }, + replacementTerms = new object[] + { null -}, - seeAlso = new List() -{ + }, + seeAlso = new object[] + { null -}, - synonyms = new List() -{ + }, + synonyms = new object[] + { null -}, - translatedTerms = new List() -{ + }, + translatedTerms = new object[] + { null -}, - translationTerms = new List() -{ + }, + translationTerms = new object[] + { null -}, + }, usage = "", - validValues = new List() -{ + validValues = new object[] + { null -}, - validValuesFor = new List() -{ + }, + validValuesFor = new object[] + { null -}, - classifications = new List() -{ + }, + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -3333,7 +3330,7 @@ public async Task Example_UpdateGlossaryTerm_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -3509,6 +3506,7 @@ public void Example_DeleteGlossaryTerm_ShortVersion() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryTerm(""); + Console.WriteLine(response.Status); } @@ -3521,6 +3519,7 @@ public async Task Example_DeleteGlossaryTerm_ShortVersion_Async() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryTermAsync(""); + Console.WriteLine(response.Status); } @@ -3533,6 +3532,7 @@ public void Example_DeleteGlossaryTerm_AllParameters() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryTerm(""); + Console.WriteLine(response.Status); } @@ -3545,6 +3545,7 @@ public async Task Example_DeleteGlossaryTerm_AllParameters_Async() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryTermAsync(""); + Console.WriteLine(response.Status); } @@ -3934,10 +3935,10 @@ public void Example_CreateGlossaryTerms_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.CreateGlossaryTerms(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -3952,10 +3953,10 @@ public async Task Example_CreateGlossaryTerms_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = await client.CreateGlossaryTermsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -3970,12 +3971,12 @@ public void Example_CreateGlossaryTerms_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { abbreviation = "", -templateName = new List() +templateName = new object[] { new object() }, @@ -3985,7 +3986,7 @@ public void Example_CreateGlossaryTerms_AllParameters() glossaryGuid = "", relationGuid = "", }, -antonyms = new List() +antonyms = new object[] { new { @@ -4004,7 +4005,7 @@ public void Example_CreateGlossaryTerms_AllParameters() updateTime = 123.45F, updatedBy = "", status = "Draft", -resources = new List() +resources = new object[] { new { @@ -4014,7 +4015,7 @@ public void Example_CreateGlossaryTerms_AllParameters() }, contacts = new { -key = new List() +key = new object[] { new { @@ -4030,7 +4031,7 @@ public void Example_CreateGlossaryTerms_AllParameters() key = new object(), }, }, -assignedEntities = new List() +assignedEntities = new object[] { new { @@ -4056,7 +4057,7 @@ public void Example_CreateGlossaryTerms_AllParameters() }, } }, -categories = new List() +categories = new object[] { new { @@ -4067,67 +4068,67 @@ public void Example_CreateGlossaryTerms_AllParameters() status = "DRAFT", } }, -classifies = new List() +classifies = new object[] { null }, -examples = new List() +examples = new object[] { "" }, -isA = new List() +isA = new object[] { null }, -preferredTerms = new List() +preferredTerms = new object[] { null }, -preferredToTerms = new List() +preferredToTerms = new object[] { null }, -replacedBy = new List() +replacedBy = new object[] { null }, -replacementTerms = new List() +replacementTerms = new object[] { null }, -seeAlso = new List() +seeAlso = new object[] { null }, -synonyms = new List() +synonyms = new object[] { null }, -translatedTerms = new List() +translatedTerms = new object[] { null }, -translationTerms = new List() +translationTerms = new object[] { null }, usage = "", -validValues = new List() +validValues = new object[] { null }, -validValuesFor = new List() +validValuesFor = new object[] { null }, -classifications = new List() +classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -4156,7 +4157,7 @@ public void Example_CreateGlossaryTerms_AllParameters() lastModifiedTS = "", guid = "", } -}); + }); Response response = client.CreateGlossaryTerms(content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4324,12 +4325,12 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { abbreviation = "", -templateName = new List() +templateName = new object[] { new object() }, @@ -4339,7 +4340,7 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() glossaryGuid = "", relationGuid = "", }, -antonyms = new List() +antonyms = new object[] { new { @@ -4358,7 +4359,7 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() updateTime = 123.45F, updatedBy = "", status = "Draft", -resources = new List() +resources = new object[] { new { @@ -4368,7 +4369,7 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() }, contacts = new { -key = new List() +key = new object[] { new { @@ -4384,7 +4385,7 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() key = new object(), }, }, -assignedEntities = new List() +assignedEntities = new object[] { new { @@ -4410,7 +4411,7 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() }, } }, -categories = new List() +categories = new object[] { new { @@ -4421,67 +4422,67 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() status = "DRAFT", } }, -classifies = new List() +classifies = new object[] { null }, -examples = new List() +examples = new object[] { "" }, -isA = new List() +isA = new object[] { null }, -preferredTerms = new List() +preferredTerms = new object[] { null }, -preferredToTerms = new List() +preferredToTerms = new object[] { null }, -replacedBy = new List() +replacedBy = new object[] { null }, -replacementTerms = new List() +replacementTerms = new object[] { null }, -seeAlso = new List() +seeAlso = new object[] { null }, -synonyms = new List() +synonyms = new object[] { null }, -translatedTerms = new List() +translatedTerms = new object[] { null }, -translationTerms = new List() +translationTerms = new object[] { null }, usage = "", -validValues = new List() +validValues = new object[] { null }, -validValuesFor = new List() +validValuesFor = new object[] { null }, -classifications = new List() +classifications = new object[] { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -4510,7 +4511,7 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() lastModifiedTS = "", guid = "", } -}); + }); Response response = await client.CreateGlossaryTermsAsync(content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4754,11 +4755,12 @@ public void Example_AssignTermToEntities_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.AssignTermToEntities("", content); + Console.WriteLine(response.Status); } @@ -4770,11 +4772,12 @@ public async Task Example_AssignTermToEntities_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = await client.AssignTermToEntitiesAsync("", content); + Console.WriteLine(response.Status); } @@ -4786,8 +4789,8 @@ public void Example_AssignTermToEntities_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { displayText = "", @@ -4811,8 +4814,9 @@ public void Example_AssignTermToEntities_AllParameters() key = new object(), }, } -}); + }); Response response = client.AssignTermToEntities("", content); + Console.WriteLine(response.Status); } @@ -4824,8 +4828,8 @@ public async Task Example_AssignTermToEntities_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { displayText = "", @@ -4849,8 +4853,9 @@ public async Task Example_AssignTermToEntities_AllParameters_Async() key = new object(), }, } -}); + }); Response response = await client.AssignTermToEntitiesAsync("", content); + Console.WriteLine(response.Status); } @@ -4862,11 +4867,12 @@ public void Example_RemoveTermAssignmentFromEntities_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.RemoveTermAssignmentFromEntities("", content); + Console.WriteLine(response.Status); } @@ -4878,11 +4884,12 @@ public async Task Example_RemoveTermAssignmentFromEntities_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", content); + Console.WriteLine(response.Status); } @@ -4894,8 +4901,8 @@ public void Example_RemoveTermAssignmentFromEntities_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { displayText = "", @@ -4919,8 +4926,9 @@ public void Example_RemoveTermAssignmentFromEntities_AllParameters() key = new object(), }, } -}); + }); Response response = client.RemoveTermAssignmentFromEntities("", content); + Console.WriteLine(response.Status); } @@ -4932,8 +4940,8 @@ public async Task Example_RemoveTermAssignmentFromEntities_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { displayText = "", @@ -4957,8 +4965,9 @@ public async Task Example_RemoveTermAssignmentFromEntities_AllParameters_Async() key = new object(), }, } -}); + }); Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", content); + Console.WriteLine(response.Status); } @@ -4970,11 +4979,12 @@ public void Example_DeleteTermAssignmentFromEntities_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = client.DeleteTermAssignmentFromEntities("", content); + Console.WriteLine(response.Status); } @@ -4986,11 +4996,12 @@ public async Task Example_DeleteTermAssignmentFromEntities_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new object() -}); + }); Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); + Console.WriteLine(response.Status); } @@ -5002,8 +5013,8 @@ public void Example_DeleteTermAssignmentFromEntities_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { displayText = "", @@ -5027,8 +5038,9 @@ public void Example_DeleteTermAssignmentFromEntities_AllParameters() key = new object(), }, } -}); + }); Response response = client.DeleteTermAssignmentFromEntities("", content); + Console.WriteLine(response.Status); } @@ -5040,8 +5052,8 @@ public async Task Example_DeleteTermAssignmentFromEntities_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { new { displayText = "", @@ -5065,8 +5077,9 @@ public async Task Example_DeleteTermAssignmentFromEntities_AllParameters_Async() key = new object(), }, } -}); + }); Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); + Console.WriteLine(response.Status); } @@ -5298,8 +5311,8 @@ public void Example_UpdateGlossary_AllParameters() RequestContent content = RequestContent.Create(new { - categories = new List() -{ + categories = new object[] + { new { categoryGuid = "", @@ -5308,10 +5321,10 @@ public void Example_UpdateGlossary_AllParameters() parentCategoryGuid = "", relationGuid = "", } -}, + }, language = "", - terms = new List() -{ + terms = new object[] + { new { description = "", @@ -5323,16 +5336,16 @@ public void Example_UpdateGlossary_AllParameters() steward = "", termGuid = "", } -}, + }, usage = "", - classifications = new List() -{ + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -5353,7 +5366,7 @@ public void Example_UpdateGlossary_AllParameters() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -5408,8 +5421,8 @@ public async Task Example_UpdateGlossary_AllParameters_Async() RequestContent content = RequestContent.Create(new { - categories = new List() -{ + categories = new object[] + { new { categoryGuid = "", @@ -5418,10 +5431,10 @@ public async Task Example_UpdateGlossary_AllParameters_Async() parentCategoryGuid = "", relationGuid = "", } -}, + }, language = "", - terms = new List() -{ + terms = new object[] + { new { description = "", @@ -5433,16 +5446,16 @@ public async Task Example_UpdateGlossary_AllParameters_Async() steward = "", termGuid = "", } -}, + }, usage = "", - classifications = new List() -{ + classifications = new object[] + { new { entityGuid = "", entityStatus = "ACTIVE", removePropagationsOnEntityDelete = true, -validityPeriods = new List() +validityPeriods = new object[] { new { @@ -5463,7 +5476,7 @@ public async Task Example_UpdateGlossary_AllParameters_Async() typeName = "", lastModifiedTS = "", } -}, + }, longDescription = "", name = "", qualifiedName = "", @@ -5517,6 +5530,7 @@ public void Example_DeleteGlossary_ShortVersion() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossary(""); + Console.WriteLine(response.Status); } @@ -5529,6 +5543,7 @@ public async Task Example_DeleteGlossary_ShortVersion_Async() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryAsync(""); + Console.WriteLine(response.Status); } @@ -5541,6 +5556,7 @@ public void Example_DeleteGlossary_AllParameters() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossary(""); + Console.WriteLine(response.Status); } @@ -5553,6 +5569,7 @@ public async Task Example_DeleteGlossary_AllParameters_Async() PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryAsync(""); + Console.WriteLine(response.Status); } @@ -6896,10 +6913,10 @@ public void Example_ExportGlossaryTermsAsCsv_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = client.ExportGlossaryTermsAsCsv("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -6914,10 +6931,10 @@ public async Task Example_ExportGlossaryTermsAsCsv_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = await client.ExportGlossaryTermsAsCsvAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -6932,10 +6949,10 @@ public void Example_ExportGlossaryTermsAsCsv_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = client.ExportGlossaryTermsAsCsv("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -6950,10 +6967,10 @@ public async Task Example_ExportGlossaryTermsAsCsv_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new List() -{ + RequestContent content = RequestContent.Create(new object[] + { "" -}); + }); Response response = await client.ExportGlossaryTermsAsCsvAsync("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; 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 ac82e7389029f..f55e57ba4733b 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 @@ -16,7 +16,7 @@ namespace Azure.Analytics.Purview.Catalog.Samples { - internal class Samples_PurviewLineages + public partial class Samples_PurviewLineages { [Test] [Ignore("Only validating compilation of examples")] 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 131f93ef11562..183127f1ee65c 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 @@ -16,7 +16,7 @@ namespace Azure.Analytics.Purview.Catalog.Samples { - internal class Samples_PurviewRelationships + public partial class Samples_PurviewRelationships { [Test] [Ignore("Only validating compilation of examples")] @@ -481,6 +481,7 @@ public void Example_Delete_ShortVersion() PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -493,6 +494,7 @@ public async Task Example_Delete_ShortVersion_Async() PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } @@ -505,6 +507,7 @@ public void Example_Delete_AllParameters() PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); Response response = client.Delete(""); + Console.WriteLine(response.Status); } @@ -517,6 +520,7 @@ public async Task Example_Delete_AllParameters_Async() PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); Response response = await client.DeleteAsync(""); + Console.WriteLine(response.Status); } } diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewTypes.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewTypes.cs index 6a46b2b562e81..3f9819fa1db73 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewTypes.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewTypes.cs @@ -17,7 +17,7 @@ namespace Azure.Analytics.Purview.Catalog.Samples { - internal class Samples_PurviewTypes + public partial class Samples_PurviewTypes { [Test] [Ignore("Only validating compilation of examples")] @@ -2060,6 +2060,7 @@ public void Example_DeleteTypeByName_ShortVersion() PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); Response response = client.DeleteTypeByName(""); + Console.WriteLine(response.Status); } @@ -2072,6 +2073,7 @@ public async Task Example_DeleteTypeByName_ShortVersion_Async() PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); Response response = await client.DeleteTypeByNameAsync(""); + Console.WriteLine(response.Status); } @@ -2084,6 +2086,7 @@ public void Example_DeleteTypeByName_AllParameters() PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); Response response = client.DeleteTypeByName(""); + Console.WriteLine(response.Status); } @@ -2096,6 +2099,7 @@ public async Task Example_DeleteTypeByName_AllParameters_Async() PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); Response response = await client.DeleteTypeByNameAsync(""); + Console.WriteLine(response.Status); } @@ -2859,24 +2863,24 @@ public void Example_CreateTypeDefinitions_AllParameters() RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() -{ + businessMetadataDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { new { cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { -new Dictionary() +new Dictionary { ["params"] = new { key = new object(), }, -["type"] = "", +["type"] = "" } }, defaultValue = "", @@ -2900,7 +2904,7 @@ public void Example_CreateTypeDefinitions_AllParameters() createdBy = "", dateFormatter = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -2908,7 +2912,7 @@ public void Example_CreateTypeDefinitions_AllParameters() lenient = true, numberFormat = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -2921,18 +2925,17 @@ public void Example_CreateTypeDefinitions_AllParameters() parseIntegerOnly = true, roundingMode = "UP", }, -timeZone = new Dictionary() +timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", -["availableIds"] = new List() +["availableIds"] = new object[] { "" }, -["default"] = null -, +["default"] = null, ["displayName"] = "", -["rawOffset"] = 1234, +["rawOffset"] = 1234 }, }, description = "", @@ -2949,24 +2952,24 @@ public void Example_CreateTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - classificationDefs = new List() -{ + }, + classificationDefs = new object[] + { new { -entityTypes = new List() +entityTypes = new object[] { "" }, -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -2987,27 +2990,27 @@ public void Example_CreateTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - entityDefs = new List() -{ + }, + entityDefs = new object[] + { new { -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -relationshipAttributeDefs = new List() +relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { null }, @@ -3027,7 +3030,7 @@ public void Example_CreateTypeDefinitions_AllParameters() valuesMinCount = 1234, } }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -3048,13 +3051,13 @@ public void Example_CreateTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - enumDefs = new List() -{ + }, + enumDefs = new object[] + { new { defaultValue = "", -elementDefs = new List() +elementDefs = new object[] { new { @@ -3080,9 +3083,9 @@ public void Example_CreateTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - relationshipDefs = new List() -{ + }, + relationshipDefs = new object[] + { new { endDef1 = new @@ -3096,7 +3099,7 @@ public void Example_CreateTypeDefinitions_AllParameters() }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -3117,12 +3120,12 @@ public void Example_CreateTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - structDefs = new List() -{ + }, + structDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -3143,12 +3146,12 @@ public void Example_CreateTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - termTemplateDefs = new List() -{ + }, + termTemplateDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -3169,7 +3172,7 @@ public void Example_CreateTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, + }, }); Response response = client.CreateTypeDefinitions(content); @@ -3519,24 +3522,24 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() -{ + businessMetadataDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { new { cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { -new Dictionary() +new Dictionary { ["params"] = new { key = new object(), }, -["type"] = "", +["type"] = "" } }, defaultValue = "", @@ -3560,7 +3563,7 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() createdBy = "", dateFormatter = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -3568,7 +3571,7 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() lenient = true, numberFormat = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -3581,18 +3584,17 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() parseIntegerOnly = true, roundingMode = "UP", }, -timeZone = new Dictionary() +timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", -["availableIds"] = new List() +["availableIds"] = new object[] { "" }, -["default"] = null -, +["default"] = null, ["displayName"] = "", -["rawOffset"] = 1234, +["rawOffset"] = 1234 }, }, description = "", @@ -3609,24 +3611,24 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - classificationDefs = new List() -{ + }, + classificationDefs = new object[] + { new { -entityTypes = new List() +entityTypes = new object[] { "" }, -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -3647,27 +3649,27 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - entityDefs = new List() -{ + }, + entityDefs = new object[] + { new { -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -relationshipAttributeDefs = new List() +relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { null }, @@ -3687,7 +3689,7 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() valuesMinCount = 1234, } }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -3708,13 +3710,13 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - enumDefs = new List() -{ + }, + enumDefs = new object[] + { new { defaultValue = "", -elementDefs = new List() +elementDefs = new object[] { new { @@ -3740,9 +3742,9 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - relationshipDefs = new List() -{ + }, + relationshipDefs = new object[] + { new { endDef1 = new @@ -3756,7 +3758,7 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -3777,12 +3779,12 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - structDefs = new List() -{ + }, + structDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -3803,12 +3805,12 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - termTemplateDefs = new List() -{ + }, + termTemplateDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -3829,7 +3831,7 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, + }, }); Response response = await client.CreateTypeDefinitionsAsync(content); @@ -4209,24 +4211,24 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() -{ + businessMetadataDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { new { cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { -new Dictionary() +new Dictionary { ["params"] = new { key = new object(), }, -["type"] = "", +["type"] = "" } }, defaultValue = "", @@ -4250,7 +4252,7 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() createdBy = "", dateFormatter = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -4258,7 +4260,7 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() lenient = true, numberFormat = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -4271,18 +4273,17 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() parseIntegerOnly = true, roundingMode = "UP", }, -timeZone = new Dictionary() +timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", -["availableIds"] = new List() +["availableIds"] = new object[] { "" }, -["default"] = null -, +["default"] = null, ["displayName"] = "", -["rawOffset"] = 1234, +["rawOffset"] = 1234 }, }, description = "", @@ -4299,24 +4300,24 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - classificationDefs = new List() -{ + }, + classificationDefs = new object[] + { new { -entityTypes = new List() +entityTypes = new object[] { "" }, -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -4337,27 +4338,27 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - entityDefs = new List() -{ + }, + entityDefs = new object[] + { new { -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -relationshipAttributeDefs = new List() +relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { null }, @@ -4377,7 +4378,7 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() valuesMinCount = 1234, } }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -4398,13 +4399,13 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - enumDefs = new List() -{ + }, + enumDefs = new object[] + { new { defaultValue = "", -elementDefs = new List() +elementDefs = new object[] { new { @@ -4430,9 +4431,9 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - relationshipDefs = new List() -{ + }, + relationshipDefs = new object[] + { new { endDef1 = new @@ -4446,7 +4447,7 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -4467,12 +4468,12 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - structDefs = new List() -{ + }, + structDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -4493,12 +4494,12 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - termTemplateDefs = new List() -{ + }, + termTemplateDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -4519,7 +4520,7 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, + }, }); Response response = client.UpdateAtlasTypeDefinitions(content); @@ -4869,24 +4870,24 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() -{ + businessMetadataDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { new { cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { -new Dictionary() +new Dictionary { ["params"] = new { key = new object(), }, -["type"] = "", +["type"] = "" } }, defaultValue = "", @@ -4910,7 +4911,7 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() createdBy = "", dateFormatter = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -4918,7 +4919,7 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() lenient = true, numberFormat = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -4931,18 +4932,17 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() parseIntegerOnly = true, roundingMode = "UP", }, -timeZone = new Dictionary() +timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", -["availableIds"] = new List() +["availableIds"] = new object[] { "" }, -["default"] = null -, +["default"] = null, ["displayName"] = "", -["rawOffset"] = 1234, +["rawOffset"] = 1234 }, }, description = "", @@ -4959,24 +4959,24 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - classificationDefs = new List() -{ + }, + classificationDefs = new object[] + { new { -entityTypes = new List() +entityTypes = new object[] { "" }, -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -4997,27 +4997,27 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - entityDefs = new List() -{ + }, + entityDefs = new object[] + { new { -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -relationshipAttributeDefs = new List() +relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { null }, @@ -5037,7 +5037,7 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() valuesMinCount = 1234, } }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -5058,13 +5058,13 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - enumDefs = new List() -{ + }, + enumDefs = new object[] + { new { defaultValue = "", -elementDefs = new List() +elementDefs = new object[] { new { @@ -5090,9 +5090,9 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - relationshipDefs = new List() -{ + }, + relationshipDefs = new object[] + { new { endDef1 = new @@ -5106,7 +5106,7 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -5127,12 +5127,12 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - structDefs = new List() -{ + }, + structDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -5153,12 +5153,12 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - termTemplateDefs = new List() -{ + }, + termTemplateDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -5179,7 +5179,7 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, + }, }); Response response = await client.UpdateAtlasTypeDefinitionsAsync(content); @@ -5529,6 +5529,7 @@ public void Example_DeleteTypeDefinitions_ShortVersion() RequestContent content = RequestContent.Create(new object()); Response response = client.DeleteTypeDefinitions(content); + Console.WriteLine(response.Status); } @@ -5542,6 +5543,7 @@ public async Task Example_DeleteTypeDefinitions_ShortVersion_Async() RequestContent content = RequestContent.Create(new object()); Response response = await client.DeleteTypeDefinitionsAsync(content); + Console.WriteLine(response.Status); } @@ -5555,24 +5557,24 @@ public void Example_DeleteTypeDefinitions_AllParameters() RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() -{ + businessMetadataDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { new { cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { -new Dictionary() +new Dictionary { ["params"] = new { key = new object(), }, -["type"] = "", +["type"] = "" } }, defaultValue = "", @@ -5596,7 +5598,7 @@ public void Example_DeleteTypeDefinitions_AllParameters() createdBy = "", dateFormatter = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -5604,7 +5606,7 @@ public void Example_DeleteTypeDefinitions_AllParameters() lenient = true, numberFormat = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -5617,18 +5619,17 @@ public void Example_DeleteTypeDefinitions_AllParameters() parseIntegerOnly = true, roundingMode = "UP", }, -timeZone = new Dictionary() +timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", -["availableIds"] = new List() +["availableIds"] = new object[] { "" }, -["default"] = null -, +["default"] = null, ["displayName"] = "", -["rawOffset"] = 1234, +["rawOffset"] = 1234 }, }, description = "", @@ -5645,24 +5646,24 @@ public void Example_DeleteTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - classificationDefs = new List() -{ + }, + classificationDefs = new object[] + { new { -entityTypes = new List() +entityTypes = new object[] { "" }, -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -5683,27 +5684,27 @@ public void Example_DeleteTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - entityDefs = new List() -{ + }, + entityDefs = new object[] + { new { -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -relationshipAttributeDefs = new List() +relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { null }, @@ -5723,7 +5724,7 @@ public void Example_DeleteTypeDefinitions_AllParameters() valuesMinCount = 1234, } }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -5744,13 +5745,13 @@ public void Example_DeleteTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - enumDefs = new List() -{ + }, + enumDefs = new object[] + { new { defaultValue = "", -elementDefs = new List() +elementDefs = new object[] { new { @@ -5776,9 +5777,9 @@ public void Example_DeleteTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - relationshipDefs = new List() -{ + }, + relationshipDefs = new object[] + { new { endDef1 = new @@ -5792,7 +5793,7 @@ public void Example_DeleteTypeDefinitions_AllParameters() }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -5813,12 +5814,12 @@ public void Example_DeleteTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - structDefs = new List() -{ + }, + structDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -5839,12 +5840,12 @@ public void Example_DeleteTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, - termTemplateDefs = new List() -{ + }, + termTemplateDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -5865,9 +5866,10 @@ public void Example_DeleteTypeDefinitions_AllParameters() version = 123.45F, lastModifiedTS = "", } -}, + }, }); Response response = client.DeleteTypeDefinitions(content); + Console.WriteLine(response.Status); } @@ -5881,24 +5883,24 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() RequestContent content = RequestContent.Create(new { - businessMetadataDefs = new List() -{ + businessMetadataDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { new { cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { -new Dictionary() +new Dictionary { ["params"] = new { key = new object(), }, -["type"] = "", +["type"] = "" } }, defaultValue = "", @@ -5922,7 +5924,7 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() createdBy = "", dateFormatter = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -5930,7 +5932,7 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() lenient = true, numberFormat = new { -availableLocales = new List() +availableLocales = new object[] { "" }, @@ -5943,18 +5945,17 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() parseIntegerOnly = true, roundingMode = "UP", }, -timeZone = new Dictionary() +timeZone = new Dictionary { ["dstSavings"] = 1234, ["id"] = "", -["availableIds"] = new List() +["availableIds"] = new object[] { "" }, -["default"] = null -, +["default"] = null, ["displayName"] = "", -["rawOffset"] = 1234, +["rawOffset"] = 1234 }, }, description = "", @@ -5971,24 +5972,24 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - classificationDefs = new List() -{ + }, + classificationDefs = new object[] + { new { -entityTypes = new List() +entityTypes = new object[] { "" }, -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -6009,27 +6010,27 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - entityDefs = new List() -{ + }, + entityDefs = new object[] + { new { -subTypes = new List() +subTypes = new object[] { "" }, -superTypes = new List() +superTypes = new object[] { "" }, -relationshipAttributeDefs = new List() +relationshipAttributeDefs = new object[] { new { isLegacyAttribute = true, relationshipTypeName = "", cardinality = "SINGLE", -constraints = new List() +constraints = new object[] { null }, @@ -6049,7 +6050,7 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() valuesMinCount = 1234, } }, -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -6070,13 +6071,13 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - enumDefs = new List() -{ + }, + enumDefs = new object[] + { new { defaultValue = "", -elementDefs = new List() +elementDefs = new object[] { new { @@ -6102,9 +6103,9 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - relationshipDefs = new List() -{ + }, + relationshipDefs = new object[] + { new { endDef1 = new @@ -6118,7 +6119,7 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() }, relationshipCategory = "ASSOCIATION", relationshipLabel = "", -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -6139,12 +6140,12 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - structDefs = new List() -{ + }, + structDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -6165,12 +6166,12 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, - termTemplateDefs = new List() -{ + }, + termTemplateDefs = new object[] + { new { -attributeDefs = new List() +attributeDefs = new object[] { null }, @@ -6191,9 +6192,10 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() version = 123.45F, lastModifiedTS = "", } -}, + }, }); Response response = await client.DeleteTypeDefinitionsAsync(content); + Console.WriteLine(response.Status); } diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewClassificationRuleClient.xml b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewClassificationRuleClient.xml index 3dc9143885370..b7d63ec58bad2 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewClassificationRuleClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewClassificationRuleClient.xml @@ -13,7 +13,6 @@ Response response = await client.GetPropertiesAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetPropertiesAsync with all parameters and parse the result. This sample shows how to call GetProperties with all parameters and parse the result. This sample shows how to call CreateOrUpdateAsync with all request content and parse the result. This sample shows how to call CreateOrUpdate with all request content and parse the result. This sample shows how to call DeleteAsync with all parameters and parse the result. This sample shows how to call Delete with all parameters and parse the result. This sample shows how to call GetVersionsAsync with all parameters and parse the result. @@ -283,9 +276,9 @@ PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(end await foreach (BinaryData item in client.GetVersionsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -300,8 +293,7 @@ PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(end foreach (BinaryData item in client.GetVersions(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetVersions with all parameters and parse the result. @@ -313,9 +305,9 @@ PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(end foreach (BinaryData item in client.GetVersions(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewDataSourceClient.xml b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewDataSourceClient.xml index d3d742e9656b5..08ee3a9c81f2f 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewDataSourceClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewDataSourceClient.xml @@ -14,7 +14,6 @@ Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateOrUpdateAsync with all request content and parse the result. This sample shows how to call CreateOrUpdate with all request content and parse the result. This sample shows how to call GetPropertiesAsync with all parameters and parse the result. This sample shows how to call GetProperties with all parameters and parse the result. This sample shows how to call DeleteAsync with all parameters and parse the result. This sample shows how to call Delete with all parameters and parse the result. This sample shows how to call GetScansAsync with all parameters and parse the result. @@ -387,34 +380,34 @@ PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, "").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -429,8 +422,7 @@ PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, " This sample shows how to call GetScans with all parameters and parse the result. @@ -442,34 +434,34 @@ PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, "").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewScanClient.xml b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewScanClient.xml index 70f80c6479b68..d92e007880a2e 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewScanClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewScanClient.xml @@ -81,11 +81,11 @@ RequestContent content = RequestContent.Create(new { properties = new { - excludeUriPrefixes = new List() + excludeUriPrefixes = new object[] { "" }, - includeUriPrefixes = new List() + includeUriPrefixes = new object[] { "" }, @@ -124,11 +124,11 @@ RequestContent content = RequestContent.Create(new { properties = new { - excludeUriPrefixes = new List() + excludeUriPrefixes = new object[] { "" }, - includeUriPrefixes = new List() + includeUriPrefixes = new object[] { "" }, @@ -159,7 +159,6 @@ Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateOrUpdateAsync with all request content and parse the result. () + excludePrefixes = new object[] { "" }, - includePrefixes = new List() + includePrefixes = new object[] { "" }, - resources = new List() + resources = new object[] { "" }, @@ -267,7 +266,6 @@ Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateOrUpdate with all request content and parse the result. () + excludePrefixes = new object[] { "" }, - includePrefixes = new List() + includePrefixes = new object[] { "" }, - resources = new List() + resources = new object[] { "" }, @@ -371,7 +369,6 @@ Response response = await client.GetPropertiesAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetPropertiesAsync with all parameters and parse the result. This sample shows how to call GetProperties with all parameters and parse the result. This sample shows how to call DeleteAsync with all parameters and parse the result. This sample shows how to call Delete with all parameters and parse the result. () + minutes = new object[] { 1234 }, - hours = new List() + hours = new object[] { 1234 }, - weekDays = new List() + weekDays = new object[] { "Sunday" }, - monthDays = new List() + monthDays = new object[] { 1234 }, - monthlyOccurrences = new List() + monthlyOccurrences = new object[] { new { @@ -931,23 +925,23 @@ RequestContent content = RequestContent.Create(new { key = new object(), }, - minutes = new List() + minutes = new object[] { 1234 }, - hours = new List() + hours = new object[] { 1234 }, - weekDays = new List() + weekDays = new object[] { "Sunday" }, - monthDays = new List() + monthDays = new object[] { 1234 }, - monthlyOccurrences = new List() + monthlyOccurrences = new object[] { new { @@ -1094,7 +1088,7 @@ PurviewScanClient client = new PurviewScanClient(endpoint, "", " await foreach (BinaryData item in client.GetRunsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetRunsAsync with all parameters and parse the result. @@ -1106,31 +1100,31 @@ PurviewScanClient client = new PurviewScanClient(endpoint, "", " await foreach (BinaryData item in client.GetRunsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("parentId").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("assetsDiscovered").ToString()); - Console.WriteLine(result[0].GetProperty("assetsClassified").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("errorMessage").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("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("errorMessage").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("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("dataSourceType").ToString()); } ]]> @@ -1145,7 +1139,7 @@ PurviewScanClient client = new PurviewScanClient(endpoint, "", " foreach (BinaryData item in client.GetRuns(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetRuns with all parameters and parse the result. @@ -1157,31 +1151,31 @@ PurviewScanClient client = new PurviewScanClient(endpoint, "", " foreach (BinaryData item in client.GetRuns(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("parentId").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("assetsDiscovered").ToString()); - Console.WriteLine(result[0].GetProperty("assetsClassified").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("errorMessage").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("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("errorMessage").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("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("dataSourceType").ToString()); } ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewScanningServiceClient.xml b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewScanningServiceClient.xml index f891c03f5b6b5..27cd9f15ed308 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewScanningServiceClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/Docs/PurviewScanningServiceClient.xml @@ -199,7 +199,6 @@ Response response = await client.GetScanRulesetAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetScanRulesetAsync with all parameters and parse the result. ", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetScanRuleset with all parameters and parse the result. This sample shows how to call CreateOrUpdateScanRulesetAsync with all parameters and request content and parse the result. ", - excludedSystemClassifications = new List() + excludedSystemClassifications = new object[] { "" }, - includedCustomClassificationRuleNames = new List() + includedCustomClassificationRuleNames = new object[] { "" }, @@ -311,7 +308,6 @@ Response response = client.CreateOrUpdateScanRuleset("", conten JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateOrUpdateScanRuleset with all parameters and request content and parse the result. ", - excludedSystemClassifications = new List() + excludedSystemClassifications = new object[] { "" }, - includedCustomClassificationRuleNames = new List() + includedCustomClassificationRuleNames = new object[] { "" }, @@ -359,7 +355,6 @@ Response response = await client.DeleteScanRulesetAsync("", nul JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call DeleteScanRulesetAsync with all parameters and parse the result. ", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call DeleteScanRuleset with all parameters and parse the result. This sample shows how to call GetSystemRulesetsForDataSourceAsync with all parameters and parse the result. This sample shows how to call GetSystemRulesetsForDataSource with all parameters and parse the result. This sample shows how to call GetSystemRulesetsForVersionAsync with all parameters and parse the result. This sample shows how to call GetSystemRulesetsForVersion with all parameters and parse the result. This sample shows how to call GetLatestSystemRulesetsAsync with all parameters and parse the result. This sample shows how to call GetLatestSystemRulesets with all parameters and parse the result. This sample shows how to call GetKeyVaultReferencesAsync with all parameters and parse the result. @@ -618,10 +606,10 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetKeyVaultReferencesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("properties").GetProperty("baseUrl").ToString()); - Console.WriteLine(result[0].GetProperty("properties").GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("baseUrl").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -636,7 +624,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetKeyVaultReferences(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetKeyVaultReferences with all parameters and parse the result. @@ -648,10 +636,10 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetKeyVaultReferences(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("properties").GetProperty("baseUrl").ToString()); - Console.WriteLine(result[0].GetProperty("properties").GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("baseUrl").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -666,8 +654,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetClassificationRulesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetClassificationRulesAsync with all parameters and parse the result. @@ -679,9 +666,9 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetClassificationRulesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -696,8 +683,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetClassificationRules(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetClassificationRules with all parameters and parse the result. @@ -709,9 +695,9 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetClassificationRules(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -726,8 +712,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetDataSourcesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetDataSourcesAsync with all parameters and parse the result. @@ -739,37 +724,37 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetDataSourcesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("parentId").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -784,8 +769,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetDataSources(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetDataSources with all parameters and parse the result. @@ -797,37 +781,37 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetDataSources(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("parentId").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -842,8 +826,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetScanRulesetsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetScanRulesetsAsync with all parameters and parse the result. @@ -855,12 +838,12 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetScanRulesetsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -875,8 +858,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetScanRulesets(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetScanRulesets with all parameters and parse the result. @@ -888,12 +870,12 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetScanRulesets(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -908,8 +890,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetSystemRulesetsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetSystemRulesetsAsync with all parameters and parse the result. @@ -921,12 +902,12 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetSystemRulesetsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -941,8 +922,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetSystemRulesets(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetSystemRulesets with all parameters and parse the result. @@ -954,12 +934,12 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetSystemRulesets(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -974,8 +954,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetSystemRulesetsVersionsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetSystemRulesetsVersionsAsync with all parameters and parse the result. @@ -987,12 +966,12 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, await foreach (BinaryData item in client.GetSystemRulesetsVersionsAsync("None", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> @@ -1007,8 +986,7 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetSystemRulesetsVersions(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } ]]> This sample shows how to call GetSystemRulesetsVersions with all parameters and parse the result. @@ -1020,12 +998,12 @@ PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, foreach (BinaryData item in client.GetSystemRulesetsVersions("None", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewClassificationRuleClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewClassificationRuleClient.cs index cd8f79e64d576..65cfcf468adbb 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewClassificationRuleClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewClassificationRuleClient.cs @@ -16,7 +16,7 @@ namespace Azure.Analytics.Purview.Scanning.Samples { - public class Samples_PurviewClassificationRuleClient + public partial class Samples_PurviewClassificationRuleClient { [Test] [Ignore("Only validating compilation of examples")] @@ -30,7 +30,6 @@ public void Example_GetProperties_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -45,7 +44,6 @@ public async Task Example_GetProperties_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -93,7 +91,6 @@ public void Example_CreateOrUpdate_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -109,7 +106,6 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -176,7 +172,6 @@ public void Example_Delete_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -191,7 +186,6 @@ public async Task Example_Delete_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -311,8 +305,7 @@ public void Example_GetVersions_ShortVersion() foreach (BinaryData item in client.GetVersions(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -327,8 +320,7 @@ public async Task Example_GetVersions_ShortVersion_Async() await foreach (BinaryData item in client.GetVersionsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -343,9 +335,9 @@ public void Example_GetVersions_AllParameters() foreach (BinaryData item in client.GetVersions(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -360,9 +352,9 @@ public async Task Example_GetVersions_AllParameters_Async() await foreach (BinaryData item in client.GetVersionsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewDataSourceClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewDataSourceClient.cs index 35daf984c31d8..4aa89adf31d26 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewDataSourceClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewDataSourceClient.cs @@ -16,7 +16,7 @@ namespace Azure.Analytics.Purview.Scanning.Samples { - public class Samples_PurviewDataSourceClient + public partial class Samples_PurviewDataSourceClient { [Test] [Ignore("Only validating compilation of examples")] @@ -31,7 +31,6 @@ public void Example_CreateOrUpdate_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -47,7 +46,6 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -174,7 +172,6 @@ public void Example_GetProperties_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -189,7 +186,6 @@ public async Task Example_GetProperties_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -292,7 +288,6 @@ public void Example_Delete_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -307,7 +302,6 @@ public async Task Example_Delete_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -409,8 +403,7 @@ public void Example_GetScans_ShortVersion() foreach (BinaryData item in client.GetScans(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -425,8 +418,7 @@ public async Task Example_GetScans_ShortVersion_Async() await foreach (BinaryData item in client.GetScansAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -441,34 +433,34 @@ public void Example_GetScans_AllParameters() foreach (BinaryData item in client.GetScans(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("parentId").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -483,34 +475,34 @@ public async Task Example_GetScans_AllParameters_Async() await foreach (BinaryData item in client.GetScansAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("parentId").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewScanClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewScanClient.cs index 8e81d604dda7f..c5e5cbe7ed1e1 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewScanClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewScanClient.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Analytics.Purview.Scanning.Samples { - public class Samples_PurviewScanClient + public partial class Samples_PurviewScanClient { [Test] [Ignore("Only validating compilation of examples")] @@ -123,14 +122,14 @@ public void Example_CreateOrUpdateFilter_AllParameters() { properties = new { - excludeUriPrefixes = new List() -{ + excludeUriPrefixes = new object[] + { "" -}, - includeUriPrefixes = new List() -{ + }, + includeUriPrefixes = new object[] + { "" -}, + }, }, }); Response response = client.CreateOrUpdateFilter(content); @@ -154,14 +153,14 @@ public async Task Example_CreateOrUpdateFilter_AllParameters_Async() { properties = new { - excludeUriPrefixes = new List() -{ + excludeUriPrefixes = new object[] + { "" -}, - includeUriPrefixes = new List() -{ + }, + includeUriPrefixes = new object[] + { "" -}, + }, }, }); Response response = await client.CreateOrUpdateFilterAsync(content); @@ -189,7 +188,6 @@ public void Example_CreateOrUpdate_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -208,7 +206,6 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -231,18 +228,18 @@ public void Example_CreateOrUpdate_AllParameters() scanRulesetType = "Custom", resourceNameFilter = new { - excludePrefixes = new List() -{ + excludePrefixes = new object[] + { "" -}, - includePrefixes = new List() -{ + }, + includePrefixes = new object[] + { "" -}, - resources = new List() -{ + }, + resources = new object[] + { "" -}, + }, }, credential = new { @@ -323,18 +320,18 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() scanRulesetType = "Custom", resourceNameFilter = new { - excludePrefixes = new List() -{ + excludePrefixes = new object[] + { "" -}, - includePrefixes = new List() -{ + }, + includePrefixes = new object[] + { "" -}, - resources = new List() -{ + }, + resources = new object[] + { "" -}, + }, }, credential = new { @@ -407,7 +404,6 @@ public void Example_GetProperties_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -422,7 +418,6 @@ public async Task Example_GetProperties_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -519,7 +514,6 @@ public void Example_Delete_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -534,7 +528,6 @@ public async Task Example_Delete_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -917,24 +910,24 @@ public void Example_CreateOrUpdateTrigger_AllParameters() { key = new object(), }, - minutes = new List() -{ + minutes = new object[] + { 1234 -}, - hours = new List() -{ + }, + hours = new object[] + { 1234 -}, - weekDays = new List() -{ + }, + weekDays = new object[] + { "Sunday" -}, - monthDays = new List() -{ + }, + monthDays = new object[] + { 1234 -}, - monthlyOccurrences = new List() -{ + }, + monthlyOccurrences = new object[] + { new { additionalProperties = new @@ -944,7 +937,7 @@ public void Example_CreateOrUpdateTrigger_AllParameters() day = "Sunday", occurrence = 1234, } -}, + }, }, timeZone = "", }, @@ -1003,24 +996,24 @@ public async Task Example_CreateOrUpdateTrigger_AllParameters_Async() { key = new object(), }, - minutes = new List() -{ + minutes = new object[] + { 1234 -}, - hours = new List() -{ + }, + hours = new object[] + { 1234 -}, - weekDays = new List() -{ + }, + weekDays = new object[] + { "Sunday" -}, - monthDays = new List() -{ + }, + monthDays = new object[] + { 1234 -}, - monthlyOccurrences = new List() -{ + }, + monthlyOccurrences = new object[] + { new { additionalProperties = new @@ -1030,7 +1023,7 @@ public async Task Example_CreateOrUpdateTrigger_AllParameters_Async() day = "Sunday", occurrence = 1234, } -}, + }, }, timeZone = "", }, @@ -1172,7 +1165,7 @@ public void Example_GetRuns_ShortVersion() foreach (BinaryData item in client.GetRuns(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1187,7 +1180,7 @@ public async Task Example_GetRuns_ShortVersion_Async() await foreach (BinaryData item in client.GetRunsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -1202,31 +1195,31 @@ public void Example_GetRuns_AllParameters() foreach (BinaryData item in client.GetRuns(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("parentId").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("assetsDiscovered").ToString()); - Console.WriteLine(result[0].GetProperty("assetsClassified").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("errorMessage").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("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("errorMessage").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("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("dataSourceType").ToString()); } } @@ -1241,31 +1234,31 @@ public async Task Example_GetRuns_AllParameters_Async() await foreach (BinaryData item in client.GetRunsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("parentId").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("assetsDiscovered").ToString()); - Console.WriteLine(result[0].GetProperty("assetsClassified").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("errorMessage").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("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("errorMessage").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("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("dataSourceType").ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewScanningServiceClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewScanningServiceClient.cs index bb113fef4c762..b532f6412a82e 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewScanningServiceClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/tests/Generated/Samples/Samples_PurviewScanningServiceClient.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Analytics.Purview.Scanning.Samples { - public class Samples_PurviewScanningServiceClient + public partial class Samples_PurviewScanningServiceClient { [Test] [Ignore("Only validating compilation of examples")] @@ -235,7 +234,6 @@ public void Example_GetScanRuleset_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -250,7 +248,6 @@ public async Task Example_GetScanRuleset_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -304,7 +301,6 @@ public void Example_CreateOrUpdateScanRuleset_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -320,7 +316,6 @@ public async Task Example_CreateOrUpdateScanRuleset_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -336,14 +331,14 @@ public void Example_CreateOrUpdateScanRuleset_AllParameters() properties = new { description = "", - excludedSystemClassifications = new List() -{ + excludedSystemClassifications = new object[] + { "" -}, - includedCustomClassificationRuleNames = new List() -{ + }, + includedCustomClassificationRuleNames = new object[] + { "" -}, + }, }, kind = "AzureSubscription", scanRulesetType = "Custom", @@ -372,14 +367,14 @@ public async Task Example_CreateOrUpdateScanRuleset_AllParameters_Async() properties = new { description = "", - excludedSystemClassifications = new List() -{ + excludedSystemClassifications = new object[] + { "" -}, - includedCustomClassificationRuleNames = new List() -{ + }, + includedCustomClassificationRuleNames = new object[] + { "" -}, + }, }, kind = "AzureSubscription", scanRulesetType = "Custom", @@ -407,7 +402,6 @@ public void Example_DeleteScanRuleset_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -422,7 +416,6 @@ public async Task Example_DeleteScanRuleset_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -475,7 +468,6 @@ public void Example_GetSystemRulesetsForDataSource_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -490,7 +482,6 @@ public async Task Example_GetSystemRulesetsForDataSource_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -543,7 +534,6 @@ public void Example_GetSystemRulesetsForVersion_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -558,7 +548,6 @@ public async Task Example_GetSystemRulesetsForVersion_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -611,7 +600,6 @@ public void Example_GetLatestSystemRulesets_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -626,7 +614,6 @@ public async Task Example_GetLatestSystemRulesets_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -678,7 +665,7 @@ public void Example_GetKeyVaultReferences_ShortVersion() foreach (BinaryData item in client.GetKeyVaultReferences(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -693,7 +680,7 @@ public async Task Example_GetKeyVaultReferences_ShortVersion_Async() await foreach (BinaryData item in client.GetKeyVaultReferencesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -708,10 +695,10 @@ public void Example_GetKeyVaultReferences_AllParameters() foreach (BinaryData item in client.GetKeyVaultReferences(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("properties").GetProperty("baseUrl").ToString()); - Console.WriteLine(result[0].GetProperty("properties").GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("baseUrl").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -726,10 +713,10 @@ public async Task Example_GetKeyVaultReferences_AllParameters_Async() await foreach (BinaryData item in client.GetKeyVaultReferencesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("properties").GetProperty("baseUrl").ToString()); - Console.WriteLine(result[0].GetProperty("properties").GetProperty("description").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("baseUrl").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -744,8 +731,7 @@ public void Example_GetClassificationRules_ShortVersion() foreach (BinaryData item in client.GetClassificationRules(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -760,8 +746,7 @@ public async Task Example_GetClassificationRules_ShortVersion_Async() await foreach (BinaryData item in client.GetClassificationRulesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -776,9 +761,9 @@ public void Example_GetClassificationRules_AllParameters() foreach (BinaryData item in client.GetClassificationRules(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -793,9 +778,9 @@ public async Task Example_GetClassificationRules_AllParameters_Async() await foreach (BinaryData item in client.GetClassificationRulesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -810,8 +795,7 @@ public void Example_GetDataSources_ShortVersion() foreach (BinaryData item in client.GetDataSources(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -826,8 +810,7 @@ public async Task Example_GetDataSources_ShortVersion_Async() await foreach (BinaryData item in client.GetDataSourcesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -842,37 +825,37 @@ public void Example_GetDataSources_AllParameters() foreach (BinaryData item in client.GetDataSources(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("parentId").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -887,37 +870,37 @@ public async Task Example_GetDataSources_AllParameters_Async() await foreach (BinaryData item in client.GetDataSourcesAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("parentId").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("scans")[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("parentId").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsDiscovered").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("assetsClassified").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("notifications")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("diagnostics").GetProperty("exceptionCountMap").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("queuedTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("pipelineStartTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetVersion").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("scanLevelType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("errorMessage").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("error").GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("runType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("scanResults")[0].GetProperty("dataSourceType").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("scans")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -932,8 +915,7 @@ public void Example_GetScanRulesets_ShortVersion() foreach (BinaryData item in client.GetScanRulesets(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -948,8 +930,7 @@ public async Task Example_GetScanRulesets_ShortVersion_Async() await foreach (BinaryData item in client.GetScanRulesetsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -964,12 +945,12 @@ public void Example_GetScanRulesets_AllParameters() foreach (BinaryData item in client.GetScanRulesets(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -984,12 +965,12 @@ public async Task Example_GetScanRulesets_AllParameters_Async() await foreach (BinaryData item in client.GetScanRulesetsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -1004,8 +985,7 @@ public void Example_GetSystemRulesets_ShortVersion() foreach (BinaryData item in client.GetSystemRulesets(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -1020,8 +1000,7 @@ public async Task Example_GetSystemRulesets_ShortVersion_Async() await foreach (BinaryData item in client.GetSystemRulesetsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -1036,12 +1015,12 @@ public void Example_GetSystemRulesets_AllParameters() foreach (BinaryData item in client.GetSystemRulesets(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -1056,12 +1035,12 @@ public async Task Example_GetSystemRulesets_AllParameters_Async() await foreach (BinaryData item in client.GetSystemRulesetsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -1076,8 +1055,7 @@ public void Example_GetSystemRulesetsVersions_ShortVersion() foreach (BinaryData item in client.GetSystemRulesetsVersions(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -1092,8 +1070,7 @@ public async Task Example_GetSystemRulesetsVersions_ShortVersion_Async() await foreach (BinaryData item in client.GetSystemRulesetsVersionsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } } @@ -1108,12 +1085,12 @@ public void Example_GetSystemRulesetsVersions_AllParameters() foreach (BinaryData item in client.GetSystemRulesetsVersions("None", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } @@ -1128,12 +1105,12 @@ public async Task Example_GetSystemRulesetsVersions_AllParameters_Async() await foreach (BinaryData item in client.GetSystemRulesetsVersionsAsync("None", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("kind").ToString()); - Console.WriteLine(result[0].GetProperty("scanRulesetType").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("version").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("scanRulesetType").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ReceivedSharesClient.xml b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ReceivedSharesClient.xml index d3fb694c42a95..7845b87912885 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ReceivedSharesClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ReceivedSharesClient.xml @@ -13,7 +13,6 @@ Response response = await client.GetReceivedShareAsync("", null JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetReceivedShareAsync with all parameters and parse the result. ", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetReceivedShare with all parameters and parse the result. ", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } ]]> This sample shows how to call GetAllAttachedReceivedSharesAsync with all parameters and parse the result. @@ -225,9 +222,9 @@ ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllAttachedReceivedSharesAsync("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } ]]> @@ -242,8 +239,7 @@ ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); foreach (BinaryData item in client.GetAllAttachedReceivedShares("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } ]]> This sample shows how to call GetAllAttachedReceivedShares with all parameters and parse the result. @@ -255,9 +251,9 @@ ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); foreach (BinaryData item in client.GetAllAttachedReceivedShares("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } ]]> @@ -272,8 +268,7 @@ ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllDetachedReceivedSharesAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } ]]> This sample shows how to call GetAllDetachedReceivedSharesAsync with all parameters and parse the result. @@ -285,9 +280,9 @@ ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllDetachedReceivedSharesAsync("", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } ]]> @@ -302,8 +297,7 @@ ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); foreach (BinaryData item in client.GetAllDetachedReceivedShares(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } ]]> This sample shows how to call GetAllDetachedReceivedShares with all parameters and parse the result. @@ -315,9 +309,9 @@ ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); foreach (BinaryData item in client.GetAllDetachedReceivedShares("", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } ]]> @@ -339,7 +333,6 @@ BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateOrReplaceReceivedShareAsync with all parameters and request content and parse the result. This sample shows how to call CreateOrReplaceReceivedShare with all parameters and request content and parse the result. ", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetSentShareAsync with all parameters and parse the result. ", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetSentShare with all parameters and parse the result. ", "< JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetSentShareInvitationAsync with all parameters and parse the result. ", " This sample shows how to call GetSentShareInvitation with all parameters and parse the result. ", JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateSentShareInvitationAsync with all parameters and request content and parse the result. ", " This sample shows how to call CreateSentShareInvitation with all parameters and request content and parse the result. This sample shows how to call NotifyUserSentShareInvitationAsync with all parameters and parse the result. ", " This sample shows how to call NotifyUserSentShareInvitation with all parameters and parse the result. ", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } ]]> This sample shows how to call GetAllSentSharesAsync with all parameters and parse the result. @@ -289,9 +280,9 @@ SentSharesClient client = new SentSharesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllSentSharesAsync("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } ]]> @@ -306,8 +297,7 @@ SentSharesClient client = new SentSharesClient(endpoint, credential); foreach (BinaryData item in client.GetAllSentShares("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } ]]> This sample shows how to call GetAllSentShares with all parameters and parse the result. @@ -319,9 +309,9 @@ SentSharesClient client = new SentSharesClient(endpoint, credential); foreach (BinaryData item in client.GetAllSentShares("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } ]]> @@ -336,8 +326,7 @@ SentSharesClient client = new SentSharesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllSentShareInvitationsAsync("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("invitationKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("invitationKind").ToString()); } ]]> This sample shows how to call GetAllSentShareInvitationsAsync with all parameters and parse the result. @@ -349,9 +338,9 @@ SentSharesClient client = new SentSharesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllSentShareInvitationsAsync("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("invitationKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("invitationKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } ]]> @@ -366,8 +355,7 @@ SentSharesClient client = new SentSharesClient(endpoint, credential); foreach (BinaryData item in client.GetAllSentShareInvitations("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("invitationKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("invitationKind").ToString()); } ]]> This sample shows how to call GetAllSentShareInvitations with all parameters and parse the result. @@ -379,9 +367,9 @@ SentSharesClient client = new SentSharesClient(endpoint, credential); foreach (BinaryData item in client.GetAllSentShareInvitations("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("invitationKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("invitationKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } ]]> @@ -401,7 +389,7 @@ RequestContent content = RequestContent.Create(new { properties = new { - paths = new List() + paths = new object[] { new { @@ -421,7 +409,6 @@ BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateOrReplaceSentShareAsync with all parameters and request content and parse the result. () + paths = new object[] { new { @@ -484,7 +471,7 @@ RequestContent content = RequestContent.Create(new { properties = new { - paths = new List() + paths = new object[] { new { @@ -504,7 +491,6 @@ BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); -Console.WriteLine(result.ToString()); ]]> This sample shows how to call CreateOrReplaceSentShare with all parameters and request content and parse the result. () + paths = new object[] { new { diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ShareResourcesClient.xml b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ShareResourcesClient.xml index 75c89680ee38a..a5dd1c250dc7b 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ShareResourcesClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ShareResourcesClient.xml @@ -12,7 +12,7 @@ ShareResourcesClient client = new ShareResourcesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllShareResourcesAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllShareResourcesAsync with all parameters and parse the result. @@ -24,13 +24,13 @@ ShareResourcesClient client = new ShareResourcesClient(endpoint, credential); await foreach (BinaryData item in client.GetAllShareResourcesAsync("", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("receivedSharesCount").ToString()); - Console.WriteLine(result[0].GetProperty("sentSharesCount").ToString()); - Console.WriteLine(result[0].GetProperty("storeKind").ToString()); - Console.WriteLine(result[0].GetProperty("storeReference").GetProperty("referenceName").ToString()); - Console.WriteLine(result[0].GetProperty("storeReference").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("receivedSharesCount").ToString()); + Console.WriteLine(result.GetProperty("sentSharesCount").ToString()); + Console.WriteLine(result.GetProperty("storeKind").ToString()); + Console.WriteLine(result.GetProperty("storeReference").GetProperty("referenceName").ToString()); + Console.WriteLine(result.GetProperty("storeReference").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } ]]> @@ -45,7 +45,7 @@ ShareResourcesClient client = new ShareResourcesClient(endpoint, credential); foreach (BinaryData item in client.GetAllShareResources(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } ]]> This sample shows how to call GetAllShareResources with all parameters and parse the result. @@ -57,13 +57,13 @@ ShareResourcesClient client = new ShareResourcesClient(endpoint, credential); foreach (BinaryData item in client.GetAllShareResources("", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("receivedSharesCount").ToString()); - Console.WriteLine(result[0].GetProperty("sentSharesCount").ToString()); - Console.WriteLine(result[0].GetProperty("storeKind").ToString()); - Console.WriteLine(result[0].GetProperty("storeReference").GetProperty("referenceName").ToString()); - Console.WriteLine(result[0].GetProperty("storeReference").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("receivedSharesCount").ToString()); + Console.WriteLine(result.GetProperty("sentSharesCount").ToString()); + Console.WriteLine(result.GetProperty("storeKind").ToString()); + Console.WriteLine(result.GetProperty("storeReference").GetProperty("referenceName").ToString()); + Console.WriteLine(result.GetProperty("storeReference").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ReceivedSharesClient.cs b/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ReceivedSharesClient.cs index a2fabb2162148..071846c7360bc 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ReceivedSharesClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ReceivedSharesClient.cs @@ -16,7 +16,7 @@ namespace Azure.Analytics.Purview.Sharing.Samples { - public class Samples_ReceivedSharesClient + public partial class Samples_ReceivedSharesClient { [Test] [Ignore("Only validating compilation of examples")] @@ -30,7 +30,6 @@ public void Example_GetReceivedShare_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -45,7 +44,6 @@ public async Task Example_GetReceivedShare_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -247,8 +245,7 @@ public void Example_GetAllAttachedReceivedShares_ShortVersion() foreach (BinaryData item in client.GetAllAttachedReceivedShares("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } } @@ -263,8 +260,7 @@ public async Task Example_GetAllAttachedReceivedShares_ShortVersion_Async() await foreach (BinaryData item in client.GetAllAttachedReceivedSharesAsync("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } } @@ -279,9 +275,9 @@ public void Example_GetAllAttachedReceivedShares_AllParameters() foreach (BinaryData item in client.GetAllAttachedReceivedShares("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } } @@ -296,9 +292,9 @@ public async Task Example_GetAllAttachedReceivedShares_AllParameters_Async() await foreach (BinaryData item in client.GetAllAttachedReceivedSharesAsync("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } } @@ -313,8 +309,7 @@ public void Example_GetAllDetachedReceivedShares_ShortVersion() foreach (BinaryData item in client.GetAllDetachedReceivedShares(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } } @@ -329,8 +324,7 @@ public async Task Example_GetAllDetachedReceivedShares_ShortVersion_Async() await foreach (BinaryData item in client.GetAllDetachedReceivedSharesAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } } @@ -345,9 +339,9 @@ public void Example_GetAllDetachedReceivedShares_AllParameters() foreach (BinaryData item in client.GetAllDetachedReceivedShares("", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } } @@ -362,9 +356,9 @@ public async Task Example_GetAllDetachedReceivedShares_AllParameters_Async() await foreach (BinaryData item in client.GetAllDetachedReceivedSharesAsync("", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } } @@ -386,7 +380,6 @@ public void Example_CreateOrReplaceReceivedShare_ShortVersion() JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -407,7 +400,6 @@ public async Task Example_CreateOrReplaceReceivedShare_ShortVersion_Async() JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_SentSharesClient.cs b/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_SentSharesClient.cs index 03e2197e8f1cd..c6748e417c386 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_SentSharesClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_SentSharesClient.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Analytics.Purview.Sharing.Samples { - public class Samples_SentSharesClient + public partial class Samples_SentSharesClient { [Test] [Ignore("Only validating compilation of examples")] @@ -31,7 +30,6 @@ public void Example_GetSentShare_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -46,7 +44,6 @@ public async Task Example_GetSentShare_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -93,7 +90,6 @@ public void Example_GetSentShareInvitation_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -108,7 +104,6 @@ public async Task Example_GetSentShareInvitation_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -164,7 +159,6 @@ public void Example_CreateSentShareInvitation_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -188,7 +182,6 @@ public async Task Example_CreateSentShareInvitation_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -257,7 +250,6 @@ public void Example_NotifyUserSentShareInvitation_ShortVersion() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -272,7 +264,6 @@ public async Task Example_NotifyUserSentShareInvitation_ShortVersion_Async() JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -318,8 +309,7 @@ public void Example_GetAllSentShares_ShortVersion() foreach (BinaryData item in client.GetAllSentShares("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } } @@ -334,8 +324,7 @@ public async Task Example_GetAllSentShares_ShortVersion_Async() await foreach (BinaryData item in client.GetAllSentSharesAsync("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); } } @@ -350,9 +339,9 @@ public void Example_GetAllSentShares_AllParameters() foreach (BinaryData item in client.GetAllSentShares("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } } @@ -367,9 +356,9 @@ public async Task Example_GetAllSentShares_AllParameters_Async() await foreach (BinaryData item in client.GetAllSentSharesAsync("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("shareKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("shareKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } } @@ -384,8 +373,7 @@ public void Example_GetAllSentShareInvitations_ShortVersion() foreach (BinaryData item in client.GetAllSentShareInvitations("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("invitationKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("invitationKind").ToString()); } } @@ -400,8 +388,7 @@ public async Task Example_GetAllSentShareInvitations_ShortVersion_Async() await foreach (BinaryData item in client.GetAllSentShareInvitationsAsync("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("invitationKind").ToString()); - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.GetProperty("invitationKind").ToString()); } } @@ -416,9 +403,9 @@ public void Example_GetAllSentShareInvitations_AllParameters() foreach (BinaryData item in client.GetAllSentShareInvitations("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("invitationKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("invitationKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } } @@ -433,9 +420,9 @@ public async Task Example_GetAllSentShareInvitations_AllParameters_Async() await foreach (BinaryData item in client.GetAllSentShareInvitationsAsync("", "", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("invitationKind").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("invitationKind").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } } @@ -455,13 +442,13 @@ public void Example_CreateOrReplaceSentShare_ShortVersion() { properties = new { - paths = new List() -{ + paths = new object[] + { new { containerName = "", } -}, + }, }, storeKind = "AdlsGen2Account", storeReference = new object(), @@ -475,7 +462,6 @@ public void Example_CreateOrReplaceSentShare_ShortVersion() JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -494,13 +480,13 @@ public async Task Example_CreateOrReplaceSentShare_ShortVersion_Async() { properties = new { - paths = new List() -{ + paths = new object[] + { new { containerName = "", } -}, + }, }, storeKind = "AdlsGen2Account", storeReference = new object(), @@ -514,7 +500,6 @@ public async Task Example_CreateOrReplaceSentShare_ShortVersion_Async() JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("shareKind").ToString()); - Console.WriteLine(result.ToString()); } [Test] @@ -533,15 +518,15 @@ public void Example_CreateOrReplaceSentShare_AllParameters() { properties = new { - paths = new List() -{ + paths = new object[] + { new { containerName = "", receiverPath = "", senderPath = "", } -}, + }, }, storeKind = "AdlsGen2Account", storeReference = new @@ -580,15 +565,15 @@ public async Task Example_CreateOrReplaceSentShare_AllParameters_Async() { properties = new { - paths = new List() -{ + paths = new object[] + { new { containerName = "", receiverPath = "", senderPath = "", } -}, + }, }, storeKind = "AdlsGen2Account", storeReference = new diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ShareResourcesClient.cs b/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ShareResourcesClient.cs index f643d7d226e32..d21b63eeb71b0 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ShareResourcesClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ShareResourcesClient.cs @@ -15,7 +15,7 @@ namespace Azure.Analytics.Purview.Sharing.Samples { - public class Samples_ShareResourcesClient + public partial class Samples_ShareResourcesClient { [Test] [Ignore("Only validating compilation of examples")] @@ -28,7 +28,7 @@ public void Example_GetAllShareResources_ShortVersion() foreach (BinaryData item in client.GetAllShareResources(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -43,7 +43,7 @@ public async Task Example_GetAllShareResources_ShortVersion_Async() await foreach (BinaryData item in client.GetAllShareResourcesAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].ToString()); + Console.WriteLine(result.ToString()); } } @@ -58,13 +58,13 @@ public void Example_GetAllShareResources_AllParameters() foreach (BinaryData item in client.GetAllShareResources("", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("receivedSharesCount").ToString()); - Console.WriteLine(result[0].GetProperty("sentSharesCount").ToString()); - Console.WriteLine(result[0].GetProperty("storeKind").ToString()); - Console.WriteLine(result[0].GetProperty("storeReference").GetProperty("referenceName").ToString()); - Console.WriteLine(result[0].GetProperty("storeReference").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("receivedSharesCount").ToString()); + Console.WriteLine(result.GetProperty("sentSharesCount").ToString()); + Console.WriteLine(result.GetProperty("storeKind").ToString()); + Console.WriteLine(result.GetProperty("storeReference").GetProperty("referenceName").ToString()); + Console.WriteLine(result.GetProperty("storeReference").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } } @@ -79,13 +79,13 @@ public async Task Example_GetAllShareResources_AllParameters_Async() await foreach (BinaryData item in client.GetAllShareResourcesAsync("", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("receivedSharesCount").ToString()); - Console.WriteLine(result[0].GetProperty("sentSharesCount").ToString()); - Console.WriteLine(result[0].GetProperty("storeKind").ToString()); - Console.WriteLine(result[0].GetProperty("storeReference").GetProperty("referenceName").ToString()); - Console.WriteLine(result[0].GetProperty("storeReference").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("receivedSharesCount").ToString()); + Console.WriteLine(result.GetProperty("sentSharesCount").ToString()); + Console.WriteLine(result.GetProperty("storeKind").ToString()); + Console.WriteLine(result.GetProperty("storeReference").GetProperty("referenceName").ToString()); + Console.WriteLine(result.GetProperty("storeReference").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Workflows/src/Generated/Docs/PurviewWorkflowServiceClient.xml b/sdk/purview/Azure.Analytics.Purview.Workflows/src/Generated/Docs/PurviewWorkflowServiceClient.xml index 1429f18bc598f..0cc917f9e5375 100644 --- a/sdk/purview/Azure.Analytics.Purview.Workflows/src/Generated/Docs/PurviewWorkflowServiceClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Workflows/src/Generated/Docs/PurviewWorkflowServiceClient.xml @@ -95,7 +95,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new { - triggers = new List() + triggers = new object[] { new { @@ -124,7 +124,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new { - triggers = new List() + triggers = new object[] { new { @@ -167,7 +167,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new { - triggers = new List() + triggers = new object[] { new { @@ -196,7 +196,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new { - triggers = new List() + triggers = new object[] { new { @@ -238,6 +238,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); Response response = await client.DeleteWorkflowAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteWorkflowAsync with all parameters. @@ -247,6 +248,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); Response response = await client.DeleteWorkflowAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Console.WriteLine(response.Status); ]]> @@ -259,6 +261,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); Response response = client.DeleteWorkflow(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteWorkflow with all parameters. @@ -268,6 +271,7 @@ TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); Response response = client.DeleteWorkflow(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Console.WriteLine(response.Status); ]]> @@ -281,7 +285,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new { - operations = new List() + operations = new object[] { new { @@ -307,7 +311,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new { - operations = new List() + operations = new object[] { new { @@ -339,7 +343,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new { - operations = new List() + operations = new object[] { new { @@ -365,7 +369,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new { - operations = new List() + operations = new object[] { new { @@ -479,6 +483,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new object()); Response response = await client.CancelWorkflowRunAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> This sample shows how to call CancelWorkflowRunAsync with all parameters and request content. @@ -492,6 +497,7 @@ RequestContent content = RequestContent.Create(new comment = "", }); Response response = await client.CancelWorkflowRunAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> @@ -505,6 +511,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new object()); Response response = client.CancelWorkflowRun(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> This sample shows how to call CancelWorkflowRun with all parameters and request content. @@ -518,6 +525,7 @@ RequestContent content = RequestContent.Create(new comment = "", }); Response response = client.CancelWorkflowRun(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> @@ -633,6 +641,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new object()); Response response = await client.ApproveApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> This sample shows how to call ApproveApprovalTaskAsync with all parameters and request content. @@ -646,6 +655,7 @@ RequestContent content = RequestContent.Create(new comment = "", }); Response response = await client.ApproveApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> @@ -659,6 +669,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new object()); Response response = client.ApproveApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> This sample shows how to call ApproveApprovalTask with all parameters and request content. @@ -672,6 +683,7 @@ RequestContent content = RequestContent.Create(new comment = "", }); Response response = client.ApproveApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> @@ -685,6 +697,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new object()); Response response = await client.RejectApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> This sample shows how to call RejectApprovalTaskAsync with all parameters and request content. @@ -698,6 +711,7 @@ RequestContent content = RequestContent.Create(new comment = "", }); Response response = await client.RejectApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> @@ -711,6 +725,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new object()); Response response = client.RejectApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> This sample shows how to call RejectApprovalTask with all parameters and request content. @@ -724,6 +739,7 @@ RequestContent content = RequestContent.Create(new comment = "", }); Response response = client.RejectApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> @@ -737,6 +753,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new object()); Response response = await client.ReassignWorkflowTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> This sample shows how to call ReassignWorkflowTaskAsync with all parameters and request content. @@ -747,7 +764,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new { - reassignments = new List() + reassignments = new object[] { new { @@ -757,6 +774,7 @@ RequestContent content = RequestContent.Create(new }, }); Response response = await client.ReassignWorkflowTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> @@ -770,6 +788,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new object()); Response response = client.ReassignWorkflowTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> This sample shows how to call ReassignWorkflowTask with all parameters and request content. @@ -780,7 +799,7 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, RequestContent content = RequestContent.Create(new { - reassignments = new List() + reassignments = new object[] { new { @@ -790,6 +809,7 @@ RequestContent content = RequestContent.Create(new }, }); Response response = client.ReassignWorkflowTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> @@ -806,6 +826,7 @@ RequestContent content = RequestContent.Create(new newStatus = "NotStarted", }); Response response = await client.UpdateTaskStatusAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateTaskStatusAsync with all parameters and request content. @@ -820,6 +841,7 @@ RequestContent content = RequestContent.Create(new comment = "", }); Response response = await client.UpdateTaskStatusAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> @@ -836,6 +858,7 @@ RequestContent content = RequestContent.Create(new newStatus = "NotStarted", }); Response response = client.UpdateTaskStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateTaskStatus with all parameters and request content. @@ -850,6 +873,7 @@ RequestContent content = RequestContent.Create(new comment = "", }); Response response = client.UpdateTaskStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); ]]> @@ -864,11 +888,11 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, await foreach (BinaryData item in client.GetWorkflowsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("isEnabled").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("isEnabled").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } ]]> This sample shows how to call GetWorkflowsAsync with all parameters and parse the result. @@ -880,18 +904,18 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, await foreach (BinaryData item in client.GetWorkflowsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underGlossaryHierarchy").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underCollection").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underGlossary").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("isEnabled").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossaryHierarchy").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underCollection").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossary").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("isEnabled").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } ]]> @@ -906,11 +930,11 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, foreach (BinaryData item in client.GetWorkflows(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("isEnabled").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("isEnabled").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } ]]> This sample shows how to call GetWorkflows with all parameters and parse the result. @@ -922,18 +946,18 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, foreach (BinaryData item in client.GetWorkflows(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underGlossaryHierarchy").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underCollection").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underGlossary").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("isEnabled").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossaryHierarchy").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underCollection").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossary").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("isEnabled").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } ]]> @@ -948,13 +972,13 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, await foreach (BinaryData item in client.GetWorkflowRunsAsync(null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } ]]> This sample shows how to call GetWorkflowRunsAsync with all parameters and parse the result. @@ -963,26 +987,20 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -await foreach (BinaryData item in client.GetWorkflowRunsAsync("1d", "status desc", new List() -{ - "InProgress" -}, new List() -{ - "" -}, 1234, null)) +await foreach (BinaryData item in client.GetWorkflowRunsAsync("1d", "status desc", new string[] { "InProgress" }, new string[] { "" }, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("userRequestId").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("cancelTime").ToString()); - Console.WriteLine(result[0].GetProperty("cancelComment").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("userRequestId").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("cancelTime").ToString()); + Console.WriteLine(result.GetProperty("cancelComment").ToString()); } ]]> @@ -997,13 +1015,13 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, foreach (BinaryData item in client.GetWorkflowRuns(null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } ]]> This sample shows how to call GetWorkflowRuns with all parameters and parse the result. @@ -1012,26 +1030,20 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -foreach (BinaryData item in client.GetWorkflowRuns("1d", "status desc", new List() -{ - "InProgress" -}, new List() -{ - "" -}, 1234, null)) +foreach (BinaryData item in client.GetWorkflowRuns("1d", "status desc", new string[] { "InProgress" }, new string[] { "" }, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("userRequestId").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("cancelTime").ToString()); - Console.WriteLine(result[0].GetProperty("cancelComment").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("userRequestId").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("cancelTime").ToString()); + Console.WriteLine(result.GetProperty("cancelComment").ToString()); } ]]> @@ -1046,15 +1058,15 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, await foreach (BinaryData item in client.GetWorkflowTasksAsync(null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowRunId").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowRunId").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("targetValue").ToString()); } ]]> This sample shows how to call GetWorkflowTasksAsync with all parameters and parse the result. @@ -1063,37 +1075,28 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -await foreach (BinaryData item in client.GetWorkflowTasksAsync("", new List() -{ - "" -}, "1d", 1234, "status desc", new List() -{ - "Approval" -}, new List() -{ - "InProgress" -}, "", null)) +await foreach (BinaryData item in client.GetWorkflowTasksAsync("", new string[] { "" }, "1d", 1234, "status desc", new string[] { "Approval" }, new string[] { "InProgress" }, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("title").ToString()); - Console.WriteLine(result[0].GetProperty("workflowRunId").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("payload").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("lastRemindTime").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("nextRemindTime").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("reminderSettings").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("lastExpiryNotificationTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("nextExpiryNotificationTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expiryTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("expireAfter").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("notifyOnExpiration")[0].ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("title").ToString()); + Console.WriteLine(result.GetProperty("workflowRunId").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("payload").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("lastRemindTime").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("nextRemindTime").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("reminderSettings").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("lastExpiryNotificationTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("nextExpiryNotificationTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expiryTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("expireAfter").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("notifyOnExpiration")[0].ToString()); } ]]> @@ -1108,15 +1111,15 @@ PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, foreach (BinaryData item in client.GetWorkflowTasks(null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowRunId").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowRunId").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("targetValue").ToString()); } ]]> This sample shows how to call GetWorkflowTasks with all parameters and parse the result. @@ -1125,37 +1128,28 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -foreach (BinaryData item in client.GetWorkflowTasks("", new List() -{ - "" -}, "1d", 1234, "status desc", new List() -{ - "Approval" -}, new List() -{ - "InProgress" -}, "", null)) +foreach (BinaryData item in client.GetWorkflowTasks("", new string[] { "" }, "1d", 1234, "status desc", new string[] { "Approval" }, new string[] { "InProgress" }, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("title").ToString()); - Console.WriteLine(result[0].GetProperty("workflowRunId").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("payload").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("lastRemindTime").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("nextRemindTime").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("reminderSettings").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("lastExpiryNotificationTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("nextExpiryNotificationTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expiryTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("expireAfter").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("notifyOnExpiration")[0].ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("title").ToString()); + Console.WriteLine(result.GetProperty("workflowRunId").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("payload").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("lastRemindTime").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("nextRemindTime").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("reminderSettings").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("lastExpiryNotificationTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("nextExpiryNotificationTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expiryTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("expireAfter").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("notifyOnExpiration")[0].ToString()); } ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.Workflows/tests/Generated/Samples/Samples_PurviewWorkflowServiceClient.cs b/sdk/purview/Azure.Analytics.Purview.Workflows/tests/Generated/Samples/Samples_PurviewWorkflowServiceClient.cs index 9faca557351b3..0572c91d33e6f 100644 --- a/sdk/purview/Azure.Analytics.Purview.Workflows/tests/Generated/Samples/Samples_PurviewWorkflowServiceClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Workflows/tests/Generated/Samples/Samples_PurviewWorkflowServiceClient.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Analytics.Purview.Workflows.Samples { - public class Samples_PurviewWorkflowServiceClient + public partial class Samples_PurviewWorkflowServiceClient { [Test] [Ignore("Only validating compilation of examples")] @@ -119,13 +118,13 @@ public void Example_CreateOrReplaceWorkflow_ShortVersion() RequestContent content = RequestContent.Create(new { - triggers = new List() -{ + triggers = new object[] + { new { type = "when_term_creation_is_requested", } -}, + }, name = "", isEnabled = true, description = "", @@ -151,13 +150,13 @@ public async Task Example_CreateOrReplaceWorkflow_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - triggers = new List() -{ + triggers = new object[] + { new { type = "when_term_creation_is_requested", } -}, + }, name = "", isEnabled = true, description = "", @@ -183,8 +182,8 @@ public void Example_CreateOrReplaceWorkflow_AllParameters() RequestContent content = RequestContent.Create(new { - triggers = new List() -{ + triggers = new object[] + { new { type = "when_term_creation_is_requested", @@ -192,7 +191,7 @@ public void Example_CreateOrReplaceWorkflow_AllParameters() underCollection = "", underGlossary = "", } -}, + }, name = "", isEnabled = true, description = "", @@ -226,8 +225,8 @@ public async Task Example_CreateOrReplaceWorkflow_AllParameters_Async() RequestContent content = RequestContent.Create(new { - triggers = new List() -{ + triggers = new object[] + { new { type = "when_term_creation_is_requested", @@ -235,7 +234,7 @@ public async Task Example_CreateOrReplaceWorkflow_AllParameters_Async() underCollection = "", underGlossary = "", } -}, + }, name = "", isEnabled = true, description = "", @@ -268,6 +267,7 @@ public void Example_DeleteWorkflow_ShortVersion() PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); Response response = client.DeleteWorkflow(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Console.WriteLine(response.Status); } @@ -280,6 +280,7 @@ public async Task Example_DeleteWorkflow_ShortVersion_Async() PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); Response response = await client.DeleteWorkflowAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Console.WriteLine(response.Status); } @@ -292,6 +293,7 @@ public void Example_DeleteWorkflow_AllParameters() PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); Response response = client.DeleteWorkflow(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Console.WriteLine(response.Status); } @@ -304,6 +306,7 @@ public async Task Example_DeleteWorkflow_AllParameters_Async() PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); Response response = await client.DeleteWorkflowAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Console.WriteLine(response.Status); } @@ -317,14 +320,14 @@ public void Example_SubmitUserRequests_ShortVersion() RequestContent content = RequestContent.Create(new { - operations = new List() -{ + operations = new object[] + { new { type = "CreateTerm", payload = new object(), } -}, + }, }); Response response = client.SubmitUserRequests(content); @@ -346,14 +349,14 @@ public async Task Example_SubmitUserRequests_ShortVersion_Async() RequestContent content = RequestContent.Create(new { - operations = new List() -{ + operations = new object[] + { new { type = "CreateTerm", payload = new object(), } -}, + }, }); Response response = await client.SubmitUserRequestsAsync(content); @@ -375,14 +378,14 @@ public void Example_SubmitUserRequests_AllParameters() RequestContent content = RequestContent.Create(new { - operations = new List() -{ + operations = new object[] + { new { type = "CreateTerm", payload = new object(), } -}, + }, comment = "", }); Response response = client.SubmitUserRequests(content); @@ -407,14 +410,14 @@ public async Task Example_SubmitUserRequests_AllParameters_Async() RequestContent content = RequestContent.Create(new { - operations = new List() -{ + operations = new object[] + { new { type = "CreateTerm", payload = new object(), } -}, + }, comment = "", }); Response response = await client.SubmitUserRequestsAsync(content); @@ -527,6 +530,7 @@ public void Example_CancelWorkflowRun_ShortVersion() RequestContent content = RequestContent.Create(new object()); Response response = client.CancelWorkflowRun(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -540,6 +544,7 @@ public async Task Example_CancelWorkflowRun_ShortVersion_Async() RequestContent content = RequestContent.Create(new object()); Response response = await client.CancelWorkflowRunAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -556,6 +561,7 @@ public void Example_CancelWorkflowRun_AllParameters() comment = "", }); Response response = client.CancelWorkflowRun(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -572,6 +578,7 @@ public async Task Example_CancelWorkflowRun_AllParameters_Async() comment = "", }); Response response = await client.CancelWorkflowRunAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -693,6 +700,7 @@ public void Example_ApproveApprovalTask_ShortVersion() RequestContent content = RequestContent.Create(new object()); Response response = client.ApproveApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -706,6 +714,7 @@ public async Task Example_ApproveApprovalTask_ShortVersion_Async() RequestContent content = RequestContent.Create(new object()); Response response = await client.ApproveApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -722,6 +731,7 @@ public void Example_ApproveApprovalTask_AllParameters() comment = "", }); Response response = client.ApproveApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -738,6 +748,7 @@ public async Task Example_ApproveApprovalTask_AllParameters_Async() comment = "", }); Response response = await client.ApproveApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -751,6 +762,7 @@ public void Example_RejectApprovalTask_ShortVersion() RequestContent content = RequestContent.Create(new object()); Response response = client.RejectApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -764,6 +776,7 @@ public async Task Example_RejectApprovalTask_ShortVersion_Async() RequestContent content = RequestContent.Create(new object()); Response response = await client.RejectApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -780,6 +793,7 @@ public void Example_RejectApprovalTask_AllParameters() comment = "", }); Response response = client.RejectApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -796,6 +810,7 @@ public async Task Example_RejectApprovalTask_AllParameters_Async() comment = "", }); Response response = await client.RejectApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -809,6 +824,7 @@ public void Example_ReassignWorkflowTask_ShortVersion() RequestContent content = RequestContent.Create(new object()); Response response = client.ReassignWorkflowTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -822,6 +838,7 @@ public async Task Example_ReassignWorkflowTask_ShortVersion_Async() RequestContent content = RequestContent.Create(new object()); Response response = await client.ReassignWorkflowTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -835,16 +852,17 @@ public void Example_ReassignWorkflowTask_AllParameters() RequestContent content = RequestContent.Create(new { - reassignments = new List() -{ + reassignments = new object[] + { new { reassignFrom = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", reassignTo = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", } -}, + }, }); Response response = client.ReassignWorkflowTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -858,16 +876,17 @@ public async Task Example_ReassignWorkflowTask_AllParameters_Async() RequestContent content = RequestContent.Create(new { - reassignments = new List() -{ + reassignments = new object[] + { new { reassignFrom = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", reassignTo = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", } -}, + }, }); Response response = await client.ReassignWorkflowTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -884,6 +903,7 @@ public void Example_UpdateTaskStatus_ShortVersion() newStatus = "NotStarted", }); Response response = client.UpdateTaskStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -900,6 +920,7 @@ public async Task Example_UpdateTaskStatus_ShortVersion_Async() newStatus = "NotStarted", }); Response response = await client.UpdateTaskStatusAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -917,6 +938,7 @@ public void Example_UpdateTaskStatus_AllParameters() comment = "", }); Response response = client.UpdateTaskStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -934,6 +956,7 @@ public async Task Example_UpdateTaskStatus_AllParameters_Async() comment = "", }); Response response = await client.UpdateTaskStatusAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + Console.WriteLine(response.Status); } @@ -948,11 +971,11 @@ public void Example_GetWorkflows_ShortVersion() foreach (BinaryData item in client.GetWorkflows(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("isEnabled").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("isEnabled").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } } @@ -967,11 +990,11 @@ public async Task Example_GetWorkflows_ShortVersion_Async() await foreach (BinaryData item in client.GetWorkflowsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("isEnabled").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("isEnabled").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } } @@ -986,18 +1009,18 @@ public void Example_GetWorkflows_AllParameters() foreach (BinaryData item in client.GetWorkflows(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underGlossaryHierarchy").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underCollection").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underGlossary").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("isEnabled").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossaryHierarchy").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underCollection").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossary").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("isEnabled").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } } @@ -1012,18 +1035,18 @@ public async Task Example_GetWorkflows_AllParameters_Async() await foreach (BinaryData item in client.GetWorkflowsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underGlossaryHierarchy").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underCollection").ToString()); - Console.WriteLine(result[0].GetProperty("triggers")[0].GetProperty("underGlossary").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); - Console.WriteLine(result[0].GetProperty("name").ToString()); - Console.WriteLine(result[0].GetProperty("isEnabled").ToString()); - Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossaryHierarchy").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underCollection").ToString()); + Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossary").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("isEnabled").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } } @@ -1038,13 +1061,13 @@ public void Example_GetWorkflowRuns_ShortVersion() foreach (BinaryData item in client.GetWorkflowRuns(null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } } @@ -1059,13 +1082,13 @@ public async Task Example_GetWorkflowRuns_ShortVersion_Async() await foreach (BinaryData item in client.GetWorkflowRunsAsync(null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); } } @@ -1077,26 +1100,20 @@ public void Example_GetWorkflowRuns_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - foreach (BinaryData item in client.GetWorkflowRuns("1d", "status desc", new List() -{ -"InProgress" -}, new List() -{ -"" -}, 1234, null)) + foreach (BinaryData item in client.GetWorkflowRuns("1d", "status desc", new string[] { "InProgress" }, new string[] { "" }, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("userRequestId").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("cancelTime").ToString()); - Console.WriteLine(result[0].GetProperty("cancelComment").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("userRequestId").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("cancelTime").ToString()); + Console.WriteLine(result.GetProperty("cancelComment").ToString()); } } @@ -1108,26 +1125,20 @@ public async Task Example_GetWorkflowRuns_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - await foreach (BinaryData item in client.GetWorkflowRunsAsync("1d", "status desc", new List() -{ -"InProgress" -}, new List() -{ -"" -}, 1234, null)) + await foreach (BinaryData item in client.GetWorkflowRunsAsync("1d", "status desc", new string[] { "InProgress" }, new string[] { "" }, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("startTime").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("userRequestId").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("runPayload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("status").ToString()); - Console.WriteLine(result[0].GetProperty("endTime").ToString()); - Console.WriteLine(result[0].GetProperty("cancelTime").ToString()); - Console.WriteLine(result[0].GetProperty("cancelComment").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("userRequestId").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("runPayload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("cancelTime").ToString()); + Console.WriteLine(result.GetProperty("cancelComment").ToString()); } } @@ -1142,15 +1153,15 @@ public void Example_GetWorkflowTasks_ShortVersion() foreach (BinaryData item in client.GetWorkflowTasks(null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowRunId").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowRunId").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("targetValue").ToString()); } } @@ -1165,15 +1176,15 @@ public async Task Example_GetWorkflowTasks_ShortVersion_Async() await foreach (BinaryData item in client.GetWorkflowTasksAsync(null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("workflowRunId").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("workflowRunId").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("targetValue").ToString()); } } @@ -1185,37 +1196,28 @@ public void Example_GetWorkflowTasks_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - foreach (BinaryData item in client.GetWorkflowTasks("", new List() -{ -"" -}, "1d", 1234, "status desc", new List() -{ -"Approval" -}, new List() -{ -"InProgress" -}, "", null)) + foreach (BinaryData item in client.GetWorkflowTasks("", new string[] { "" }, "1d", 1234, "status desc", new string[] { "Approval" }, new string[] { "InProgress" }, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("title").ToString()); - Console.WriteLine(result[0].GetProperty("workflowRunId").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("payload").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("lastRemindTime").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("nextRemindTime").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("reminderSettings").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("lastExpiryNotificationTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("nextExpiryNotificationTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expiryTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("expireAfter").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("notifyOnExpiration")[0].ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("title").ToString()); + Console.WriteLine(result.GetProperty("workflowRunId").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("payload").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("lastRemindTime").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("nextRemindTime").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("reminderSettings").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("lastExpiryNotificationTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("nextExpiryNotificationTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expiryTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("expireAfter").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("notifyOnExpiration")[0].ToString()); } } @@ -1227,37 +1229,28 @@ public async Task Example_GetWorkflowTasks_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - await foreach (BinaryData item in client.GetWorkflowTasksAsync("", new List() -{ -"" -}, "1d", 1234, "status desc", new List() -{ -"Approval" -}, new List() -{ -"InProgress" -}, "", null)) + await foreach (BinaryData item in client.GetWorkflowTasksAsync("", new string[] { "" }, "1d", 1234, "status desc", new string[] { "Approval" }, new string[] { "InProgress" }, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result[0].GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("title").ToString()); - Console.WriteLine(result[0].GetProperty("workflowRunId").ToString()); - Console.WriteLine(result[0].GetProperty("workflowId").ToString()); - Console.WriteLine(result[0].GetProperty("requestor").ToString()); - Console.WriteLine(result[0].GetProperty("createdTime").ToString()); - Console.WriteLine(result[0].GetProperty("lastUpdateTime").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("type").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("targetValue").ToString()); - Console.WriteLine(result[0].GetProperty("payload").GetProperty("payload").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("lastRemindTime").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("nextRemindTime").ToString()); - Console.WriteLine(result[0].GetProperty("reminderInfo").GetProperty("reminderSettings").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("lastExpiryNotificationTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("nextExpiryNotificationTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expiryTime").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("expireAfter").ToString()); - Console.WriteLine(result[0].GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("notifyOnExpiration")[0].ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("title").ToString()); + Console.WriteLine(result.GetProperty("workflowRunId").ToString()); + Console.WriteLine(result.GetProperty("workflowId").ToString()); + Console.WriteLine(result.GetProperty("requestor").ToString()); + Console.WriteLine(result.GetProperty("createdTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("targetValue").ToString()); + Console.WriteLine(result.GetProperty("payload").GetProperty("payload").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("lastRemindTime").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("nextRemindTime").ToString()); + Console.WriteLine(result.GetProperty("reminderInfo").GetProperty("reminderSettings").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("lastExpiryNotificationTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("nextExpiryNotificationTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expiryTime").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("expireAfter").ToString()); + Console.WriteLine(result.GetProperty("expiryInfo").GetProperty("expirySettings").GetProperty("notifyOnExpiration")[0].ToString()); } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Docs/RoleAssignmentsClient.xml b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Docs/RoleAssignmentsClient.xml index acd53a6bc4d0d..47435c6698806 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Docs/RoleAssignmentsClient.xml +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Docs/RoleAssignmentsClient.xml @@ -15,7 +15,7 @@ RequestContent content = RequestContent.Create(new { principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }, - actions = new List() + actions = new object[] { new { @@ -41,12 +41,12 @@ RequestContent content = RequestContent.Create(new subject = new { principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - groupIds = new List() + groupIds = new object[] { "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" }, }, - actions = new List() + actions = new object[] { new { @@ -82,7 +82,7 @@ RequestContent content = RequestContent.Create(new { principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }, - actions = new List() + actions = new object[] { new { @@ -108,12 +108,12 @@ RequestContent content = RequestContent.Create(new subject = new { principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - groupIds = new List() + groupIds = new object[] { "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" }, }, - actions = new List() + actions = new object[] { new { @@ -346,6 +346,7 @@ TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); Response response = await client.DeleteRoleAssignmentByIdAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteRoleAssignmentByIdAsync with all parameters. @@ -355,6 +356,7 @@ TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); Response response = await client.DeleteRoleAssignmentByIdAsync("", scope: ""); + Console.WriteLine(response.Status); ]]> @@ -367,6 +369,7 @@ TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); Response response = client.DeleteRoleAssignmentById(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteRoleAssignmentById with all parameters. @@ -376,6 +379,7 @@ TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); Response response = client.DeleteRoleAssignmentById("", scope: ""); + Console.WriteLine(response.Status); ]]> diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Generated/Samples/Samples_RoleAssignmentsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Generated/Samples/Samples_RoleAssignmentsClient.cs index 1da768eb0637a..ecc5065fd2878 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Generated/Samples/Samples_RoleAssignmentsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Generated/Samples/Samples_RoleAssignmentsClient.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Analytics.Synapse.AccessControl.Samples { - public class Samples_RoleAssignmentsClient + public partial class Samples_RoleAssignmentsClient { [Test] [Ignore("Only validating compilation of examples")] @@ -33,14 +32,14 @@ public void Example_CheckPrincipalAccess_ShortVersion() { principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }, - actions = new List() -{ + actions = new object[] + { new { id = "", isDataAction = true, } -}, + }, scope = "", }); Response response = client.CheckPrincipalAccess(content, new ContentType("application/json")); @@ -63,14 +62,14 @@ public async Task Example_CheckPrincipalAccess_ShortVersion_Async() { principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }, - actions = new List() -{ + actions = new object[] + { new { id = "", isDataAction = true, } -}, + }, scope = "", }); Response response = await client.CheckPrincipalAccessAsync(content, new ContentType("application/json")); @@ -92,19 +91,19 @@ public void Example_CheckPrincipalAccess_AllParameters() subject = new { principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - groupIds = new List() -{ + groupIds = new object[] + { "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" -}, + }, }, - actions = new List() -{ + actions = new object[] + { new { id = "", isDataAction = true, } -}, + }, scope = "", }); Response response = client.CheckPrincipalAccess(content, new ContentType("application/json")); @@ -132,19 +131,19 @@ public async Task Example_CheckPrincipalAccess_AllParameters_Async() subject = new { principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - groupIds = new List() -{ + groupIds = new object[] + { "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a" -}, + }, }, - actions = new List() -{ + actions = new object[] + { new { id = "", isDataAction = true, } -}, + }, scope = "", }); Response response = await client.CheckPrincipalAccessAsync(content, new ContentType("application/json")); @@ -388,6 +387,7 @@ public void Example_DeleteRoleAssignmentById_ShortVersion() RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); Response response = client.DeleteRoleAssignmentById(""); + Console.WriteLine(response.Status); } @@ -400,6 +400,7 @@ public async Task Example_DeleteRoleAssignmentById_ShortVersion_Async() RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); Response response = await client.DeleteRoleAssignmentByIdAsync(""); + Console.WriteLine(response.Status); } @@ -412,6 +413,7 @@ public void Example_DeleteRoleAssignmentById_AllParameters() RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); Response response = client.DeleteRoleAssignmentById("", scope: ""); + Console.WriteLine(response.Status); } @@ -424,6 +426,7 @@ public async Task Example_DeleteRoleAssignmentById_AllParameters_Async() RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); Response response = await client.DeleteRoleAssignmentByIdAsync("", scope: ""); + Console.WriteLine(response.Status); } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Generated/Samples/Samples_RoleDefinitionsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Generated/Samples/Samples_RoleDefinitionsClient.cs index 91c007ea41ad4..a151ffcfd3741 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Generated/Samples/Samples_RoleDefinitionsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Generated/Samples/Samples_RoleDefinitionsClient.cs @@ -16,7 +16,7 @@ namespace Azure.Analytics.Synapse.AccessControl.Samples { - public class Samples_RoleDefinitionsClient + public partial class Samples_RoleDefinitionsClient { [Test] [Ignore("Only validating compilation of examples")] diff --git a/sdk/template/Azure.Template/tests/Generated/Samples/Samples_TemplateClient.cs b/sdk/template/Azure.Template/tests/Generated/Samples/Samples_TemplateClient.cs index cd528d73eac1d..4c24d2bb34bb8 100644 --- a/sdk/template/Azure.Template/tests/Generated/Samples/Samples_TemplateClient.cs +++ b/sdk/template/Azure.Template/tests/Generated/Samples/Samples_TemplateClient.cs @@ -16,7 +16,7 @@ namespace Azure.Template.Samples { - public class Samples_TemplateClient + public partial class Samples_TemplateClient { [Test] [Ignore("Only validating compilation of examples")] diff --git a/sdk/translation/Azure.AI.Translation.Text/src/Generated/Docs/TextTranslationClient.xml b/sdk/translation/Azure.AI.Translation.Text/src/Generated/Docs/TextTranslationClient.xml deleted file mode 100644 index 269a37364f339..0000000000000 --- a/sdk/translation/Azure.AI.Translation.Text/src/Generated/Docs/TextTranslationClient.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sdk/translation/Azure.AI.Translation.Text/src/Generated/TextTranslationClient.cs b/sdk/translation/Azure.AI.Translation.Text/src/Generated/TextTranslationClient.cs index 474472bd85c3d..a2515ac448872 100644 --- a/sdk/translation/Azure.AI.Translation.Text/src/Generated/TextTranslationClient.cs +++ b/sdk/translation/Azure.AI.Translation.Text/src/Generated/TextTranslationClient.cs @@ -75,7 +75,6 @@ protected TextTranslationClient() /// If the resource has not been modified, the service will return status code 304 and an empty response body. /// /// The cancellation token to use. - /// public virtual async Task> GetLanguagesAsync(string clientTraceId = null, string scope = null, string acceptLanguage = null, ETag? ifNoneMatch = null, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -105,7 +104,6 @@ public virtual async Task> GetLanguagesAsync(string /// If the resource has not been modified, the service will return status code 304 and an empty response body. /// /// The cancellation token to use. - /// public virtual Response GetLanguages(string clientTraceId = null, string scope = null, string acceptLanguage = null, ETag? ifNoneMatch = null, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -151,7 +149,6 @@ public virtual Response GetLanguages(string clientTraceId = /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task GetLanguagesAsync(string clientTraceId, string scope, string acceptLanguage, ETag? ifNoneMatch, RequestContext context) { using var scope0 = ClientDiagnostics.CreateScope("TextTranslationClient.GetLanguages"); @@ -206,7 +203,6 @@ public virtual async Task GetLanguagesAsync(string clientTraceId, stri /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response GetLanguages(string clientTraceId, string scope, string acceptLanguage, ETag? ifNoneMatch, RequestContext context) { using var scope0 = ClientDiagnostics.CreateScope("TextTranslationClient.GetLanguages"); diff --git a/sdk/translation/Azure.AI.Translation.Text/tests/Generated/Samples/Samples_TextTranslationClient.cs b/sdk/translation/Azure.AI.Translation.Text/tests/Generated/Samples/Samples_TextTranslationClient.cs deleted file mode 100644 index 597827a76267c..0000000000000 --- a/sdk/translation/Azure.AI.Translation.Text/tests/Generated/Samples/Samples_TextTranslationClient.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Identity; - -namespace Azure.AI.Translation.Text.Samples -{ - public class Samples_TextTranslationClient - { - } -} diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/Docs/HealthApiClient.xml b/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/Docs/HealthApiClient.xml index a043accb8f248..79fa9cf413a17 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/Docs/HealthApiClient.xml +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/Docs/HealthApiClient.xml @@ -8,6 +8,7 @@ This sample shows how to call GetServiceStatusAsync. HealthApiClient client = new HealthApiClient(""); Response response = await client.GetServiceStatusAsync(); + Console.WriteLine(response.Status); ]]> This sample shows how to call GetServiceStatusAsync with all request content. @@ -15,6 +16,7 @@ This sample shows how to call GetServiceStatusAsync with all request content. HealthApiClient client = new HealthApiClient(""); Response response = await client.GetServiceStatusAsync(); + Console.WriteLine(response.Status); ]]> @@ -25,6 +27,7 @@ This sample shows how to call GetServiceStatus. HealthApiClient client = new HealthApiClient(""); Response response = client.GetServiceStatus(); + Console.WriteLine(response.Status); ]]> This sample shows how to call GetServiceStatus with all request content. @@ -32,6 +35,7 @@ This sample shows how to call GetServiceStatus with all request content. HealthApiClient client = new HealthApiClient(""); Response response = client.GetServiceStatus(); + Console.WriteLine(response.Status); ]]> diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/Docs/WebPubSubServiceClient.xml b/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/Docs/WebPubSubServiceClient.xml index f23ee123e29a4..c928a57924733 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/Docs/WebPubSubServiceClient.xml +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/Docs/WebPubSubServiceClient.xml @@ -8,16 +8,15 @@ This sample shows how to call CloseAllConnectionsAsync. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.CloseAllConnectionsAsync(); + Console.WriteLine(response.Status); ]]> This sample shows how to call CloseAllConnectionsAsync with all parameters. ", ""); -Response response = await client.CloseAllConnectionsAsync(excluded: new List() -{ - "" -}, reason: ""); +Response response = await client.CloseAllConnectionsAsync(excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); ]]> @@ -28,21 +27,18 @@ This sample shows how to call CloseAllConnections. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.CloseAllConnections(); + Console.WriteLine(response.Status); ]]> This sample shows how to call CloseAllConnections with all parameters. ", ""); -Response response = client.CloseAllConnections(excluded: new List() -{ - "" -}, reason: ""); +Response response = client.CloseAllConnections(excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); ]]> - - This sample shows how to call SendToAllAsync. @@ -51,6 +47,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToAllAsync(content, new ContentType("application/json")); + Console.WriteLine(response.Status); ]]> This sample shows how to call SendToAllAsync with all parameters and request content. @@ -58,10 +55,8 @@ This sample shows how to call SendToAllAsync with all parameters and request con WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); RequestContent content = RequestContent.Create(File.OpenRead("")); -Response response = await client.SendToAllAsync(content, new ContentType("application/json"), excluded: new List() -{ - "" -}, filter: ""); +Response response = await client.SendToAllAsync(content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); + Console.WriteLine(response.Status); ]]> @@ -73,6 +68,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToAll(content, new ContentType("application/json")); + Console.WriteLine(response.Status); ]]> This sample shows how to call SendToAll with all parameters and request content. @@ -80,10 +76,8 @@ This sample shows how to call SendToAll with all parameters and request content. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); RequestContent content = RequestContent.Create(File.OpenRead("")); -Response response = client.SendToAll(content, new ContentType("application/json"), excluded: new List() -{ - "" -}, filter: ""); +Response response = client.SendToAll(content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); + Console.WriteLine(response.Status); ]]> @@ -94,6 +88,7 @@ This sample shows how to call CloseConnectionAsync. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.CloseConnectionAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call CloseConnectionAsync with all parameters. @@ -101,6 +96,7 @@ This sample shows how to call CloseConnectionAsync with all parameters. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.CloseConnectionAsync("", reason: ""); + Console.WriteLine(response.Status); ]]> @@ -111,6 +107,7 @@ This sample shows how to call CloseConnection. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.CloseConnection(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call CloseConnection with all parameters. @@ -118,11 +115,10 @@ This sample shows how to call CloseConnection with all parameters. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.CloseConnection("", reason: ""); + Console.WriteLine(response.Status); ]]> - - This sample shows how to call SendToConnectionAsync. @@ -131,6 +127,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToConnectionAsync("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); ]]> This sample shows how to call SendToConnectionAsync with all parameters and request content. @@ -139,6 +136,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToConnectionAsync("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); ]]> @@ -150,6 +148,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToConnection("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); ]]> This sample shows how to call SendToConnection with all parameters and request content. @@ -158,6 +157,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToConnection("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); ]]> @@ -168,6 +168,7 @@ This sample shows how to call RemoveConnectionFromAllGroupsAsync. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveConnectionFromAllGroupsAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call RemoveConnectionFromAllGroupsAsync with all parameters. @@ -175,6 +176,7 @@ This sample shows how to call RemoveConnectionFromAllGroupsAsync with all parame WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveConnectionFromAllGroupsAsync(""); + Console.WriteLine(response.Status); ]]> @@ -185,6 +187,7 @@ This sample shows how to call RemoveConnectionFromAllGroups. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveConnectionFromAllGroups(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call RemoveConnectionFromAllGroups with all parameters. @@ -192,11 +195,10 @@ This sample shows how to call RemoveConnectionFromAllGroups with all parameters. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveConnectionFromAllGroups(""); + Console.WriteLine(response.Status); ]]> - - This sample shows how to call CloseGroupConnectionsAsync. @@ -204,16 +206,15 @@ This sample shows how to call CloseGroupConnectionsAsync. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.CloseGroupConnectionsAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call CloseGroupConnectionsAsync with all parameters. ", ""); -Response response = await client.CloseGroupConnectionsAsync("", excluded: new List() -{ - "" -}, reason: ""); +Response response = await client.CloseGroupConnectionsAsync("", excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); ]]> @@ -224,16 +225,15 @@ This sample shows how to call CloseGroupConnections. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.CloseGroupConnections(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call CloseGroupConnections with all parameters. ", ""); -Response response = client.CloseGroupConnections("", excluded: new List() -{ - "" -}, reason: ""); +Response response = client.CloseGroupConnections("", excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); ]]> @@ -245,6 +245,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToGroupAsync("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); ]]> This sample shows how to call SendToGroupAsync with all parameters and request content. @@ -252,10 +253,8 @@ This sample shows how to call SendToGroupAsync with all parameters and request c WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); RequestContent content = RequestContent.Create(File.OpenRead("")); -Response response = await client.SendToGroupAsync("", content, new ContentType("application/json"), excluded: new List() -{ - "" -}, filter: ""); +Response response = await client.SendToGroupAsync("", content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); + Console.WriteLine(response.Status); ]]> @@ -267,6 +266,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToGroup("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); ]]> This sample shows how to call SendToGroup with all parameters and request content. @@ -274,10 +274,8 @@ This sample shows how to call SendToGroup with all parameters and request conten WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); RequestContent content = RequestContent.Create(File.OpenRead("")); -Response response = client.SendToGroup("", content, new ContentType("application/json"), excluded: new List() -{ - "" -}, filter: ""); +Response response = client.SendToGroup("", content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); + Console.WriteLine(response.Status); ]]> @@ -288,6 +286,7 @@ This sample shows how to call RemoveConnectionFromGroupAsync. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveConnectionFromGroupAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call RemoveConnectionFromGroupAsync with all parameters. @@ -295,6 +294,7 @@ This sample shows how to call RemoveConnectionFromGroupAsync with all parameters WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveConnectionFromGroupAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -305,6 +305,7 @@ This sample shows how to call RemoveConnectionFromGroup. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveConnectionFromGroup("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call RemoveConnectionFromGroup with all parameters. @@ -312,6 +313,7 @@ This sample shows how to call RemoveConnectionFromGroup with all parameters. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveConnectionFromGroup("", ""); + Console.WriteLine(response.Status); ]]> @@ -322,6 +324,7 @@ This sample shows how to call AddConnectionToGroupAsync. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.AddConnectionToGroupAsync("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call AddConnectionToGroupAsync with all parameters. @@ -329,6 +332,7 @@ This sample shows how to call AddConnectionToGroupAsync with all parameters. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.AddConnectionToGroupAsync("", ""); + Console.WriteLine(response.Status); ]]> @@ -339,6 +343,7 @@ This sample shows how to call AddConnectionToGroup. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.AddConnectionToGroup("", ""); + Console.WriteLine(response.Status); ]]> This sample shows how to call AddConnectionToGroup with all parameters. @@ -346,17 +351,10 @@ This sample shows how to call AddConnectionToGroup with all parameters. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.AddConnectionToGroup("", ""); + Console.WriteLine(response.Status); ]]> - - - - - - - - This sample shows how to call CloseUserConnectionsAsync. @@ -364,16 +362,15 @@ This sample shows how to call CloseUserConnectionsAsync. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.CloseUserConnectionsAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call CloseUserConnectionsAsync with all parameters. ", ""); -Response response = await client.CloseUserConnectionsAsync("", excluded: new List() -{ - "" -}, reason: ""); +Response response = await client.CloseUserConnectionsAsync("", excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); ]]> @@ -384,16 +381,15 @@ This sample shows how to call CloseUserConnections. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.CloseUserConnections(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call CloseUserConnections with all parameters. ", ""); -Response response = client.CloseUserConnections("", excluded: new List() -{ - "" -}, reason: ""); +Response response = client.CloseUserConnections("", excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); ]]> @@ -405,6 +401,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToUserAsync("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); ]]> This sample shows how to call SendToUserAsync with all parameters and request content. @@ -413,6 +410,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToUserAsync("", content, new ContentType("application/json"), filter: ""); + Console.WriteLine(response.Status); ]]> @@ -424,6 +422,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToUser("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); ]]> This sample shows how to call SendToUser with all parameters and request content. @@ -432,6 +431,7 @@ WebPubSubServiceClient client = new WebPubSubServiceClient("", "" RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToUser("", content, new ContentType("application/json"), filter: ""); + Console.WriteLine(response.Status); ]]> @@ -442,6 +442,7 @@ This sample shows how to call RemoveUserFromAllGroupsAsync. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveUserFromAllGroupsAsync(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call RemoveUserFromAllGroupsAsync with all parameters. @@ -449,6 +450,7 @@ This sample shows how to call RemoveUserFromAllGroupsAsync with all parameters. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveUserFromAllGroupsAsync(""); + Console.WriteLine(response.Status); ]]> @@ -459,6 +461,7 @@ This sample shows how to call RemoveUserFromAllGroups. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveUserFromAllGroups(""); + Console.WriteLine(response.Status); ]]> This sample shows how to call RemoveUserFromAllGroups with all parameters. @@ -466,12 +469,9 @@ This sample shows how to call RemoveUserFromAllGroups with all parameters. WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveUserFromAllGroups(""); + Console.WriteLine(response.Status); ]]> - - - - \ No newline at end of file diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/WebPubSubServiceClient.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/WebPubSubServiceClient.cs index e463b9b2b402c..b101e6a0e3c39 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/WebPubSubServiceClient.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/WebPubSubServiceClient.cs @@ -115,7 +115,6 @@ public virtual Response CloseAllConnections(IEnumerable excluded = null, /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task GenerateClientTokenImplAsync(string userId = null, IEnumerable role = null, int? minutesToExpire = null, IEnumerable group = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("WebPubSubServiceClient.GenerateClientTokenImpl"); @@ -149,7 +148,6 @@ internal virtual async Task GenerateClientTokenImplAsync(string userId /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response GenerateClientTokenImpl(string userId = null, IEnumerable role = null, int? minutesToExpire = null, IEnumerable group = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("WebPubSubServiceClient.GenerateClientTokenImpl"); @@ -328,7 +326,6 @@ public virtual Response CloseConnection(string connectionId, string reason = nul /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task ConnectionExistsImplAsync(string connectionId, RequestContext context = null) { Argument.AssertNotNullOrEmpty(connectionId, nameof(connectionId)); @@ -363,7 +360,6 @@ internal virtual async Task ConnectionExistsImplAsync(string connectio /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response ConnectionExistsImpl(string connectionId, RequestContext context = null) { Argument.AssertNotNullOrEmpty(connectionId, nameof(connectionId)); @@ -544,7 +540,6 @@ public virtual Response RemoveConnectionFromAllGroups(string connectionId, Reque /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task GroupExistsImplAsync(string group, RequestContext context = null) { Argument.AssertNotNullOrEmpty(group, nameof(group)); @@ -579,7 +574,6 @@ internal virtual async Task GroupExistsImplAsync(string group, Request /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response GroupExistsImpl(string group, RequestContext context = null) { Argument.AssertNotNullOrEmpty(group, nameof(group)); @@ -918,7 +912,6 @@ public virtual Response AddConnectionToGroup(string group, string connectionId, /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task RevokePermissionAsync(string permission, string connectionId, string targetName = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(permission, nameof(permission)); @@ -956,7 +949,6 @@ internal virtual async Task RevokePermissionAsync(string permission, s /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response RevokePermission(string permission, string connectionId, string targetName = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(permission, nameof(permission)); @@ -994,7 +986,6 @@ internal virtual Response RevokePermission(string permission, string connectionI /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task CheckPermissionAsync(string permission, string connectionId, string targetName = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(permission, nameof(permission)); @@ -1032,7 +1023,6 @@ internal virtual async Task CheckPermissionAsync(string permission, st /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response CheckPermission(string permission, string connectionId, string targetName = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(permission, nameof(permission)); @@ -1070,7 +1060,6 @@ internal virtual Response CheckPermission(string permission, string connectionId /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task GrantPermissionAsync(string permission, string connectionId, string targetName = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(permission, nameof(permission)); @@ -1108,7 +1097,6 @@ internal virtual async Task GrantPermissionAsync(string permission, st /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response GrantPermission(string permission, string connectionId, string targetName = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(permission, nameof(permission)); @@ -1144,7 +1132,6 @@ internal virtual Response GrantPermission(string permission, string connectionId /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual async Task UserExistsImplAsync(string userId, RequestContext context = null) { Argument.AssertNotNullOrEmpty(userId, nameof(userId)); @@ -1179,7 +1166,6 @@ internal virtual async Task UserExistsImplAsync(string userId, Request /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// internal virtual Response UserExistsImpl(string userId, RequestContext context = null) { Argument.AssertNotNullOrEmpty(userId, nameof(userId)); diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub/tests/Generated/Samples/Samples_HealthApiClient.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub/tests/Generated/Samples/Samples_HealthApiClient.cs index 52341896cbe89..ddaf2039f1eab 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub/tests/Generated/Samples/Samples_HealthApiClient.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub/tests/Generated/Samples/Samples_HealthApiClient.cs @@ -14,7 +14,7 @@ namespace Azure.Messaging.WebPubSub.Samples { - public class Samples_HealthApiClient + public partial class Samples_HealthApiClient { [Test] [Ignore("Only validating compilation of examples")] @@ -23,6 +23,7 @@ public void Example_GetServiceStatus_ShortVersion() HealthApiClient client = new HealthApiClient(""); Response response = client.GetServiceStatus(); + Console.WriteLine(response.Status); } @@ -33,6 +34,7 @@ public async Task Example_GetServiceStatus_ShortVersion_Async() HealthApiClient client = new HealthApiClient(""); Response response = await client.GetServiceStatusAsync(); + Console.WriteLine(response.Status); } @@ -43,6 +45,7 @@ public void Example_GetServiceStatus_AllParameters() HealthApiClient client = new HealthApiClient(""); Response response = client.GetServiceStatus(); + Console.WriteLine(response.Status); } @@ -53,6 +56,7 @@ public async Task Example_GetServiceStatus_AllParameters_Async() HealthApiClient client = new HealthApiClient(""); Response response = await client.GetServiceStatusAsync(); + Console.WriteLine(response.Status); } } diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub/tests/Generated/Samples/Samples_WebPubSubServiceClient.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub/tests/Generated/Samples/Samples_WebPubSubServiceClient.cs index ce81ef2eab7ec..b1c5f2d1303b1 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub/tests/Generated/Samples/Samples_WebPubSubServiceClient.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub/tests/Generated/Samples/Samples_WebPubSubServiceClient.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using Azure; @@ -17,7 +16,7 @@ namespace Azure.Messaging.WebPubSub.Samples { - public class Samples_WebPubSubServiceClient + public partial class Samples_WebPubSubServiceClient { [Test] [Ignore("Only validating compilation of examples")] @@ -26,6 +25,7 @@ public void Example_CloseAllConnections_ShortVersion() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.CloseAllConnections(); + Console.WriteLine(response.Status); } @@ -36,6 +36,7 @@ public async Task Example_CloseAllConnections_ShortVersion_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.CloseAllConnectionsAsync(); + Console.WriteLine(response.Status); } @@ -45,10 +46,8 @@ public void Example_CloseAllConnections_AllParameters() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - Response response = client.CloseAllConnections(excluded: new List() -{ -"" -}, reason: ""); + Response response = client.CloseAllConnections(excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); } @@ -58,10 +57,8 @@ public async Task Example_CloseAllConnections_AllParameters_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - Response response = await client.CloseAllConnectionsAsync(excluded: new List() -{ -"" -}, reason: ""); + Response response = await client.CloseAllConnectionsAsync(excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); } @@ -73,6 +70,7 @@ public void Example_SendToAll_ShortVersion() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToAll(content, new ContentType("application/json")); + Console.WriteLine(response.Status); } @@ -84,6 +82,7 @@ public async Task Example_SendToAll_ShortVersion_Async() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToAllAsync(content, new ContentType("application/json")); + Console.WriteLine(response.Status); } @@ -94,10 +93,8 @@ public void Example_SendToAll_AllParameters() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); RequestContent content = RequestContent.Create(File.OpenRead("")); - Response response = client.SendToAll(content, new ContentType("application/json"), excluded: new List() -{ -"" -}, filter: ""); + Response response = client.SendToAll(content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); + Console.WriteLine(response.Status); } @@ -108,10 +105,8 @@ public async Task Example_SendToAll_AllParameters_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); RequestContent content = RequestContent.Create(File.OpenRead("")); - Response response = await client.SendToAllAsync(content, new ContentType("application/json"), excluded: new List() -{ -"" -}, filter: ""); + Response response = await client.SendToAllAsync(content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); + Console.WriteLine(response.Status); } @@ -122,6 +117,7 @@ public void Example_CloseConnection_ShortVersion() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.CloseConnection(""); + Console.WriteLine(response.Status); } @@ -132,6 +128,7 @@ public async Task Example_CloseConnection_ShortVersion_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.CloseConnectionAsync(""); + Console.WriteLine(response.Status); } @@ -142,6 +139,7 @@ public void Example_CloseConnection_AllParameters() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.CloseConnection("", reason: ""); + Console.WriteLine(response.Status); } @@ -152,6 +150,7 @@ public async Task Example_CloseConnection_AllParameters_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.CloseConnectionAsync("", reason: ""); + Console.WriteLine(response.Status); } @@ -163,6 +162,7 @@ public void Example_SendToConnection_ShortVersion() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToConnection("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); } @@ -174,6 +174,7 @@ public async Task Example_SendToConnection_ShortVersion_Async() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToConnectionAsync("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); } @@ -185,6 +186,7 @@ public void Example_SendToConnection_AllParameters() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToConnection("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); } @@ -196,6 +198,7 @@ public async Task Example_SendToConnection_AllParameters_Async() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToConnectionAsync("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); } @@ -206,6 +209,7 @@ public void Example_RemoveConnectionFromAllGroups_ShortVersion() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveConnectionFromAllGroups(""); + Console.WriteLine(response.Status); } @@ -216,6 +220,7 @@ public async Task Example_RemoveConnectionFromAllGroups_ShortVersion_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveConnectionFromAllGroupsAsync(""); + Console.WriteLine(response.Status); } @@ -226,6 +231,7 @@ public void Example_RemoveConnectionFromAllGroups_AllParameters() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveConnectionFromAllGroups(""); + Console.WriteLine(response.Status); } @@ -236,6 +242,7 @@ public async Task Example_RemoveConnectionFromAllGroups_AllParameters_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveConnectionFromAllGroupsAsync(""); + Console.WriteLine(response.Status); } @@ -246,6 +253,7 @@ public void Example_CloseGroupConnections_ShortVersion() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.CloseGroupConnections(""); + Console.WriteLine(response.Status); } @@ -256,6 +264,7 @@ public async Task Example_CloseGroupConnections_ShortVersion_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.CloseGroupConnectionsAsync(""); + Console.WriteLine(response.Status); } @@ -265,10 +274,8 @@ public void Example_CloseGroupConnections_AllParameters() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - Response response = client.CloseGroupConnections("", excluded: new List() -{ -"" -}, reason: ""); + Response response = client.CloseGroupConnections("", excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); } @@ -278,10 +285,8 @@ public async Task Example_CloseGroupConnections_AllParameters_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - Response response = await client.CloseGroupConnectionsAsync("", excluded: new List() -{ -"" -}, reason: ""); + Response response = await client.CloseGroupConnectionsAsync("", excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); } @@ -293,6 +298,7 @@ public void Example_SendToGroup_ShortVersion() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToGroup("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); } @@ -304,6 +310,7 @@ public async Task Example_SendToGroup_ShortVersion_Async() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToGroupAsync("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); } @@ -314,10 +321,8 @@ public void Example_SendToGroup_AllParameters() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); RequestContent content = RequestContent.Create(File.OpenRead("")); - Response response = client.SendToGroup("", content, new ContentType("application/json"), excluded: new List() -{ -"" -}, filter: ""); + Response response = client.SendToGroup("", content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); + Console.WriteLine(response.Status); } @@ -328,10 +333,8 @@ public async Task Example_SendToGroup_AllParameters_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); RequestContent content = RequestContent.Create(File.OpenRead("")); - Response response = await client.SendToGroupAsync("", content, new ContentType("application/json"), excluded: new List() -{ -"" -}, filter: ""); + Response response = await client.SendToGroupAsync("", content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); + Console.WriteLine(response.Status); } @@ -342,6 +345,7 @@ public void Example_RemoveConnectionFromGroup_ShortVersion() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveConnectionFromGroup("", ""); + Console.WriteLine(response.Status); } @@ -352,6 +356,7 @@ public async Task Example_RemoveConnectionFromGroup_ShortVersion_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveConnectionFromGroupAsync("", ""); + Console.WriteLine(response.Status); } @@ -362,6 +367,7 @@ public void Example_RemoveConnectionFromGroup_AllParameters() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveConnectionFromGroup("", ""); + Console.WriteLine(response.Status); } @@ -372,6 +378,7 @@ public async Task Example_RemoveConnectionFromGroup_AllParameters_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveConnectionFromGroupAsync("", ""); + Console.WriteLine(response.Status); } @@ -382,6 +389,7 @@ public void Example_AddConnectionToGroup_ShortVersion() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.AddConnectionToGroup("", ""); + Console.WriteLine(response.Status); } @@ -392,6 +400,7 @@ public async Task Example_AddConnectionToGroup_ShortVersion_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.AddConnectionToGroupAsync("", ""); + Console.WriteLine(response.Status); } @@ -402,6 +411,7 @@ public void Example_AddConnectionToGroup_AllParameters() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.AddConnectionToGroup("", ""); + Console.WriteLine(response.Status); } @@ -412,6 +422,7 @@ public async Task Example_AddConnectionToGroup_AllParameters_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.AddConnectionToGroupAsync("", ""); + Console.WriteLine(response.Status); } @@ -422,6 +433,7 @@ public void Example_CloseUserConnections_ShortVersion() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.CloseUserConnections(""); + Console.WriteLine(response.Status); } @@ -432,6 +444,7 @@ public async Task Example_CloseUserConnections_ShortVersion_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.CloseUserConnectionsAsync(""); + Console.WriteLine(response.Status); } @@ -441,10 +454,8 @@ public void Example_CloseUserConnections_AllParameters() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - Response response = client.CloseUserConnections("", excluded: new List() -{ -"" -}, reason: ""); + Response response = client.CloseUserConnections("", excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); } @@ -454,10 +465,8 @@ public async Task Example_CloseUserConnections_AllParameters_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - Response response = await client.CloseUserConnectionsAsync("", excluded: new List() -{ -"" -}, reason: ""); + Response response = await client.CloseUserConnectionsAsync("", excluded: new string[] { "" }, reason: ""); + Console.WriteLine(response.Status); } @@ -469,6 +478,7 @@ public void Example_SendToUser_ShortVersion() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToUser("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); } @@ -480,6 +490,7 @@ public async Task Example_SendToUser_ShortVersion_Async() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToUserAsync("", content, new ContentType("application/json")); + Console.WriteLine(response.Status); } @@ -491,6 +502,7 @@ public void Example_SendToUser_AllParameters() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToUser("", content, new ContentType("application/json"), filter: ""); + Console.WriteLine(response.Status); } @@ -502,6 +514,7 @@ public async Task Example_SendToUser_AllParameters_Async() RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToUserAsync("", content, new ContentType("application/json"), filter: ""); + Console.WriteLine(response.Status); } @@ -512,6 +525,7 @@ public void Example_RemoveUserFromAllGroups_ShortVersion() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveUserFromAllGroups(""); + Console.WriteLine(response.Status); } @@ -522,6 +536,7 @@ public async Task Example_RemoveUserFromAllGroups_ShortVersion_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveUserFromAllGroupsAsync(""); + Console.WriteLine(response.Status); } @@ -532,6 +547,7 @@ public void Example_RemoveUserFromAllGroups_AllParameters() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = client.RemoveUserFromAllGroups(""); + Console.WriteLine(response.Status); } @@ -542,6 +558,7 @@ public async Task Example_RemoveUserFromAllGroups_AllParameters_Async() WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); Response response = await client.RemoveUserFromAllGroupsAsync(""); + Console.WriteLine(response.Status); } }