diff --git a/.github/workflows/event-processor.yml b/.github/workflows/event-processor.yml index 56845c175cd6c..eef39a27b5bb1 100644 --- a/.github/workflows/event-processor.yml +++ b/.github/workflows/event-processor.yml @@ -55,7 +55,7 @@ jobs: run: > dotnet tool install Azure.Sdk.Tools.GitHubEventProcessor - --version 1.0.0-dev.20230929.3 + --version 1.0.0-dev.20231010.2 --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json --global shell: bash diff --git a/.github/workflows/scheduled-event-processor.yml b/.github/workflows/scheduled-event-processor.yml index d8cc88325dd34..d268467b0716e 100644 --- a/.github/workflows/scheduled-event-processor.yml +++ b/.github/workflows/scheduled-event-processor.yml @@ -34,7 +34,7 @@ jobs: run: > dotnet tool install Azure.Sdk.Tools.GitHubEventProcessor - --version 1.0.0-dev.20230929.3 + --version 1.0.0-dev.20231010.2 --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json --global shell: bash diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 4dab0986ea5b6..82357ba234178 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -71,6 +71,7 @@ "dotnetcli", "dtmf", "eastus", + "entra", "epsg", "expando", "fhir", diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 29752b576f39c..f65af91cafc51 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -176,7 +176,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 baea717ce990b..343fc5dc31c86 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.20230928.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20231009.1" } } 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 75a045d3a6856..5c83ebf3daf96 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 @@ -182,7 +182,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -193,7 +193,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { applicationProductDetails = new object[] { @@ -262,7 +262,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -273,7 +273,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { applicationProductDetails = new object[] { 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 063f75e88d713..f2e9a94f4aea0 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 @@ -80,7 +80,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = null; +using RequestContent content = null; Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -91,7 +91,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -118,7 +118,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = null; +using RequestContent content = null; Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -129,7 +129,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; 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 a4b5c00750ced..34bb844a1f520 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 @@ -80,7 +80,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -91,7 +91,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { geometry = new { @@ -160,7 +160,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -171,7 +171,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { geometry = new { @@ -500,7 +500,7 @@ This sample shows how to call SearchAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); await foreach (BinaryData item in client.SearchAsync(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -512,7 +512,7 @@ This sample shows how to call SearchAsync with all request content and parse the TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { ids = new object[] { @@ -592,7 +592,7 @@ This sample shows how to call Search and parse the result. TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); foreach (BinaryData item in client.Search(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -604,7 +604,7 @@ This sample shows how to call Search with all request content and parse the resu TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { ids = new object[] { @@ -766,7 +766,7 @@ This sample shows how to call SearchByPartyIdAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); await foreach (BinaryData item in client.SearchByPartyIdAsync("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -778,7 +778,7 @@ This sample shows how to call SearchByPartyIdAsync with all parameters and reque TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { ids = new object[] { @@ -858,7 +858,7 @@ This sample shows how to call SearchByPartyId and parse the result. TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); foreach (BinaryData item in client.SearchByPartyId("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -870,7 +870,7 @@ This sample shows how to call SearchByPartyId with all parameters and request co TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { ids = new object[] { 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 7f234356eb526..2e429d2a99987 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 @@ -88,7 +88,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -99,7 +99,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { cropIds = new object[] { @@ -156,7 +156,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -167,7 +167,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { cropIds = new object[] { 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 29b689d34d825..60fc9986e730a 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 @@ -82,7 +82,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -93,7 +93,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { phenotype = "", breedingMethod = "VARIETY", @@ -141,7 +141,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -152,7 +152,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { phenotype = "", breedingMethod = "VARIETY", 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 42535acbd03b4..94874db1cff45 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 @@ -8,7 +8,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -19,7 +19,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { type = "", manufacturer = "", @@ -68,7 +68,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -79,7 +79,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { type = "", manufacturer = "", 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 94e193290ae1a..36bbc73ab6c91 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 @@ -8,7 +8,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -19,7 +19,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { deviceDataModelId = "", integrationId = "", @@ -71,7 +71,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -82,7 +82,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { deviceDataModelId = "", integrationId = "", 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 3c4673b5b1882..a64754609e411 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 @@ -94,7 +94,7 @@ This sample shows how to call CreateJobAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", authProviderId = "", @@ -113,7 +113,7 @@ This sample shows how to call CreateJobAsync with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", authProviderId = "", @@ -162,7 +162,7 @@ This sample shows how to call CreateJob and parse the result. TokenCredential credential = new DefaultAzureCredential(); FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", authProviderId = "", @@ -181,7 +181,7 @@ This sample shows how to call CreateJob with all parameters and request content TokenCredential credential = new DefaultAzureCredential(); FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", authProviderId = "", 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 b8a2bbc6d9bdc..e34406dcce4fb 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 @@ -8,7 +8,7 @@ This sample shows how to call GetOAuthConnectionLinkAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", oAuthProviderId = "", @@ -24,7 +24,7 @@ This sample shows how to call GetOAuthConnectionLinkAsync with all request conte TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", oAuthProviderId = "", @@ -44,7 +44,7 @@ This sample shows how to call GetOAuthConnectionLink and parse the result. TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", oAuthProviderId = "", @@ -60,7 +60,7 @@ This sample shows how to call GetOAuthConnectionLink with all request content an TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", oAuthProviderId = "", 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 eb79a0c724266..315f8ff6801b3 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 @@ -148,7 +148,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -159,7 +159,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { status = "", source = "", @@ -194,7 +194,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -205,7 +205,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { status = "", source = "", 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 cf870ef41363f..10a89062672b1 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 @@ -150,7 +150,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -161,7 +161,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { farmId = "", status = "", @@ -198,7 +198,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -209,7 +209,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { farmId = "", status = "", 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 6711e73af7506..84c6d24bd2315 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 @@ -212,7 +212,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -223,7 +223,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { totalYield = new { @@ -306,7 +306,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -317,7 +317,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { totalYield = new { 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 65bd404842328..baf5b2b4bb267 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 @@ -90,7 +90,7 @@ This sample shows how to call CreateRasterizeJobAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", @@ -112,7 +112,7 @@ This sample shows how to call CreateRasterizeJobAsync with all parameters and re TokenCredential credential = new DefaultAzureCredential(); ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", @@ -157,7 +157,7 @@ This sample shows how to call CreateRasterizeJob and parse the result. TokenCredential credential = new DefaultAzureCredential(); ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", @@ -179,7 +179,7 @@ This sample shows how to call CreateRasterizeJob with all parameters and request TokenCredential credential = new DefaultAzureCredential(); ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", 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 c7c3494c687ca..11c4ab7962a2b 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 @@ -8,7 +8,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(""); +using RequestContent content = RequestContent.Create(""); Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -19,7 +19,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -48,7 +48,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(""); +using RequestContent content = RequestContent.Create(""); Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -59,7 +59,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; 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 b5b48deaae88a..fc2ebb53a5bda 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 @@ -80,7 +80,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -91,7 +91,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { modelVersion = "", insightStartDateTime = "2022-05-10T18:57:31.2311892Z", @@ -144,7 +144,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -155,7 +155,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { modelVersion = "", insightStartDateTime = "2022-05-10T18:57:31.2311892Z", 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 9cefb85938202..366858a7c9cfa 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 @@ -156,7 +156,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -167,7 +167,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { type = "", seasonId = "", @@ -210,7 +210,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -221,7 +221,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { type = "", seasonId = "", diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ModelInference.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ModelInference.xml index bb5b6f71859c3..83539fb2a62f8 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ModelInference.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ModelInference.xml @@ -354,7 +354,7 @@ This sample shows how to call CreateBiomassModelJobAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -389,7 +389,7 @@ This sample shows how to call CreateBiomassModelJobAsync with all parameters and TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -447,7 +447,7 @@ This sample shows how to call CreateBiomassModelJob and parse the result. TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -482,7 +482,7 @@ This sample shows how to call CreateBiomassModelJob with all parameters and requ TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -540,7 +540,7 @@ This sample shows how to call CreateSensorPlacementModelJobAsync and parse the r TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -571,7 +571,7 @@ This sample shows how to call CreateSensorPlacementModelJobAsync with all parame TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -625,7 +625,7 @@ This sample shows how to call CreateSensorPlacementModelJob and parse the result TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -656,7 +656,7 @@ This sample shows how to call CreateSensorPlacementModelJob with all parameters TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -710,7 +710,7 @@ This sample shows how to call CreateSoilMoistureModelJobAsync and parse the resu TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -754,7 +754,7 @@ This sample shows how to call CreateSoilMoistureModelJobAsync with all parameter TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -821,7 +821,7 @@ This sample shows how to call CreateSoilMoistureModelJob and parse the result. TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -865,7 +865,7 @@ This sample shows how to call CreateSoilMoistureModelJob with all parameters and TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", 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 17abd87ece40b..3cbf85049d054 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 @@ -98,7 +98,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -109,7 +109,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { parentId = "", parentType = "PlantTissueAnalysis", @@ -172,7 +172,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -183,7 +183,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { parentId = "", parentType = "PlantTissueAnalysis", 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 357c7f12c82db..f90cb921584a0 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 @@ -78,7 +78,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -89,7 +89,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { appId = "", appSecret = "", @@ -127,7 +127,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -138,7 +138,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { appId = "", appSecret = "", 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 40f88dedde654..7eaffd1e7c304 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 @@ -74,7 +74,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -85,7 +85,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { status = "", source = "", @@ -119,7 +119,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -130,7 +130,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { status = "", source = "", 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 87bcdb2686a56..e4cfa6fbb9713 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 @@ -112,7 +112,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -123,7 +123,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { fieldId = "", cropId = "", @@ -196,7 +196,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -207,7 +207,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { fieldId = "", cropId = "", 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 65719fb4d5035..1cb413ce615d0 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 @@ -116,7 +116,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -127,7 +127,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { avgPlantingRate = new { @@ -198,7 +198,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -209,7 +209,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { avgPlantingRate = new { 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 a6a26180dde5e..17476c90cf7aa 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 @@ -84,7 +84,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -95,7 +95,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { type = "", seasonId = "", @@ -138,7 +138,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -149,7 +149,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { type = "", seasonId = "", 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 f07da898cbf6a..ec98043672ba3 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 @@ -88,7 +88,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -99,7 +99,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { prescriptionMapId = "", productCode = "", @@ -152,7 +152,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -163,7 +163,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { prescriptionMapId = "", productCode = "", 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 22e95c0ca6576..e9571d4c8fe5e 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 @@ -164,7 +164,7 @@ This sample shows how to call SearchFeaturesAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", @@ -185,7 +185,7 @@ This sample shows how to call SearchFeaturesAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", @@ -245,7 +245,7 @@ This sample shows how to call SearchFeatures and parse the result. TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", @@ -266,7 +266,7 @@ This sample shows how to call SearchFeatures with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", @@ -494,7 +494,7 @@ This sample shows how to call CreateSatelliteDataIngestionJobAsync and parse the TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -517,7 +517,7 @@ This sample shows how to call CreateSatelliteDataIngestionJobAsync with all para TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -583,7 +583,7 @@ This sample shows how to call CreateSatelliteDataIngestionJob and parse the resu TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -606,7 +606,7 @@ This sample shows how to call CreateSatelliteDataIngestionJob with all parameter TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", 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 725ac9278c0bd..9d6f62bc8649c 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 @@ -86,7 +86,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -97,7 +97,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { farmId = "", fieldId = "", @@ -145,7 +145,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -156,7 +156,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { farmId = "", fieldId = "", 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 a0cea5d81019c..e8ef356c42709 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 @@ -82,7 +82,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -93,7 +93,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", @@ -135,7 +135,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -146,7 +146,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", 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 351536e7d3eea..cfaca5492e1c2 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 @@ -8,7 +8,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { measures = new { @@ -28,7 +28,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { type = "", manufacturer = "", @@ -86,7 +86,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { measures = new { @@ -106,7 +106,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { type = "", manufacturer = "", 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 7830bb86224a1..70fbd242e7eeb 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 @@ -8,7 +8,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -19,7 +19,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { sensorId = "", sensorPartnerId = "", @@ -59,7 +59,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -70,7 +70,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { sensorId = "", sensorPartnerId = "", 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 8e6614e4e9f15..4a4a1b5c01c5b 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 @@ -8,7 +8,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -19,7 +19,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", status = "", @@ -55,7 +55,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -66,7 +66,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { partyId = "", status = "", 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 9ee0068152eb3..90619b6a60252 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 @@ -8,7 +8,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -19,7 +19,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { sensorDataModelId = "", integrationId = "", @@ -81,7 +81,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -92,7 +92,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { sensorDataModelId = "", integrationId = "", @@ -330,7 +330,7 @@ This sample shows how to call RenewConnectionStringAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { connectionStringType = "Primary", }); @@ -344,7 +344,7 @@ This sample shows how to call RenewConnectionStringAsync with all parameters and TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { connectionStringType = "Primary", }); @@ -362,7 +362,7 @@ This sample shows how to call RenewConnectionString and parse the result. TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { connectionStringType = "Primary", }); @@ -376,7 +376,7 @@ This sample shows how to call RenewConnectionString with all parameters and requ TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { connectionStringType = "Primary", }); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SolutionInference.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SolutionInference.xml index b82795ccb6507..d3ca3a5d4fc48 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SolutionInference.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SolutionInference.xml @@ -8,7 +8,7 @@ This sample shows how to call CancelAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -22,7 +22,7 @@ This sample shows how to call CancelAsync with all parameters and request conten TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new @@ -43,7 +43,7 @@ This sample shows how to call Cancel and parse the result. TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -57,7 +57,7 @@ This sample shows how to call Cancel with all parameters and request content and TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new @@ -78,7 +78,7 @@ This sample shows how to call FetchAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -92,7 +92,7 @@ This sample shows how to call FetchAsync with all parameters and request content TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new @@ -113,7 +113,7 @@ This sample shows how to call Fetch and parse the result. TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -127,7 +127,7 @@ This sample shows how to call Fetch with all parameters and request content and TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new @@ -148,7 +148,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -163,7 +163,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new @@ -185,7 +185,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -200,7 +200,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new 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 0338fdc1ff7a8..33e612c504df1 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 @@ -98,7 +98,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -109,7 +109,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { tillageDepth = new { @@ -164,7 +164,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -175,7 +175,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { tillageDepth = new { 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 ca0a56eb356e0..1c7dd7b139b22 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 @@ -346,7 +346,7 @@ This sample shows how to call CreateDataDeleteJobAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { extensionId = "", partyId = "", @@ -365,7 +365,7 @@ This sample shows how to call CreateDataDeleteJobAsync with all parameters and r TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { extensionId = "", partyId = "", @@ -415,7 +415,7 @@ This sample shows how to call CreateDataDeleteJob and parse the result. TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { extensionId = "", partyId = "", @@ -434,7 +434,7 @@ This sample shows how to call CreateDataDeleteJob with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { extensionId = "", partyId = "", @@ -484,7 +484,7 @@ This sample shows how to call CreateDataIngestionJobAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { boundaryId = "", partyId = "", @@ -510,7 +510,7 @@ This sample shows how to call CreateDataIngestionJobAsync with all parameters an TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { boundaryId = "", partyId = "", @@ -563,7 +563,7 @@ This sample shows how to call CreateDataIngestionJob and parse the result. TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { boundaryId = "", partyId = "", @@ -589,7 +589,7 @@ This sample shows how to call CreateDataIngestionJob with all parameters and req TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { boundaryId = "", partyId = "", 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 99569d2900e2b..126bbd767e307 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 @@ -8,7 +8,7 @@ This sample shows how to call GetWeatherDataAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { providerApiKey = "", extensionId = "", @@ -29,7 +29,7 @@ This sample shows how to call GetWeatherDataAsync with all request content and p TokenCredential credential = new DefaultAzureCredential(); WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { locations = new object[] { @@ -126,7 +126,7 @@ This sample shows how to call GetWeatherData and parse the result. TokenCredential credential = new DefaultAzureCredential(); WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { providerApiKey = "", extensionId = "", @@ -147,7 +147,7 @@ This sample shows how to call GetWeatherData with all request content and parse TokenCredential credential = new DefaultAzureCredential(); WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { locations = new object[] { 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 aa4988c3c99ec..9726d11530a80 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 @@ -80,7 +80,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -91,7 +91,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { type = "", managementZoneId = "", @@ -130,7 +130,7 @@ This sample shows how to call CreateOrUpdate and parse the result. TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -141,7 +141,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { type = "", managementZoneId = "", 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 bf4e57c5a25d2..37f7c06698a19 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 @@ -211,7 +211,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -225,7 +225,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -239,7 +239,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { applicationProductDetails = new object[] { @@ -308,7 +308,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { applicationProductDetails = new object[] { 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 27024d75031bf..d61859d1ce48c 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 @@ -104,7 +104,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = null; + using RequestContent content = null; Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -118,7 +118,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = null; + using RequestContent content = null; Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -132,7 +132,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -159,7 +159,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; 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 34dacaaf25735..7929bad0756a0 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 @@ -103,7 +103,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -117,7 +117,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -131,7 +131,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { geometry = new { @@ -200,7 +200,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { geometry = new { @@ -553,7 +553,7 @@ public void Example_Search_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); foreach (BinaryData item in client.Search(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -568,7 +568,7 @@ public async Task Example_Search_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); await foreach (BinaryData item in client.SearchAsync(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -583,7 +583,7 @@ public void Example_Search_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { ids = new object[] { @@ -663,7 +663,7 @@ public async Task Example_Search_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { ids = new object[] { @@ -831,7 +831,7 @@ public void Example_SearchByPartyId_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); foreach (BinaryData item in client.SearchByPartyId("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -846,7 +846,7 @@ public async Task Example_SearchByPartyId_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); await foreach (BinaryData item in client.SearchByPartyIdAsync("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -861,7 +861,7 @@ public void Example_SearchByPartyId_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { ids = new object[] { @@ -941,7 +941,7 @@ public async Task Example_SearchByPartyId_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { ids = new object[] { 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 05578dd60eafd..a5845ca7b172b 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 @@ -111,7 +111,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -125,7 +125,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -139,7 +139,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { cropIds = new object[] { @@ -196,7 +196,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { cropIds = new object[] { 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 f5ce9395d9b96..9822df4bf4504 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 @@ -105,7 +105,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -119,7 +119,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -133,7 +133,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { phenotype = "", breedingMethod = "VARIETY", @@ -181,7 +181,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { phenotype = "", breedingMethod = "VARIETY", 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 bbcd16c571f41..856bc792b09d8 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 @@ -25,7 +25,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -39,7 +39,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -53,7 +53,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { type = "", manufacturer = "", @@ -102,7 +102,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { type = "", manufacturer = "", 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 1d0eb049daa31..80077b5b817c4 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 @@ -25,7 +25,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -39,7 +39,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -53,7 +53,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { deviceDataModelId = "", integrationId = "", @@ -105,7 +105,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { deviceDataModelId = "", integrationId = "", 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 9a968bf4d7db7..6e2b9a6b2266a 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 @@ -117,7 +117,7 @@ public void Example_CreateJob_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", authProviderId = "", @@ -139,7 +139,7 @@ public async Task Example_CreateJob_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", authProviderId = "", @@ -161,7 +161,7 @@ public void Example_CreateJob_AllParameters() TokenCredential credential = new DefaultAzureCredential(); FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", authProviderId = "", @@ -210,7 +210,7 @@ public async Task Example_CreateJob_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", authProviderId = "", 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 a18b2b1f5a50e..e4caafa46a8c0 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 @@ -25,7 +25,7 @@ public void Example_GetOAuthConnectionLink_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", oAuthProviderId = "", @@ -44,7 +44,7 @@ public async Task Example_GetOAuthConnectionLink_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", oAuthProviderId = "", @@ -63,7 +63,7 @@ public void Example_GetOAuthConnectionLink_AllParameters() TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", oAuthProviderId = "", @@ -83,7 +83,7 @@ public async Task Example_GetOAuthConnectionLink_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", oAuthProviderId = "", 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 532fb05d9eaa4..b3e770274d6df 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 @@ -177,7 +177,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -191,7 +191,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -205,7 +205,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { status = "", source = "", @@ -240,7 +240,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { status = "", source = "", 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 03f4562ea522b..e487714c14715 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 @@ -179,7 +179,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -193,7 +193,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -207,7 +207,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { farmId = "", status = "", @@ -244,7 +244,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { farmId = "", status = "", 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 468598d350e26..f3fcd77eed3bb 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 @@ -241,7 +241,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -255,7 +255,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -269,7 +269,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { totalYield = new { @@ -352,7 +352,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { totalYield = new { 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 f06bf1dd3fa2b..c188e989da2fc 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 @@ -113,7 +113,7 @@ public void Example_CreateRasterizeJob_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", @@ -138,7 +138,7 @@ public async Task Example_CreateRasterizeJob_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", @@ -163,7 +163,7 @@ public void Example_CreateRasterizeJob_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", @@ -208,7 +208,7 @@ public async Task Example_CreateRasterizeJob_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", shapefileAttachmentId = "", 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 fda6f5806776f..0f840aff679d6 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 @@ -26,7 +26,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(""); + using RequestContent content = RequestContent.Create(""); Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -40,7 +40,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(""); + using RequestContent content = RequestContent.Create(""); Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -54,7 +54,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -83,7 +83,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; 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 f54d4e2186984..ceebbd53fc746 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 @@ -103,7 +103,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -117,7 +117,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -131,7 +131,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { modelVersion = "", insightStartDateTime = "2022-05-10T18:57:31.2311892Z", @@ -184,7 +184,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { modelVersion = "", insightStartDateTime = "2022-05-10T18:57:31.2311892Z", 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 49b408b1c4141..5469e32c5481c 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 @@ -185,7 +185,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -199,7 +199,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -213,7 +213,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { type = "", seasonId = "", @@ -256,7 +256,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { type = "", seasonId = "", 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 dc74725066981..55bfc512ea68a 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 @@ -389,7 +389,7 @@ public void Example_CreateBiomassModelJob_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -427,7 +427,7 @@ public async Task Example_CreateBiomassModelJob_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -465,7 +465,7 @@ public void Example_CreateBiomassModelJob_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -523,7 +523,7 @@ public async Task Example_CreateBiomassModelJob_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -581,7 +581,7 @@ public void Example_CreateSensorPlacementModelJob_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -615,7 +615,7 @@ public async Task Example_CreateSensorPlacementModelJob_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -649,7 +649,7 @@ public void Example_CreateSensorPlacementModelJob_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -703,7 +703,7 @@ public async Task Example_CreateSensorPlacementModelJob_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -757,7 +757,7 @@ public void Example_CreateSoilMoistureModelJob_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -804,7 +804,7 @@ public async Task Example_CreateSoilMoistureModelJob_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -851,7 +851,7 @@ public void Example_CreateSoilMoistureModelJob_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -918,7 +918,7 @@ public async Task Example_CreateSoilMoistureModelJob_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", 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 34aa42159900c..acd259fb651af 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 @@ -121,7 +121,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -135,7 +135,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -149,7 +149,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { parentId = "", parentType = "PlantTissueAnalysis", @@ -212,7 +212,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { parentId = "", parentType = "PlantTissueAnalysis", 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 b48d0ac40f343..240bd6cada815 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 @@ -101,7 +101,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -115,7 +115,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -129,7 +129,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { appId = "", appSecret = "", @@ -167,7 +167,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { appId = "", appSecret = "", 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 3066325189a1f..3f86def8caf1e 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 @@ -97,7 +97,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -111,7 +111,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -125,7 +125,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { status = "", source = "", @@ -159,7 +159,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { status = "", source = "", 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 ef9f45f6b70c9..c4511a4781189 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 @@ -135,7 +135,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -149,7 +149,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -163,7 +163,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { fieldId = "", cropId = "", @@ -236,7 +236,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { fieldId = "", cropId = "", 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 c24fceb3b81b1..485f8accbf078 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 @@ -139,7 +139,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -153,7 +153,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -167,7 +167,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { avgPlantingRate = new { @@ -238,7 +238,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { avgPlantingRate = new { 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 b060949d5621a..93aca99d3a272 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 @@ -107,7 +107,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -121,7 +121,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -135,7 +135,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { type = "", seasonId = "", @@ -178,7 +178,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { type = "", seasonId = "", 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 bee4ffa3ec849..17fdceccefb61 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 @@ -111,7 +111,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -125,7 +125,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -139,7 +139,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { prescriptionMapId = "", productCode = "", @@ -192,7 +192,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { prescriptionMapId = "", productCode = "", 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 c710153f0d310..cee0fc9d27a30 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 @@ -194,7 +194,7 @@ public void Example_SearchFeatures_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", @@ -218,7 +218,7 @@ public async Task Example_SearchFeatures_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", @@ -242,7 +242,7 @@ public void Example_SearchFeatures_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", @@ -302,7 +302,7 @@ public async Task Example_SearchFeatures_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", @@ -542,7 +542,7 @@ public void Example_CreateSatelliteDataIngestionJob_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -568,7 +568,7 @@ public async Task Example_CreateSatelliteDataIngestionJob_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -594,7 +594,7 @@ public void Example_CreateSatelliteDataIngestionJob_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", @@ -660,7 +660,7 @@ public async Task Example_CreateSatelliteDataIngestionJob_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", boundaryId = "", 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 0dd73284e9e84..8daa33d405013 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 @@ -109,7 +109,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -123,7 +123,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -137,7 +137,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { farmId = "", fieldId = "", @@ -185,7 +185,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { farmId = "", fieldId = "", 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 17d4a53053ce8..be6dd895e8d9e 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 @@ -105,7 +105,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -119,7 +119,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -133,7 +133,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", @@ -175,7 +175,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { startDateTime = "2022-05-10T18:57:31.2311892Z", endDateTime = "2022-05-10T18:57:31.2311892Z", 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 bdfc0db03ae8e..9af0eba83c478 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 @@ -25,7 +25,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { measures = new { @@ -48,7 +48,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { measures = new { @@ -71,7 +71,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { type = "", manufacturer = "", @@ -129,7 +129,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { type = "", manufacturer = "", 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 42f16703b2eff..ee74ba24bb6bc 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 @@ -25,7 +25,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -39,7 +39,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -53,7 +53,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { sensorId = "", sensorPartnerId = "", @@ -93,7 +93,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { sensorId = "", sensorPartnerId = "", 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 aafb7ce75ec9a..687ccac9ec05b 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 @@ -25,7 +25,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -39,7 +39,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -53,7 +53,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", status = "", @@ -89,7 +89,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { partyId = "", status = "", 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 f9af86ec927cb..d72286de21cd0 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 @@ -25,7 +25,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -39,7 +39,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -53,7 +53,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { sensorDataModelId = "", integrationId = "", @@ -115,7 +115,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { sensorDataModelId = "", integrationId = "", @@ -371,7 +371,7 @@ public void Example_RenewConnectionString_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { connectionStringType = "Primary", }); @@ -388,7 +388,7 @@ public async Task Example_RenewConnectionString_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { connectionStringType = "Primary", }); @@ -405,7 +405,7 @@ public void Example_RenewConnectionString_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { connectionStringType = "Primary", }); @@ -423,7 +423,7 @@ public async Task Example_RenewConnectionString_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { connectionStringType = "Primary", }); 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 2e9c8a7acd73b..5d7add97442d0 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 @@ -25,7 +25,7 @@ public void Example_Cancel_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -42,7 +42,7 @@ public async Task Example_Cancel_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -59,7 +59,7 @@ public void Example_Cancel_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new @@ -80,7 +80,7 @@ public async Task Example_Cancel_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new @@ -101,7 +101,7 @@ public void Example_Fetch_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -118,7 +118,7 @@ public async Task Example_Fetch_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -135,7 +135,7 @@ public void Example_Fetch_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new @@ -156,7 +156,7 @@ public async Task Example_Fetch_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new @@ -177,7 +177,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -195,7 +195,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", }); @@ -213,7 +213,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new @@ -235,7 +235,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { requestPath = "", partnerRequestBody = new 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 42cd1ddc22cfe..ee1df3d0a915b 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 @@ -121,7 +121,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -135,7 +135,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -149,7 +149,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { tillageDepth = new { @@ -204,7 +204,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { tillageDepth = new { 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 2891802f005b7..4ee0a5f9e92e2 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 @@ -381,7 +381,7 @@ public void Example_CreateDataDeleteJob_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { extensionId = "", partyId = "", @@ -403,7 +403,7 @@ public async Task Example_CreateDataDeleteJob_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { extensionId = "", partyId = "", @@ -425,7 +425,7 @@ public void Example_CreateDataDeleteJob_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { extensionId = "", partyId = "", @@ -475,7 +475,7 @@ public async Task Example_CreateDataDeleteJob_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { extensionId = "", partyId = "", @@ -525,7 +525,7 @@ public void Example_CreateDataIngestionJob_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { boundaryId = "", partyId = "", @@ -554,7 +554,7 @@ public async Task Example_CreateDataIngestionJob_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { boundaryId = "", partyId = "", @@ -583,7 +583,7 @@ public void Example_CreateDataIngestionJob_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { boundaryId = "", partyId = "", @@ -636,7 +636,7 @@ public async Task Example_CreateDataIngestionJob_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { boundaryId = "", partyId = "", 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 b7866df91da05..d9b6f91bf99c5 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 @@ -25,7 +25,7 @@ public void Example_GetWeatherData_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { providerApiKey = "", extensionId = "", @@ -49,7 +49,7 @@ public async Task Example_GetWeatherData_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { providerApiKey = "", extensionId = "", @@ -73,7 +73,7 @@ public void Example_GetWeatherData_AllParameters() TokenCredential credential = new DefaultAzureCredential(); WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { locations = new object[] { @@ -170,7 +170,7 @@ public async Task Example_GetWeatherData_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { locations = new object[] { 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 33fceb606c2c4..b9fdb1ebf439b 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 @@ -103,7 +103,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -117,7 +117,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -131,7 +131,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { type = "", managementZoneId = "", @@ -170,7 +170,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { type = "", managementZoneId = "", diff --git a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs index 0b8e5f6a61bbc..8b0a9cf181a45 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs @@ -150,7 +150,8 @@ public virtual async Task> DetectUnivari Argument.AssertNotNull(options, nameof(options)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await DetectUnivariateLastPointAsync(options.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = options.ToRequestContent(); + Response response = await DetectUnivariateLastPointAsync(content, context).ConfigureAwait(false); return Response.FromValue(UnivariateLastDetectionResult.FromResponse(response), response); } @@ -168,7 +169,8 @@ public virtual Response DetectUnivariateLastPoint Argument.AssertNotNull(options, nameof(options)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = DetectUnivariateLastPoint(options.ToRequestContent(), context); + using RequestContent content = options.ToRequestContent(); + Response response = DetectUnivariateLastPoint(content, context); return Response.FromValue(UnivariateLastDetectionResult.FromResponse(response), response); } @@ -261,7 +263,8 @@ public virtual async Task> Detect Argument.AssertNotNull(options, nameof(options)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await DetectUnivariateChangePointAsync(options.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = options.ToRequestContent(); + Response response = await DetectUnivariateChangePointAsync(content, context).ConfigureAwait(false); return Response.FromValue(UnivariateChangePointDetectionResult.FromResponse(response), response); } @@ -276,7 +279,8 @@ public virtual Response DetectUnivariateCh Argument.AssertNotNull(options, nameof(options)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = DetectUnivariateChangePoint(options.ToRequestContent(), context); + using RequestContent content = options.ToRequestContent(); + Response response = DetectUnivariateChangePoint(content, context); return Response.FromValue(UnivariateChangePointDetectionResult.FromResponse(response), response); } @@ -482,7 +486,8 @@ public virtual async Task> TrainMultivariateMode Argument.AssertNotNull(modelInfo, nameof(modelInfo)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await TrainMultivariateModelAsync(modelInfo.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = modelInfo.ToRequestContent(); + Response response = await TrainMultivariateModelAsync(content, context).ConfigureAwait(false); return Response.FromValue(AnomalyDetectionModel.FromResponse(response), response); } @@ -508,7 +513,8 @@ public virtual Response TrainMultivariateModel(ModelInfo Argument.AssertNotNull(modelInfo, nameof(modelInfo)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = TrainMultivariateModel(modelInfo.ToRequestContent(), context); + using RequestContent content = modelInfo.ToRequestContent(); + Response response = TrainMultivariateModel(content, context); return Response.FromValue(AnomalyDetectionModel.FromResponse(response), response); } @@ -801,7 +807,8 @@ public virtual async Task> DetectMultivari Argument.AssertNotNull(options, nameof(options)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await DetectMultivariateBatchAnomalyAsync(modelId, options.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = options.ToRequestContent(); + Response response = await DetectMultivariateBatchAnomalyAsync(modelId, content, context).ConfigureAwait(false); return Response.FromValue(MultivariateDetectionResult.FromResponse(response), response); } @@ -826,7 +833,8 @@ public virtual Response DetectMultivariateBatchAnom Argument.AssertNotNull(options, nameof(options)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = DetectMultivariateBatchAnomaly(modelId, options.ToRequestContent(), context); + using RequestContent content = options.ToRequestContent(); + Response response = DetectMultivariateBatchAnomaly(modelId, content, context); return Response.FromValue(MultivariateDetectionResult.FromResponse(response), response); } @@ -933,7 +941,8 @@ public virtual async Task> DetectMulti Argument.AssertNotNull(options, nameof(options)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await DetectMultivariateLastAnomalyAsync(modelId, options.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = options.ToRequestContent(); + Response response = await DetectMultivariateLastAnomalyAsync(modelId, content, context).ConfigureAwait(false); return Response.FromValue(MultivariateLastDetectionResult.FromResponse(response), response); } @@ -956,7 +965,8 @@ public virtual Response DetectMultivariateLastA Argument.AssertNotNull(options, nameof(options)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = DetectMultivariateLastAnomaly(modelId, options.ToRequestContent(), context); + using RequestContent content = options.ToRequestContent(); + Response response = DetectMultivariateLastAnomaly(modelId, content, context); return Response.FromValue(MultivariateLastDetectionResult.FromResponse(response), response); } 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 dad9eedf33d49..5fc443102ebdb 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -36,7 +36,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -75,7 +75,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -102,7 +102,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -219,7 +219,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -247,7 +247,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -287,7 +287,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -315,7 +315,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -427,7 +427,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -449,7 +449,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -481,7 +481,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -503,7 +503,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -739,7 +739,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", startTime = "2022-05-10T14:57:31.2311892-04:00", @@ -758,7 +758,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", dataSchema = "OneTable", @@ -810,7 +810,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", startTime = "2022-05-10T14:57:31.2311892-04:00", @@ -829,7 +829,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", dataSchema = "OneTable", @@ -1113,7 +1113,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", startTime = "2022-05-10T14:57:31.2311892-04:00", @@ -1135,7 +1135,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", topContributorCount = 1234, @@ -1177,7 +1177,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", startTime = "2022-05-10T14:57:31.2311892-04:00", @@ -1199,7 +1199,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", topContributorCount = 1234, @@ -1301,7 +1301,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { variables = new object[] { @@ -1330,7 +1330,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { variables = new object[] { @@ -1376,7 +1376,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { variables = new object[] { @@ -1405,7 +1405,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { variables = new object[] { 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 7c10e3e12461c..6e7fe21dec76b 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 @@ -26,7 +26,7 @@ public void Example_DetectUnivariateEntireSeries_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -56,7 +56,7 @@ public async Task Example_DetectUnivariateEntireSeries_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -86,7 +86,7 @@ public void Example_DetectUnivariateEntireSeries_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -125,7 +125,7 @@ public async Task Example_DetectUnivariateEntireSeries_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -164,7 +164,7 @@ public void Example_DetectUnivariateLastPoint_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -195,7 +195,7 @@ public async Task Example_DetectUnivariateLastPoint_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -256,7 +256,7 @@ public void Example_DetectUnivariateLastPoint_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -296,7 +296,7 @@ public async Task Example_DetectUnivariateLastPoint_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -390,7 +390,7 @@ public void Example_DetectUnivariateChangePoint_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -415,7 +415,7 @@ public async Task Example_DetectUnivariateChangePoint_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -470,7 +470,7 @@ public void Example_DetectUnivariateChangePoint_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -502,7 +502,7 @@ public async Task Example_DetectUnivariateChangePoint_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { series = new object[] { @@ -734,7 +734,7 @@ public void Example_TrainMultivariateModel_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", startTime = "2022-05-10T14:57:31.2311892-04:00", @@ -756,7 +756,7 @@ public async Task Example_TrainMultivariateModel_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", startTime = "2022-05-10T14:57:31.2311892-04:00", @@ -802,7 +802,7 @@ public void Example_TrainMultivariateModel_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", dataSchema = "OneTable", @@ -854,7 +854,7 @@ public async Task Example_TrainMultivariateModel_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", dataSchema = "OneTable", @@ -1154,7 +1154,7 @@ public void Example_DetectMultivariateBatchAnomaly_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", startTime = "2022-05-10T14:57:31.2311892-04:00", @@ -1179,7 +1179,7 @@ public async Task Example_DetectMultivariateBatchAnomaly_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", startTime = "2022-05-10T14:57:31.2311892-04:00", @@ -1228,7 +1228,7 @@ public void Example_DetectMultivariateBatchAnomaly_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", topContributorCount = 1234, @@ -1270,7 +1270,7 @@ public async Task Example_DetectMultivariateBatchAnomaly_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", topContributorCount = 1234, @@ -1342,7 +1342,7 @@ public void Example_DetectMultivariateLastAnomaly_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { variables = new object[] { @@ -1374,7 +1374,7 @@ public async Task Example_DetectMultivariateLastAnomaly_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { variables = new object[] { @@ -1436,7 +1436,7 @@ public void Example_DetectMultivariateLastAnomaly_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { variables = new object[] { @@ -1482,7 +1482,7 @@ public async Task Example_DetectMultivariateLastAnomaly_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { variables = new object[] { diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md index 0a41020b744ec..ae941c5145d43 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.3.0-beta.4 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.3.0-beta.3 (2023-10-09) ### Features Added diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Azure.Data.AppConfiguration.csproj b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Azure.Data.AppConfiguration.csproj index acadf91adb07f..6c1a7502d83a4 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Azure.Data.AppConfiguration.csproj +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Azure.Data.AppConfiguration.csproj @@ -1,9 +1,9 @@ - + This is the Microsoft Azure Application Configuration Service client library Microsoft Azure.Data.AppConfiguration client library - 1.3.0-beta.3 + 1.3.0-beta.4 1.2.1 Microsoft Azure Application Configuration;Data;AppConfig;$(PackageCommonTags) 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 98a6c6a9e9813..f339243373d47 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -37,7 +37,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -93,7 +93,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -121,7 +121,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -273,7 +273,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -319,7 +319,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { displayName = "", analysisInput = new @@ -400,7 +400,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -446,7 +446,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { displayName = "", analysisInput = new 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 a079e5f68dd16..bd038fdfaf70f 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { projectKind = "Conversation", projectName = "", @@ -30,7 +30,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { projectKind = "Conversation", settings = new @@ -65,7 +65,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { projectKind = "Conversation", projectName = "", @@ -86,7 +86,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { projectKind = "Conversation", settings = new @@ -2099,7 +2099,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { projectFileVersion = "", stringIndexType = "Utf16CodeUnit", @@ -2125,7 +2125,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { projectFileVersion = "", stringIndexType = "Utf16CodeUnit", @@ -2259,7 +2259,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { projectFileVersion = "", stringIndexType = "Utf16CodeUnit", @@ -2285,7 +2285,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { projectFileVersion = "", stringIndexType = "Utf16CodeUnit", @@ -2419,7 +2419,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { modelLabel = "", trainingMode = "advanced", @@ -2443,7 +2443,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { modelLabel = "", trainingConfigVersion = "", @@ -2502,7 +2502,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { modelLabel = "", trainingMode = "advanced", @@ -2526,7 +2526,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { modelLabel = "", trainingConfigVersion = "", @@ -2585,7 +2585,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { firstDeploymentName = "", secondDeploymentName = "", @@ -2605,7 +2605,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { firstDeploymentName = "", secondDeploymentName = "", @@ -2645,7 +2645,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { firstDeploymentName = "", secondDeploymentName = "", @@ -2665,7 +2665,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { firstDeploymentName = "", secondDeploymentName = "", @@ -2705,7 +2705,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { trainedModelLabel = "", }); @@ -2726,7 +2726,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { trainedModelLabel = "", }); @@ -2750,7 +2750,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { trainedModelLabel = "", }); @@ -2771,7 +2771,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { trainedModelLabel = "", }); 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 5c39e564f4b3a..26575f4e6b1f9 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 @@ -27,7 +27,7 @@ public void Example_AnalyzeConversation_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -58,7 +58,7 @@ public async Task Example_AnalyzeConversation_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -89,7 +89,7 @@ public void Example_AnalyzeConversation_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -145,7 +145,7 @@ public async Task Example_AnalyzeConversation_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -303,7 +303,7 @@ public void Example_AnalyzeConversations_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -352,7 +352,7 @@ public async Task Example_AnalyzeConversations_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { analysisInput = new { @@ -401,7 +401,7 @@ public void Example_AnalyzeConversations_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { displayName = "", analysisInput = new @@ -482,7 +482,7 @@ public async Task Example_AnalyzeConversations_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { displayName = "", analysisInput = new 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 0cc483eaec1bc..de489266b330c 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 @@ -26,7 +26,7 @@ public void Example_CreateProject_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { projectKind = "Conversation", projectName = "", @@ -50,7 +50,7 @@ public async Task Example_CreateProject_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { projectKind = "Conversation", projectName = "", @@ -74,7 +74,7 @@ public void Example_CreateProject_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { projectKind = "Conversation", settings = new @@ -109,7 +109,7 @@ public async Task Example_CreateProject_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { projectKind = "Conversation", settings = new @@ -2254,7 +2254,7 @@ public void Example_ImportProject_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { projectFileVersion = "", stringIndexType = "Utf16CodeUnit", @@ -2283,7 +2283,7 @@ public async Task Example_ImportProject_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { projectFileVersion = "", stringIndexType = "Utf16CodeUnit", @@ -2312,7 +2312,7 @@ public void Example_ImportProject_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { projectFileVersion = "", stringIndexType = "Utf16CodeUnit", @@ -2446,7 +2446,7 @@ public async Task Example_ImportProject_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { projectFileVersion = "", stringIndexType = "Utf16CodeUnit", @@ -2580,7 +2580,7 @@ public void Example_Train_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { modelLabel = "", trainingMode = "advanced", @@ -2607,7 +2607,7 @@ public async Task Example_Train_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { modelLabel = "", trainingMode = "advanced", @@ -2634,7 +2634,7 @@ public void Example_Train_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { modelLabel = "", trainingConfigVersion = "", @@ -2693,7 +2693,7 @@ public async Task Example_Train_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { modelLabel = "", trainingConfigVersion = "", @@ -2752,7 +2752,7 @@ public void Example_SwapDeployments_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { firstDeploymentName = "", secondDeploymentName = "", @@ -2775,7 +2775,7 @@ public async Task Example_SwapDeployments_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { firstDeploymentName = "", secondDeploymentName = "", @@ -2798,7 +2798,7 @@ public void Example_SwapDeployments_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { firstDeploymentName = "", secondDeploymentName = "", @@ -2838,7 +2838,7 @@ public async Task Example_SwapDeployments_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { firstDeploymentName = "", secondDeploymentName = "", @@ -2878,7 +2878,7 @@ public void Example_DeployProject_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { trainedModelLabel = "", }); @@ -2902,7 +2902,7 @@ public async Task Example_DeployProject_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { trainedModelLabel = "", }); @@ -2926,7 +2926,7 @@ public void Example_DeployProject_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { trainedModelLabel = "", }); @@ -2950,7 +2950,7 @@ public async Task Example_DeployProject_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { trainedModelLabel = "", }); 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 dc3d86ae96b20..d40e51d249566 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 @@ -73,7 +73,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { language = "", }); @@ -88,7 +88,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { description = "", language = "", @@ -119,7 +119,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { language = "", }); @@ -134,7 +134,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { description = "", language = "", @@ -421,7 +421,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateSynonymsAsync("", content); Console.WriteLine(response.Status); @@ -432,7 +432,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { value = new object[] { @@ -459,7 +459,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateSynonyms("", content); Console.WriteLine(response.Status); @@ -470,7 +470,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { value = new object[] { @@ -625,7 +625,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.AddFeedbackAsync("", content); Console.WriteLine(response.Status); @@ -636,7 +636,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { records = new object[] { @@ -661,7 +661,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.AddFeedback("", content); Console.WriteLine(response.Status); @@ -672,7 +672,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { records = new object[] { @@ -1141,7 +1141,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = null; +using RequestContent content = null; Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -1157,7 +1157,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { metadata = new { @@ -1267,7 +1267,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = null; +using RequestContent content = null; Operation operation = client.Import(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -1283,7 +1283,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { metadata = new { @@ -1449,7 +1449,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -1476,7 +1476,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -1512,7 +1512,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -1539,7 +1539,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -1575,7 +1575,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -1597,7 +1597,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -1685,7 +1685,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -1707,7 +1707,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { 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 a55d84118344d..d81cbd6ec4f96 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 @@ -96,7 +96,7 @@ public void Example_CreateProject_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { language = "", }); @@ -114,7 +114,7 @@ public async Task Example_CreateProject_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { language = "", }); @@ -132,7 +132,7 @@ public void Example_CreateProject_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { description = "", language = "", @@ -163,7 +163,7 @@ public async Task Example_CreateProject_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { description = "", language = "", @@ -474,7 +474,7 @@ public void Example_UpdateSynonyms_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateSynonyms("", content); Console.WriteLine(response.Status); @@ -488,7 +488,7 @@ public async Task Example_UpdateSynonyms_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateSynonymsAsync("", content); Console.WriteLine(response.Status); @@ -502,7 +502,7 @@ public void Example_UpdateSynonyms_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { value = new object[] { @@ -529,7 +529,7 @@ public async Task Example_UpdateSynonyms_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { value = new object[] { @@ -696,7 +696,7 @@ public void Example_AddFeedback_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.AddFeedback("", content); Console.WriteLine(response.Status); @@ -710,7 +710,7 @@ public async Task Example_AddFeedback_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.AddFeedbackAsync("", content); Console.WriteLine(response.Status); @@ -724,7 +724,7 @@ public void Example_AddFeedback_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { records = new object[] { @@ -749,7 +749,7 @@ public async Task Example_AddFeedback_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { records = new object[] { @@ -1260,7 +1260,7 @@ public void Example_Import_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = null; + using RequestContent content = null; Operation operation = client.Import(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -1279,7 +1279,7 @@ public async Task Example_Import_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = null; + using RequestContent content = null; Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -1298,7 +1298,7 @@ public void Example_Import_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { metadata = new { @@ -1408,7 +1408,7 @@ public async Task Example_Import_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { metadata = new { @@ -1580,7 +1580,7 @@ public void Example_UpdateSources_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -1610,7 +1610,7 @@ public async Task Example_UpdateSources_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -1640,7 +1640,7 @@ public void Example_UpdateSources_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -1676,7 +1676,7 @@ public async Task Example_UpdateSources_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -1712,7 +1712,7 @@ public void Example_UpdateQnas_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -1737,7 +1737,7 @@ public async Task Example_UpdateQnas_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -1762,7 +1762,7 @@ public void Example_UpdateQnas_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -1850,7 +1850,7 @@ public async Task Example_UpdateQnas_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { diff --git a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs index ef82d5a463e62..d1a78f11e0472 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs @@ -288,8 +288,8 @@ protected CallMedia() { } public virtual System.Threading.Tasks.Task StopHoldMusicAsync(Azure.Communication.CallAutomation.StopHoldMusicOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response StopTranscription(Azure.Communication.CallAutomation.StopTranscriptionOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StopTranscriptionAsync(Azure.Communication.CallAutomation.StopTranscriptionOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateTranscriptionData(string locale, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateTranscriptionDataAsync(string locale, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateTranscription(string locale, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UpdateTranscriptionAsync(string locale, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CallMediaRecognitionType : System.IEquatable diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/CallMedia.cs b/sdk/communication/Azure.Communication.CallAutomation/src/CallMedia.cs index 3e6a845ae74d7..bf628870819fe 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/CallMedia.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/CallMedia.cs @@ -963,14 +963,14 @@ public virtual async Task StopTranscriptionAsync(StopTranscriptionOpti /// Defines new locale for transcription. /// An optional CancellationToken to cancel the request. /// Returns an HTTP response with a 202 status code for success, or an HTTP failure error code in case of an error. - public virtual Response UpdateTranscriptionData(String locale, CancellationToken cancellationToken = default) + public virtual Response UpdateTranscription(String locale, CancellationToken cancellationToken = default) { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(CallMedia)}.{nameof(UpdateTranscriptionData)}"); + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(CallMedia)}.{nameof(UpdateTranscription)}"); scope.Start(); try { - UpdateTranscriptionDataRequestInternal request = new UpdateTranscriptionDataRequestInternal(locale); - return CallMediaRestClient.UpdateTranscriptionData(CallConnectionId, request, cancellationToken); + UpdateTranscriptionRequestInternal request = new UpdateTranscriptionRequestInternal(locale); + return CallMediaRestClient.UpdateTranscription(CallConnectionId, request, cancellationToken); } catch (Exception ex) { @@ -985,14 +985,14 @@ public virtual Response UpdateTranscriptionData(String locale, CancellationToken /// Defines new locale for transcription. /// An optional CancellationToken to cancel the request. /// Returns an HTTP response with a 202 status code for success, or an HTTP failure error code in case of an error. - public virtual async Task UpdateTranscriptionDataAsync(String locale, CancellationToken cancellationToken = default) + public virtual async Task UpdateTranscriptionAsync(String locale, CancellationToken cancellationToken = default) { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(CallMedia)}.{nameof(UpdateTranscriptionData)}"); + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(CallMedia)}.{nameof(UpdateTranscription)}"); scope.Start(); try { - UpdateTranscriptionDataRequestInternal request = new UpdateTranscriptionDataRequestInternal(locale); - return await CallMediaRestClient.UpdateTranscriptionDataAsync(CallConnectionId, request, cancellationToken).ConfigureAwait(false); + UpdateTranscriptionRequestInternal request = new UpdateTranscriptionRequestInternal(locale); + return await CallMediaRestClient.UpdateTranscriptionAsync(CallConnectionId, request, cancellationToken).ConfigureAwait(false); } catch (Exception ex) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallMediaRestClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallMediaRestClient.cs index 7440c371e5289..52474a5d420f2 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallMediaRestClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallMediaRestClient.cs @@ -120,7 +120,7 @@ internal HttpMessage CreateStartTranscriptionRequest(string callConnectionId, St uri.Reset(_endpoint); uri.AppendPath("/calling/callConnections/", false); uri.AppendPath(callConnectionId, true); - uri.AppendPath(":StartTranscription", false); + uri.AppendPath(":startTranscription", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -194,7 +194,7 @@ internal HttpMessage CreateStopTranscriptionRequest(string callConnectionId, Sto uri.Reset(_endpoint); uri.AppendPath("/calling/callConnections/", false); uri.AppendPath(callConnectionId, true); - uri.AppendPath(":StopTranscription", false); + uri.AppendPath(":stopTranscription", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -615,7 +615,7 @@ public Response SendDtmf(string callConnectionId, SendDtmfRequestInternal sendDt } } - internal HttpMessage CreateUpdateTranscriptionDataRequest(string callConnectionId, UpdateTranscriptionDataRequestInternal updateTranscriptionDataRequest) + internal HttpMessage CreateUpdateTranscriptionRequest(string callConnectionId, UpdateTranscriptionRequestInternal updateTranscriptionRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -624,35 +624,35 @@ internal HttpMessage CreateUpdateTranscriptionDataRequest(string callConnectionI uri.Reset(_endpoint); uri.AppendPath("/calling/callConnections/", false); uri.AppendPath(callConnectionId, true); - uri.AppendPath(":updateTranscriptionData", false); + uri.AppendPath(":updateTranscription", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(updateTranscriptionDataRequest); + content.JsonWriter.WriteObjectValue(updateTranscriptionRequest); request.Content = content; return message; } - /// UpdateTranscriptionData Api. + /// UpdateTranscription Api. /// The call connection id. - /// The updateTranscriptionData request. + /// The updateTranscription request. /// The cancellation token to use. - /// or is null. + /// or is null. /// API to change transcription language. - public async Task UpdateTranscriptionDataAsync(string callConnectionId, UpdateTranscriptionDataRequestInternal updateTranscriptionDataRequest, CancellationToken cancellationToken = default) + public async Task UpdateTranscriptionAsync(string callConnectionId, UpdateTranscriptionRequestInternal updateTranscriptionRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (updateTranscriptionDataRequest == null) + if (updateTranscriptionRequest == null) { - throw new ArgumentNullException(nameof(updateTranscriptionDataRequest)); + throw new ArgumentNullException(nameof(updateTranscriptionRequest)); } - using var message = CreateUpdateTranscriptionDataRequest(callConnectionId, updateTranscriptionDataRequest); + using var message = CreateUpdateTranscriptionRequest(callConnectionId, updateTranscriptionRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -663,24 +663,24 @@ public async Task UpdateTranscriptionDataAsync(string callConnectionId } } - /// UpdateTranscriptionData Api. + /// UpdateTranscription Api. /// The call connection id. - /// The updateTranscriptionData request. + /// The updateTranscription request. /// The cancellation token to use. - /// or is null. + /// or is null. /// API to change transcription language. - public Response UpdateTranscriptionData(string callConnectionId, UpdateTranscriptionDataRequestInternal updateTranscriptionDataRequest, CancellationToken cancellationToken = default) + public Response UpdateTranscription(string callConnectionId, UpdateTranscriptionRequestInternal updateTranscriptionRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (updateTranscriptionDataRequest == null) + if (updateTranscriptionRequest == null) { - throw new ArgumentNullException(nameof(updateTranscriptionDataRequest)); + throw new ArgumentNullException(nameof(updateTranscriptionRequest)); } - using var message = CreateUpdateTranscriptionDataRequest(callConnectionId, updateTranscriptionDataRequest); + using var message = CreateUpdateTranscriptionRequest(callConnectionId, updateTranscriptionRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionDataRequestInternal.Serialization.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionRequestInternal.Serialization.cs similarity index 84% rename from sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionDataRequestInternal.Serialization.cs rename to sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionRequestInternal.Serialization.cs index 906f8b8e63761..973bb8756b584 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionDataRequestInternal.Serialization.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionRequestInternal.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.Communication.CallAutomation { - internal partial class UpdateTranscriptionDataRequestInternal : IUtf8JsonSerializable + internal partial class UpdateTranscriptionRequestInternal : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionDataRequestInternal.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionRequestInternal.cs similarity index 74% rename from sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionDataRequestInternal.cs rename to sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionRequestInternal.cs index 8d4f6ee07a320..2a1d3954d6ceb 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionDataRequestInternal.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/UpdateTranscriptionRequestInternal.cs @@ -10,13 +10,13 @@ namespace Azure.Communication.CallAutomation { - /// The UpdateTranscriptionDataRequest. - internal partial class UpdateTranscriptionDataRequestInternal + /// The UpdateTranscriptionRequest. + internal partial class UpdateTranscriptionRequestInternal { - /// Initializes a new instance of UpdateTranscriptionDataRequestInternal. + /// Initializes a new instance of UpdateTranscriptionRequestInternal. /// Defines new locale for transcription. /// is null. - public UpdateTranscriptionDataRequestInternal(string locale) + public UpdateTranscriptionRequestInternal(string locale) { Argument.AssertNotNull(locale, nameof(locale)); diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/UpdateTranscriptionDataRequestInternal.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/UpdateTranscriptionRequestInternal.cs similarity index 60% rename from sdk/communication/Azure.Communication.CallAutomation/src/Models/UpdateTranscriptionDataRequestInternal.cs rename to sdk/communication/Azure.Communication.CallAutomation/src/Models/UpdateTranscriptionRequestInternal.cs index 7af734778a475..722c1966eba7b 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/UpdateTranscriptionDataRequestInternal.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/UpdateTranscriptionRequestInternal.cs @@ -5,8 +5,8 @@ namespace Azure.Communication.CallAutomation { - [CodeGenModel("UpdateTranscriptionDataRequest")] - internal partial class UpdateTranscriptionDataRequestInternal + [CodeGenModel("UpdateTranscriptionRequest")] + internal partial class UpdateTranscriptionRequestInternal { } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md b/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md index 05780b53406c4..456b73e165bfa 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md +++ b/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md @@ -12,6 +12,7 @@ tag: package-2023-01-15-preview require: - https://github.com/williamzhao87/azure-rest-api-specs/blob/5b7321a923a30b83b978e3a30ed1d497e35052fd/specification/communication/data-plane/CallAutomation/readme.md + title: Azure Communication Services generation1-convenience-client: true diff --git a/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs b/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs index 7a3ecb793aa51..df9631b1f37a2 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs @@ -397,7 +397,7 @@ public void GetCallMediaTest() } [TestCaseSource(nameof(TestData_MuteParticipant))] - public void MuteParticipant_200Accepted(CommunicationIdentifier participant) + public void MuteParticipant_200OK(CommunicationIdentifier participant) { var callConnection = CreateMockCallConnection(200, OperationContextPayload); @@ -417,7 +417,7 @@ public void UnmuteParticipant_202Accepted(CommunicationIdentifier participant) } [TestCaseSource(nameof(TestData_MuteParticipant))] - public void MuteParticipant_WithOptions_200Accepted(CommunicationIdentifier participant) + public void MuteParticipant_WithOptions_200OK(CommunicationIdentifier participant) { var callConnection = CreateMockCallConnection(200, OperationContextPayload); var options = new MuteParticipantsOptions(new List { participant }) @@ -444,7 +444,7 @@ public void UnmuteParticipant_WithOptions_202Accepted(CommunicationIdentifier pa } [TestCaseSource(nameof(TestData_MuteParticipant))] - public async Task MuteParticipantAsync_200Accepted(CommunicationIdentifier participant) + public async Task MuteParticipantAsync_200OK(CommunicationIdentifier participant) { var callConnection = CreateMockCallConnection(200, OperationContextPayload); @@ -480,7 +480,7 @@ public void UnmuteParticipantAsync_NotAcsUser_400BadRequest() } [TestCaseSource(nameof(TestData_MuteParticipant))] - public async Task MuteParticipantAsync_WithOptions_200Accepted(CommunicationIdentifier participant) + public async Task MuteParticipantAsync_WithOptions_200OK(CommunicationIdentifier participant) { var callConnection = CreateMockCallConnection(200, OperationContextPayload); var options = new MuteParticipantsOptions(new List { participant }) diff --git a/sdk/communication/Azure.Communication.CallAutomation/tests/CallMedias/CallMediaTests.cs b/sdk/communication/Azure.Communication.CallAutomation/tests/CallMedias/CallMediaTests.cs index 1f804926efe04..283d70a6e799d 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/tests/CallMedias/CallMediaTests.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/tests/CallMedias/CallMediaTests.cs @@ -237,8 +237,8 @@ public async Task StopTranscriptionOperationsAsync_Return202Accepted(Func> operation) + [TestCaseSource(nameof(TestData_UpdateTranscriptionOperationsAsync))] + public async Task UpdateTranscriptionOperationsAsync_Return202Accepted(Func> operation) { _callMedia = GetCallMedia(202); var result = await operation(_callMedia); @@ -318,8 +318,8 @@ public void StopTranscriptionOperations_Return202Accepted(Func operation) + [TestCaseSource(nameof(TestData_UpdateTranscriptionOperations))] + public void UpdateTranscriptionOperations_Return202Accepted(Func operation) { _callMedia = GetCallMedia(202); var result = operation(_callMedia); @@ -397,8 +397,8 @@ public void StartTranscriptionOperationsAsync_Return404NotFound(Func> operation) + [TestCaseSource(nameof(TestData_UpdateTranscriptionOperationsAsync))] + public void UpdateTranscriptionOperationsAsync_Return404NotFound(Func> operation) { _callMedia = GetCallMedia(404); RequestFailedException? ex = Assert.ThrowsAsync( @@ -507,8 +507,8 @@ public void StopTranscriptionOperations_Return404NotFound(Func operation) + [TestCaseSource(nameof(TestData_UpdateTranscriptionOperations))] + public void UpdateTranscriptionOperations_Return404NotFound(Func operation) { _callMedia = GetCallMedia(404); RequestFailedException? ex = Assert.Throws( @@ -820,24 +820,24 @@ public void HoldMusicOperations_Return200Ok(Func operation) }; } - private static IEnumerable TestData_UpdateTranscriptionDataOperations() + private static IEnumerable TestData_UpdateTranscriptionOperations() { return new[] { new Func?[] { - callMedia => callMedia.UpdateTranscriptionData("locale") + callMedia => callMedia.UpdateTranscription("locale") } }; } - private static IEnumerable TestData_UpdateTranscriptionDataOperationsAsync() + private static IEnumerable TestData_UpdateTranscriptionOperationsAsync() { return new[] { new Func>?[] { - callMedia => callMedia.UpdateTranscriptionDataAsync("locale") + callMedia => callMedia.UpdateTranscriptionAsync("locale") } }; } diff --git a/sdk/communication/Azure.Communication.Messages/CHANGELOG.md b/sdk/communication/Azure.Communication.Messages/CHANGELOG.md new file mode 100644 index 0000000000000..2324adc0f8ca5 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/CHANGELOG.md @@ -0,0 +1,20 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.1 (2023-08-15) + +This is the first Public Preview release of Azure Communication Services for advanced messages. For more information, please see the [README][read_me] and [documentation][documentation]. + +This is a Public Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). + + +[read_me]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/communication/Azure.Communication.Messages/README.md diff --git a/sdk/communication/Azure.Communication.Messages/README.md b/sdk/communication/Azure.Communication.Messages/README.md new file mode 100644 index 0000000000000..090d7029c8099 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/README.md @@ -0,0 +1,100 @@ +# Azure Communication Messages client library for .NET + +This package contains a C# SDK for Azure Communication Messages Services. + +[Source code][source] | [Package (NuGet)][package] | [Product documentation][product_docs] + + +## Getting started + +### Install the package +Install the Azure Communication Messages client library for .NET with [NuGet][nuget]: + +```dotnetcli +dotnet add package Azure.Communication.Messages --prerelease +``` + +### Prerequisites +You need an [Azure subscription][azure_sub] and a [Communication Service Resource][communication_resource_docs] to use this package. + +To create a new Communication Service, you can use the [Azure Portal][communication_resource_create_portal], the [Azure PowerShell][communication_resource_create_power_shell], or the [.NET management client library][communication_resource_create_net]. + +### Key concepts +`NotificationMessagesClient` provides the functionality to send notification messages . + +### Using statements +```C# +using Azure.Communication.Messages; +``` + +### Authenticate the client +#### Connection String +Messages clients can be authenticated using the connection string acquired from an Azure Communication Resource in the [Azure Portal][azure_portal]. + +```C# +var connectionString = ""; // Find your Communication Services resource in the Azure portal +NotificationMessagesClient notificationMessagesClient = new NotificationMessagesClient(connectionString); +MessageTemplateClient messageTemplateClient = new MessageTemplateClient(connectionString); +``` + +## Examples +### Send an Notification Message +To send a notification message, call the `SendMessage` or `SendMessageAsync` function from the `NotificationMessagesClient`. + +#### Send a text message +```C# +// Create the recipient list, currently only one recipient is supported +var recipient = new List { "" }; +var options = new SendMessageOptions("", recipient, "Come on everyone, let's go for lunch together."); +SendMessageResult result = await notificationMessagesClient.SendMessageAsync(options); +Console.WriteLine($"Message id: {result.Receipts[0].MessageId}"); +``` + +#### Send a template message +```C# +// Create the recipient list, currently only one recipient is supported +var recipient = new List { "" }; +string templateName = "sample_template"; +string templateLanguage = "en_us"; +var messageTemplate = new MessageTemplate(templateName, templateLanguage); +var sendTemplateMessageOptions = new SendMessageOptions(channelRegistrationId, recipientList, messageTemplate); +SendMessageResult result = await notificationMessagesClient.SendMessageAsync(sendTemplateMessageOptions); +Console.WriteLine($"Message id: {result.Receipts[0].MessageId}"); +``` + +#### Send a media message +```C# +// Create the recipient list, currently only one recipient is supported +var recipient = new List { "" }; +var uri = new Uri("https://aka.ms/acsicon1"); +var sendMediaMessageOptions = new SendMessageOptions(channelRegistrationId, recipientList, uri); +SendMessageResult result = await notificationMessagesClient.SendMessageAsync(sendMediaMessageOptions); +Console.WriteLine($"Message id: {result.Receipts[0].MessageId}"); +``` + +### Retrieve templates +To retrieve templates, call the `GetMessages` or `GetMessagesAsync` function from the `MessageTemplateClient`. + + +```C# +AsyncPageable templates = messageTemplateClient.GetTemplatesAsync(channelId); +await foreach (MessageTemplateItem template in templates) +{ + Console.WriteLine($"{template.Name}"); +} +``` + +## Troubleshooting +A `RequestFailedException` is thrown as a service response for any unsuccessful requests. The exception contains information about what response code was returned from the service. + +## Next steps +- Read more about Messages in Azure Communication Services (Link to be added). +- Read more about how to set up Event Grid subscription for new message and message delivery status (Link to be added). + + +## Contributing +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla]. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + diff --git a/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs b/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs new file mode 100644 index 0000000000000..da475957b2e2a --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs @@ -0,0 +1,240 @@ +namespace Azure.Communication.Messages +{ + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CommunicationMessagesChannelType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CommunicationMessagesChannelType(string value) { throw null; } + public static Azure.Communication.Messages.CommunicationMessagesChannelType WhatsApp { get { throw null; } } + public bool Equals(Azure.Communication.Messages.CommunicationMessagesChannelType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Communication.Messages.CommunicationMessagesChannelType left, Azure.Communication.Messages.CommunicationMessagesChannelType right) { throw null; } + public static implicit operator Azure.Communication.Messages.CommunicationMessagesChannelType (string value) { throw null; } + public static bool operator !=(Azure.Communication.Messages.CommunicationMessagesChannelType left, Azure.Communication.Messages.CommunicationMessagesChannelType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CommunicationMessagesClientOptions : Azure.Core.ClientOptions + { + public CommunicationMessagesClientOptions(Azure.Communication.Messages.CommunicationMessagesClientOptions.ServiceVersion version = Azure.Communication.Messages.CommunicationMessagesClientOptions.ServiceVersion.V2023_08_24_Preview) { } + public enum ServiceVersion + { + V2023_08_24_Preview = 1, + } + } + public static partial class CommunicationMessagesModelFactory + { + public static Azure.Communication.Messages.MessageReceipt MessageReceipt(string messageId = null, string to = null) { throw null; } + public static Azure.Communication.Messages.SendMessageResult SendMessageResult(System.Collections.Generic.IEnumerable receipts = null) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CommunicationMessageType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CommunicationMessageType(string value) { throw null; } + public static Azure.Communication.Messages.CommunicationMessageType Image { get { throw null; } } + public static Azure.Communication.Messages.CommunicationMessageType Template { get { throw null; } } + public static Azure.Communication.Messages.CommunicationMessageType Text { get { throw null; } } + public bool Equals(Azure.Communication.Messages.CommunicationMessageType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Communication.Messages.CommunicationMessageType left, Azure.Communication.Messages.CommunicationMessageType right) { throw null; } + public static implicit operator Azure.Communication.Messages.CommunicationMessageType (string value) { throw null; } + public static bool operator !=(Azure.Communication.Messages.CommunicationMessageType left, Azure.Communication.Messages.CommunicationMessageType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MessageReceipt + { + internal MessageReceipt() { } + public string MessageId { get { throw null; } } + public string To { get { throw null; } } + } + public partial class MessageTemplate + { + public MessageTemplate(string name, string language, System.Collections.Generic.IEnumerable values = null, Azure.Communication.Messages.MessageTemplateBindings bindings = null) { } + public Azure.Communication.Messages.MessageTemplateBindings Bindings { get { throw null; } } + public string Language { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IEnumerable Values { get { throw null; } } + } + public abstract partial class MessageTemplateBindings + { + public MessageTemplateBindings() { } + internal abstract Azure.Communication.Messages.MessageTemplateBindingsInternal ToMessageTemplateBindingsInternal(); + } + public partial class MessageTemplateClient + { + protected MessageTemplateClient() { } + public MessageTemplateClient(string connectionString) { } + public MessageTemplateClient(string connectionString, Azure.Communication.Messages.CommunicationMessagesClientOptions options) { } + public MessageTemplateClient(System.Uri endpoint, Azure.AzureKeyCredential keyCredential, Azure.Communication.Messages.CommunicationMessagesClientOptions options = null) { } + public virtual Azure.Pageable GetTemplates(string channelRegistrationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTemplatesAsync(string channelRegistrationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MessageTemplateDocument : Azure.Communication.Messages.MessageTemplateValue + { + public MessageTemplateDocument(string name, System.Uri uri, string caption = null, string fileName = null) : base (default(string)) { } + public string Caption { get { throw null; } set { } } + public string FileName { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } + public partial class MessageTemplateImage : Azure.Communication.Messages.MessageTemplateValue + { + public MessageTemplateImage(string name, System.Uri uri, string caption = null, string fileName = null) : base (default(string)) { } + public string Caption { get { throw null; } set { } } + public string FileName { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } + public partial class MessageTemplateItem + { + internal MessageTemplateItem() { } + public Azure.Communication.Messages.CommunicationMessagesChannelType? ChannelType { get { throw null; } } + public string Language { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Communication.Messages.TemplateStatus? Status { get { throw null; } } + public Azure.Communication.Messages.MessageTemplateItemWhatsApp WhatsApp { get { throw null; } } + } + public partial class MessageTemplateItemWhatsApp + { + internal MessageTemplateItemWhatsApp() { } + public System.BinaryData Content { get { throw null; } } + } + public partial class MessageTemplateLocation : Azure.Communication.Messages.MessageTemplateValue + { + public MessageTemplateLocation(string name, double latitude, double longitude, string locationName = null, string address = null) : base (default(string)) { } + public string Address { get { throw null; } set { } } + public double Latitude { get { throw null; } set { } } + public string LocationName { get { throw null; } set { } } + public double Longitude { get { throw null; } set { } } + } + public partial class MessageTemplateQuickAction : Azure.Communication.Messages.MessageTemplateValue + { + public MessageTemplateQuickAction(string name, string text = null, string payload = null) : base (default(string)) { } + public string Payload { get { throw null; } set { } } + public string Text { get { throw null; } set { } } + } + public partial class MessageTemplateText : Azure.Communication.Messages.MessageTemplateValue + { + public MessageTemplateText(string name, string text) : base (default(string)) { } + public string Text { get { throw null; } set { } } + } + public abstract partial class MessageTemplateValue + { + public MessageTemplateValue(string name) { } + public string Name { get { throw null; } } + internal abstract Azure.Communication.Messages.MessageTemplateValueInternal ToMessageTemplateValueInternal(); + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MessageTemplateValueKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MessageTemplateValueKind(string value) { throw null; } + public static Azure.Communication.Messages.MessageTemplateValueKind Document { get { throw null; } } + public static Azure.Communication.Messages.MessageTemplateValueKind Image { get { throw null; } } + public static Azure.Communication.Messages.MessageTemplateValueKind Location { get { throw null; } } + public static Azure.Communication.Messages.MessageTemplateValueKind QuickAction { get { throw null; } } + public static Azure.Communication.Messages.MessageTemplateValueKind Text { get { throw null; } } + public static Azure.Communication.Messages.MessageTemplateValueKind Video { get { throw null; } } + public bool Equals(Azure.Communication.Messages.MessageTemplateValueKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Communication.Messages.MessageTemplateValueKind left, Azure.Communication.Messages.MessageTemplateValueKind right) { throw null; } + public static implicit operator Azure.Communication.Messages.MessageTemplateValueKind (string value) { throw null; } + public static bool operator !=(Azure.Communication.Messages.MessageTemplateValueKind left, Azure.Communication.Messages.MessageTemplateValueKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MessageTemplateValueWhatsAppSubType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MessageTemplateValueWhatsAppSubType(string value) { throw null; } + public static Azure.Communication.Messages.MessageTemplateValueWhatsAppSubType QuickReply { get { throw null; } } + public static Azure.Communication.Messages.MessageTemplateValueWhatsAppSubType Url { get { throw null; } } + public bool Equals(Azure.Communication.Messages.MessageTemplateValueWhatsAppSubType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Communication.Messages.MessageTemplateValueWhatsAppSubType left, Azure.Communication.Messages.MessageTemplateValueWhatsAppSubType right) { throw null; } + public static implicit operator Azure.Communication.Messages.MessageTemplateValueWhatsAppSubType (string value) { throw null; } + public static bool operator !=(Azure.Communication.Messages.MessageTemplateValueWhatsAppSubType left, Azure.Communication.Messages.MessageTemplateValueWhatsAppSubType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MessageTemplateVideo : Azure.Communication.Messages.MessageTemplateValue + { + public MessageTemplateVideo(string name, System.Uri uri, string caption = null, string fileName = null) : base (default(string)) { } + public string Caption { get { throw null; } set { } } + public string FileName { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } + public partial class MessageTemplateWhatsAppBindings : Azure.Communication.Messages.MessageTemplateBindings + { + public MessageTemplateWhatsAppBindings(System.Collections.Generic.IEnumerable header = null, System.Collections.Generic.IEnumerable body = null, System.Collections.Generic.IEnumerable footer = null, System.Collections.Generic.IEnumerable> button = null) { } + public System.Collections.Generic.IEnumerable Body { get { throw null; } } + public System.Collections.Generic.IEnumerable> Button { get { throw null; } } + public System.Collections.Generic.IEnumerable Footer { get { throw null; } } + public System.Collections.Generic.IEnumerable Header { get { throw null; } } + } + public partial class NotificationMessagesClient + { + protected NotificationMessagesClient() { } + public NotificationMessagesClient(string connectionString) { } + public NotificationMessagesClient(string connectionString, Azure.Communication.Messages.CommunicationMessagesClientOptions options) { } + public NotificationMessagesClient(System.Uri endpoint, Azure.AzureKeyCredential keyCredential, Azure.Communication.Messages.CommunicationMessagesClientOptions options = null) { } + public virtual Azure.Response DownloadMedia(string mediaContentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DownloadMediaAsync(string mediaContentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DownloadMediaTo(string mediaContentId, System.IO.Stream destinationStream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DownloadMediaTo(string mediaContentId, string destinationPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DownloadMediaToAsync(string mediaContentId, System.IO.Stream destinationStream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DownloadMediaToAsync(string mediaContentId, string destinationPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SendMessage(Azure.Communication.Messages.SendMessageOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SendMessageAsync(Azure.Communication.Messages.SendMessageOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SendMessageOptions + { + public SendMessageOptions(string channelRegistrationId, System.Collections.Generic.IEnumerable to, Azure.Communication.Messages.MessageTemplate template) { } + public SendMessageOptions(string channelRegistrationId, System.Collections.Generic.IEnumerable to, string content) { } + public SendMessageOptions(string channelRegistrationId, System.Collections.Generic.IEnumerable to, System.Uri mediaUri, string content = null) { } + public string ChannelRegistrationId { get { throw null; } } + public string Content { get { throw null; } } + public System.Uri MediaUri { get { throw null; } } + public Azure.Communication.Messages.CommunicationMessageType MessageType { get { throw null; } } + public Azure.Communication.Messages.MessageTemplate Template { get { throw null; } } + public System.Collections.Generic.IEnumerable To { get { throw null; } } + } + public partial class SendMessageResult + { + internal SendMessageResult() { } + public System.Collections.Generic.IReadOnlyList Receipts { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TemplateStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TemplateStatus(string value) { throw null; } + public static Azure.Communication.Messages.TemplateStatus Approved { get { throw null; } } + public static Azure.Communication.Messages.TemplateStatus Paused { get { throw null; } } + public static Azure.Communication.Messages.TemplateStatus Pending { get { throw null; } } + public static Azure.Communication.Messages.TemplateStatus Rejected { get { throw null; } } + public bool Equals(Azure.Communication.Messages.TemplateStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Communication.Messages.TemplateStatus left, Azure.Communication.Messages.TemplateStatus right) { throw null; } + public static implicit operator Azure.Communication.Messages.TemplateStatus (string value) { throw null; } + public static bool operator !=(Azure.Communication.Messages.TemplateStatus left, Azure.Communication.Messages.TemplateStatus right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Azure.Communication.Messages.csproj b/sdk/communication/Azure.Communication.Messages/src/Azure.Communication.Messages.csproj new file mode 100644 index 0000000000000..7726215345b5e --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Azure.Communication.Messages.csproj @@ -0,0 +1,27 @@ + + + + + This client library enables working with the Microsoft Azure Communication Messages service. + + Azure Communication Messages Service + 1.0.0-beta.2 + Microsoft Azure Communication Messages Service;Microsoft;Azure;Azure Communication Service;Azure Communication Messages Service;Messages;Communication + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + + + + + diff --git a/sdk/communication/Azure.Communication.Messages/src/CommunicationMessagesClientOptions.cs b/sdk/communication/Azure.Communication.Messages/src/CommunicationMessagesClientOptions.cs new file mode 100644 index 0000000000000..8207ac74eafbf --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/CommunicationMessagesClientOptions.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// + /// The options for communication and . + /// + public class CommunicationMessagesClientOptions : ClientOptions + { + /// + /// The latest version of the Chat service. + /// + internal const ServiceVersion LatestVersion = ServiceVersion.V2023_08_24_Preview; + + internal string ApiVersion { get; } + + /// + /// Initializes a new instance of the . + /// + public CommunicationMessagesClientOptions(ServiceVersion version = LatestVersion) + { + ApiVersion = version switch + { + ServiceVersion.V2023_08_24_Preview => "2023-08-24-preview", + _ => throw new ArgumentOutOfRangeException(nameof(version)), + }; + } + + /// + /// The Messages service version. + /// + public enum ServiceVersion + { + /// + /// The V1 of the Messages service. + /// + #pragma warning disable CA1707 // Identifiers should not contain underscores + #pragma warning disable AZC0016 // Invalid ServiceVersion member name. + V2023_08_24_Preview = 1 + #pragma warning restore AZC0016 // Invalid ServiceVersion member name. + #pragma warning restore CA1707 // Identifiers should not contain underscores + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs new file mode 100644 index 0000000000000..e09c9d3b3bae7 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Communication.Messages +{ + /// Model factory for models. + public static partial class CommunicationMessagesModelFactory + { + /// Initializes a new instance of SendMessageResult. + /// Receipts of the send message operation. + /// A new instance for mocking. + public static SendMessageResult SendMessageResult(IEnumerable receipts = null) + { + receipts ??= new List(); + + return new SendMessageResult(receipts?.ToList()); + } + + /// Initializes a new instance of MessageReceipt. + /// The message id. + /// The native external platform user identifier of the recipient. + /// or is null. + /// A new instance for mocking. + public static MessageReceipt MessageReceipt(string messageId = null, string to = null) + { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + + return new MessageReceipt(messageId, to); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationError.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationError.Serialization.cs new file mode 100644 index 0000000000000..109ebdd2b6d72 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationError.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class CommunicationError + { + internal static CommunicationError DeserializeCommunicationError(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + Optional target = default; + Optional> details = default; + Optional innererror = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeCommunicationError(item)); + } + details = array; + continue; + } + if (property.NameEquals("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = DeserializeCommunicationError(property.Value); + continue; + } + } + return new CommunicationError(code, message, target.Value, Optional.ToList(details), innererror.Value); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationError.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationError.cs new file mode 100644 index 0000000000000..c297fa4129e6b --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationError.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The Communication Services error. + internal partial class CommunicationError + { + /// Initializes a new instance of CommunicationError. + /// The error code. + /// The error message. + /// or is null. + internal CommunicationError(string code, string message) + { + Argument.AssertNotNull(code, nameof(code)); + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of CommunicationError. + /// The error code. + /// The error message. + /// The error target. + /// Further details about specific errors that led to this error. + /// The inner error if any. + internal CommunicationError(string code, string message, string target, IReadOnlyList details, CommunicationError innerError) + { + Code = code; + Message = message; + Target = target; + Details = details; + InnerError = innerError; + } + + /// The error code. + public string Code { get; } + /// The error message. + public string Message { get; } + /// The error target. + public string Target { get; } + /// Further details about specific errors that led to this error. + public IReadOnlyList Details { get; } + /// The inner error if any. + public CommunicationError InnerError { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationErrorResponse.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationErrorResponse.Serialization.cs new file mode 100644 index 0000000000000..e40c439387cf6 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationErrorResponse.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Communication.Messages +{ + internal partial class CommunicationErrorResponse + { + internal static CommunicationErrorResponse DeserializeCommunicationErrorResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationError error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error"u8)) + { + error = CommunicationError.DeserializeCommunicationError(property.Value); + continue; + } + } + return new CommunicationErrorResponse(error); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationErrorResponse.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationErrorResponse.cs new file mode 100644 index 0000000000000..c3af707cfcf85 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationErrorResponse.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The Communication Services error. + internal partial class CommunicationErrorResponse + { + /// Initializes a new instance of CommunicationErrorResponse. + /// The Communication Services error. + /// is null. + internal CommunicationErrorResponse(CommunicationError error) + { + Argument.AssertNotNull(error, nameof(error)); + + Error = error; + } + + /// The Communication Services error. + public CommunicationError Error { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationMessageType.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationMessageType.cs new file mode 100644 index 0000000000000..3ed021efa15da --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationMessageType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Communication.Messages +{ + /// The type of message. Supports text, image, template. + public readonly partial struct CommunicationMessageType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CommunicationMessageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextValue = "text"; + private const string ImageValue = "image"; + private const string TemplateValue = "template"; + + /// text. + public static CommunicationMessageType Text { get; } = new CommunicationMessageType(TextValue); + /// image. + public static CommunicationMessageType Image { get; } = new CommunicationMessageType(ImageValue); + /// template. + public static CommunicationMessageType Template { get; } = new CommunicationMessageType(TemplateValue); + /// Determines if two values are the same. + public static bool operator ==(CommunicationMessageType left, CommunicationMessageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CommunicationMessageType left, CommunicationMessageType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CommunicationMessageType(string value) => new CommunicationMessageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CommunicationMessageType other && Equals(other); + /// + public bool Equals(CommunicationMessageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationMessagesChannelType.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationMessagesChannelType.cs new file mode 100644 index 0000000000000..1daf9a3f7c073 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/CommunicationMessagesChannelType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Communication.Messages +{ + /// The ChannelType. + public readonly partial struct CommunicationMessagesChannelType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CommunicationMessagesChannelType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WhatsAppValue = "whatsApp"; + + /// whatsApp. + public static CommunicationMessagesChannelType WhatsApp { get; } = new CommunicationMessagesChannelType(WhatsAppValue); + /// Determines if two values are the same. + public static bool operator ==(CommunicationMessagesChannelType left, CommunicationMessagesChannelType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CommunicationMessagesChannelType left, CommunicationMessagesChannelType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CommunicationMessagesChannelType(string value) => new CommunicationMessagesChannelType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CommunicationMessagesChannelType other && Equals(other); + /// + public bool Equals(CommunicationMessagesChannelType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/ListTemplatesResponse.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/ListTemplatesResponse.Serialization.cs new file mode 100644 index 0000000000000..8692ecadf8044 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/ListTemplatesResponse.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class ListTemplatesResponse + { + internal static ListTemplatesResponse DeserializeListTemplatesResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TemplateResponseInternal.DeserializeTemplateResponseInternal(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ListTemplatesResponse(value, nextLink.Value); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/ListTemplatesResponse.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/ListTemplatesResponse.cs new file mode 100644 index 0000000000000..0f3fbe73aa62e --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/ListTemplatesResponse.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The ListTemplatesResponse. + internal partial class ListTemplatesResponse + { + /// Initializes a new instance of ListTemplatesResponse. + /// The collection of elements. + /// is null. + internal ListTemplatesResponse(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of ListTemplatesResponse. + /// The collection of elements. + /// + internal ListTemplatesResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The collection of elements. + public IReadOnlyList Value { get; } + /// Gets the next link. + public string NextLink { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageReceipt.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageReceipt.Serialization.cs new file mode 100644 index 0000000000000..7addd236cd54c --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageReceipt.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Communication.Messages +{ + public partial class MessageReceipt + { + internal static MessageReceipt DeserializeMessageReceipt(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageId = default; + string to = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("to"u8)) + { + to = property.Value.GetString(); + continue; + } + } + return new MessageReceipt(messageId, to); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageReceipt.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageReceipt.cs new file mode 100644 index 0000000000000..f7b93911259bc --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageReceipt.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// Receipt of the sending one message. + public partial class MessageReceipt + { + /// Initializes a new instance of MessageReceipt. + /// The message id. + /// The native external platform user identifier of the recipient. + /// or is null. + internal MessageReceipt(string messageId, string to) + { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(to, nameof(to)); + + MessageId = messageId; + To = to; + } + + /// The message id. + public string MessageId { get; } + /// The native external platform user identifier of the recipient. + public string To { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsInternal.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsInternal.Serialization.cs new file mode 100644 index 0000000000000..146ef7888916c --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsInternal.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class MessageTemplateBindingsInternal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(WhatsApp)) + { + writer.WritePropertyName("whatsApp"u8); + writer.WriteObjectValue(WhatsApp); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsInternal.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsInternal.cs new file mode 100644 index 0000000000000..a4ffd716f099f --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsInternal.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Communication.Messages +{ + /// The binding object to link values to the template specific locations. + internal partial class MessageTemplateBindingsInternal + { + /// Initializes a new instance of MessageTemplateBindingsInternal. + public MessageTemplateBindingsInternal() + { + } + + /// The template bindings for WhatsApp. + public MessageTemplateBindingsWhatsApp WhatsApp { get; set; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsApp.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsApp.Serialization.cs new file mode 100644 index 0000000000000..46131cdcd2251 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsApp.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class MessageTemplateBindingsWhatsApp : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Header)) + { + writer.WritePropertyName("header"u8); + writer.WriteStartArray(); + foreach (var item in Header) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Body)) + { + writer.WritePropertyName("body"u8); + writer.WriteStartArray(); + foreach (var item in Body) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Footer)) + { + writer.WritePropertyName("footer"u8); + writer.WriteStartArray(); + foreach (var item in Footer) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Button)) + { + writer.WritePropertyName("button"u8); + writer.WriteStartArray(); + foreach (var item in Button) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsApp.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsApp.cs new file mode 100644 index 0000000000000..b37c76c23d4ab --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsApp.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The template bindings for WhatsApp. + internal partial class MessageTemplateBindingsWhatsApp + { + /// Initializes a new instance of MessageTemplateBindingsWhatsApp. + public MessageTemplateBindingsWhatsApp() + { + Header = new ChangeTrackingList(); + Body = new ChangeTrackingList(); + Footer = new ChangeTrackingList(); + Button = new ChangeTrackingList(); + } + + /// Gets the header. + public IList Header { get; } + /// Gets the body. + public IList Body { get; } + /// Gets the footer. + public IList Footer { get; } + /// Gets the button. + public IList Button { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppButton.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppButton.Serialization.cs new file mode 100644 index 0000000000000..197b0674a0954 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppButton.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class MessageTemplateBindingsWhatsAppButton : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SubType)) + { + writer.WritePropertyName("subType"u8); + writer.WriteStringValue(SubType.Value.ToString()); + } + writer.WritePropertyName("refValue"u8); + writer.WriteStringValue(RefValue); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppButton.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppButton.cs new file mode 100644 index 0000000000000..2b7dc1d93acb8 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppButton.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The template bindings component button for WhatsApp. + internal partial class MessageTemplateBindingsWhatsAppButton + { + /// Initializes a new instance of MessageTemplateBindingsWhatsAppButton. + /// The reference to the value in the Microsoft.Azure.Communication.CrossPlatformMessages.Contract.Model.Notifications.V1.Requests.MessageTemplate.Values dictionary. + /// is null. + public MessageTemplateBindingsWhatsAppButton(string refValue) + { + Argument.AssertNotNull(refValue, nameof(refValue)); + + RefValue = refValue; + } + + /// The WhatsApp button sub type. + public MessageTemplateValueWhatsAppSubType? SubType { get; set; } + /// The reference to the value in the Microsoft.Azure.Communication.CrossPlatformMessages.Contract.Model.Notifications.V1.Requests.MessageTemplate.Values dictionary. + public string RefValue { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppComponent.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppComponent.Serialization.cs new file mode 100644 index 0000000000000..2e7842eaa3ee0 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppComponent.Serialization.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class MessageTemplateBindingsWhatsAppComponent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("refValue"u8); + writer.WriteStringValue(RefValue); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppComponent.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppComponent.cs new file mode 100644 index 0000000000000..6a3cb7239d25d --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateBindingsWhatsAppComponent.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The template bindings component for WhatsApp. + internal partial class MessageTemplateBindingsWhatsAppComponent + { + /// Initializes a new instance of MessageTemplateBindingsWhatsAppComponent. + /// The reference to the value in the Microsoft.Azure.Communication.CrossPlatformMessages.Contract.Model.Notifications.V1.Requests.MessageTemplate.Values dictionary. + /// is null. + public MessageTemplateBindingsWhatsAppComponent(string refValue) + { + Argument.AssertNotNull(refValue, nameof(refValue)); + + RefValue = refValue; + } + + /// The reference to the value in the Microsoft.Azure.Communication.CrossPlatformMessages.Contract.Model.Notifications.V1.Requests.MessageTemplate.Values dictionary. + public string RefValue { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateInternal.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateInternal.Serialization.cs new file mode 100644 index 0000000000000..d0c8b11608d45 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateInternal.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class MessageTemplateInternal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + if (Optional.IsCollectionDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStartObject(); + foreach (var item in Values) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Bindings)) + { + writer.WritePropertyName("bindings"u8); + writer.WriteObjectValue(Bindings); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateInternal.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateInternal.cs new file mode 100644 index 0000000000000..d85831bb3029d --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateInternal.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The template object used to create templates. + internal partial class MessageTemplateInternal + { + /// Initializes a new instance of MessageTemplateInternal. + /// Name of the template. + /// The codes for the supported languages for templates. + /// or is null. + public MessageTemplateInternal(string name, string language) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(language, nameof(language)); + + Name = name; + Language = language; + Values = new ChangeTrackingDictionary(); + } + + /// Name of the template. + public string Name { get; } + /// The codes for the supported languages for templates. + public string Language { get; } + /// The template values. + public IDictionary Values { get; } + /// The binding object to link values to the template specific locations. + public MessageTemplateBindingsInternal Bindings { get; set; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateParameterLocation.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateParameterLocation.Serialization.cs new file mode 100644 index 0000000000000..4616d5da431d0 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateParameterLocation.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class MessageTemplateParameterLocation : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"u8); + writer.WriteStringValue(Address); + } + if (Optional.IsDefined(Latitude)) + { + writer.WritePropertyName("latitude"u8); + writer.WriteNumberValue(Latitude.Value); + } + if (Optional.IsDefined(Longitude)) + { + writer.WritePropertyName("longitude"u8); + writer.WriteNumberValue(Longitude.Value); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateParameterLocation.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateParameterLocation.cs new file mode 100644 index 0000000000000..fd5a0ee21d3f6 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateParameterLocation.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Communication.Messages +{ + /// The message template's location value information. + internal partial class MessageTemplateParameterLocation + { + /// Initializes a new instance of MessageTemplateParameterLocation. + public MessageTemplateParameterLocation() + { + } + + /// The [Optional] name of the location. + public string Name { get; set; } + /// The [Optional] address of the location. + public string Address { get; set; } + /// The latitude of the location. + public double? Latitude { get; set; } + /// The longitude of the location. + public double? Longitude { get; set; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueInternal.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueInternal.Serialization.cs new file mode 100644 index 0000000000000..778655c72a2bb --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueInternal.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class MessageTemplateValueInternal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteObjectValue(Text); + } + if (Optional.IsDefined(Image)) + { + writer.WritePropertyName("image"u8); + writer.WriteObjectValue(Image); + } + if (Optional.IsDefined(Document)) + { + writer.WritePropertyName("document"u8); + writer.WriteObjectValue(Document); + } + if (Optional.IsDefined(Video)) + { + writer.WritePropertyName("video"u8); + writer.WriteObjectValue(Video); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteObjectValue(Location); + } + if (Optional.IsDefined(QuickAction)) + { + writer.WritePropertyName("quickAction"u8); + writer.WriteObjectValue(QuickAction); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueInternal.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueInternal.cs new file mode 100644 index 0000000000000..3db50db11688f --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueInternal.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Communication.Messages +{ + /// The class describes a parameter of a template. + internal partial class MessageTemplateValueInternal + { + /// Initializes a new instance of MessageTemplateValueInternal. + /// The template value kind. + public MessageTemplateValueInternal(MessageTemplateValueKind kind) + { + Kind = kind; + } + + /// The template value kind. + public MessageTemplateValueKind Kind { get; } + /// The message template's text value information. + public MessageTemplateValueText Text { get; set; } + /// + /// The message template's media value information. + /// Could be an image, document or video. + /// + public MessageTemplateValueMedia Image { get; set; } + /// + /// The message template's media value information. + /// Could be an image, document or video. + /// + public MessageTemplateValueMedia Document { get; set; } + /// + /// The message template's media value information. + /// Could be an image, document or video. + /// + public MessageTemplateValueMedia Video { get; set; } + /// The message template's location value information. + public MessageTemplateParameterLocation Location { get; set; } + /// The message template's quick action value information. + public MessageTemplateValueQuickAction QuickAction { get; set; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueKind.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueKind.cs new file mode 100644 index 0000000000000..4cdd00266a3c2 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueKind.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Communication.Messages +{ + /// The template value kind. + public readonly partial struct MessageTemplateValueKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MessageTemplateValueKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextValue = "text"; + private const string ImageValue = "image"; + private const string DocumentValue = "document"; + private const string VideoValue = "video"; + private const string LocationValue = "location"; + private const string QuickActionValue = "quick_action"; + + /// text. + public static MessageTemplateValueKind Text { get; } = new MessageTemplateValueKind(TextValue); + /// image. + public static MessageTemplateValueKind Image { get; } = new MessageTemplateValueKind(ImageValue); + /// document. + public static MessageTemplateValueKind Document { get; } = new MessageTemplateValueKind(DocumentValue); + /// video. + public static MessageTemplateValueKind Video { get; } = new MessageTemplateValueKind(VideoValue); + /// location. + public static MessageTemplateValueKind Location { get; } = new MessageTemplateValueKind(LocationValue); + /// quick_action. + public static MessageTemplateValueKind QuickAction { get; } = new MessageTemplateValueKind(QuickActionValue); + /// Determines if two values are the same. + public static bool operator ==(MessageTemplateValueKind left, MessageTemplateValueKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MessageTemplateValueKind left, MessageTemplateValueKind right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MessageTemplateValueKind(string value) => new MessageTemplateValueKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MessageTemplateValueKind other && Equals(other); + /// + public bool Equals(MessageTemplateValueKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueMedia.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueMedia.Serialization.cs new file mode 100644 index 0000000000000..a92f825758df0 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueMedia.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class MessageTemplateValueMedia : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url.AbsoluteUri); + } + if (Optional.IsDefined(Caption)) + { + writer.WritePropertyName("caption"u8); + writer.WriteStringValue(Caption); + } + if (Optional.IsDefined(FileName)) + { + writer.WritePropertyName("fileName"u8); + writer.WriteStringValue(FileName); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueMedia.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueMedia.cs new file mode 100644 index 0000000000000..f1c94c5f871a2 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueMedia.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Communication.Messages +{ + /// + /// The message template's media value information. + /// Could be an image, document or video. + /// + internal partial class MessageTemplateValueMedia + { + /// Initializes a new instance of MessageTemplateValueMedia. + public MessageTemplateValueMedia() + { + } + + /// The (public) URL of the media. + public Uri Url { get; set; } + /// The [optional] caption of the media object. + public string Caption { get; set; } + /// The [optional] filename of the media file. + public string FileName { get; set; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueQuickAction.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueQuickAction.Serialization.cs new file mode 100644 index 0000000000000..f4fcf42c2dce3 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueQuickAction.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class MessageTemplateValueQuickAction : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + if (Optional.IsDefined(Payload)) + { + writer.WritePropertyName("payload"u8); + writer.WriteStringValue(Payload); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueQuickAction.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueQuickAction.cs new file mode 100644 index 0000000000000..8f23763d9c7e7 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueQuickAction.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Communication.Messages +{ + /// The message template's quick action value information. + internal partial class MessageTemplateValueQuickAction + { + /// Initializes a new instance of MessageTemplateValueQuickAction. + public MessageTemplateValueQuickAction() + { + } + + /// The [Optional] quick action text. + public string Text { get; set; } + /// The [Optional] quick action payload. + public string Payload { get; set; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueText.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueText.Serialization.cs new file mode 100644 index 0000000000000..cdf6e2c4e0fd8 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueText.Serialization.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class MessageTemplateValueText : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueText.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueText.cs new file mode 100644 index 0000000000000..99e7f08adc44e --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueText.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The message template's text value information. + internal partial class MessageTemplateValueText + { + /// Initializes a new instance of MessageTemplateValueText. + /// The text value. + /// is null. + public MessageTemplateValueText(string text) + { + Argument.AssertNotNull(text, nameof(text)); + + Text = text; + } + + /// The text value. + public string Text { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueWhatsAppSubType.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueWhatsAppSubType.cs new file mode 100644 index 0000000000000..ec18bec255dd5 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/MessageTemplateValueWhatsAppSubType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Communication.Messages +{ + /// The WhatsApp button sub type. + public readonly partial struct MessageTemplateValueWhatsAppSubType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MessageTemplateValueWhatsAppSubType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string QuickReplyValue = "quickReply"; + private const string UrlValue = "url"; + + /// quickReply. + public static MessageTemplateValueWhatsAppSubType QuickReply { get; } = new MessageTemplateValueWhatsAppSubType(QuickReplyValue); + /// url. + public static MessageTemplateValueWhatsAppSubType Url { get; } = new MessageTemplateValueWhatsAppSubType(UrlValue); + /// Determines if two values are the same. + public static bool operator ==(MessageTemplateValueWhatsAppSubType left, MessageTemplateValueWhatsAppSubType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MessageTemplateValueWhatsAppSubType left, MessageTemplateValueWhatsAppSubType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MessageTemplateValueWhatsAppSubType(string value) => new MessageTemplateValueWhatsAppSubType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MessageTemplateValueWhatsAppSubType other && Equals(other); + /// + public bool Equals(MessageTemplateValueWhatsAppSubType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendMessageResult.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendMessageResult.Serialization.cs new file mode 100644 index 0000000000000..e9c3af81261c6 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendMessageResult.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Communication.Messages +{ + public partial class SendMessageResult + { + internal static SendMessageResult DeserializeSendMessageResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList receipts = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("receipts"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MessageReceipt.DeserializeMessageReceipt(item)); + } + receipts = array; + continue; + } + } + return new SendMessageResult(receipts); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendMessageResult.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendMessageResult.cs new file mode 100644 index 0000000000000..ad8023f9333cc --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendMessageResult.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// Result of the send message operation. + public partial class SendMessageResult + { + /// Initializes a new instance of SendMessageResult. + /// Receipts of the send message operation. + /// is null. + internal SendMessageResult(IEnumerable receipts) + { + Argument.AssertNotNull(receipts, nameof(receipts)); + + Receipts = receipts.ToList(); + } + + /// Initializes a new instance of SendMessageResult. + /// Receipts of the send message operation. + internal SendMessageResult(IReadOnlyList receipts) + { + Receipts = receipts; + } + + /// Receipts of the send message operation. + public IReadOnlyList Receipts { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendNotificationRequest.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendNotificationRequest.Serialization.cs new file mode 100644 index 0000000000000..bcc9181640b5a --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendNotificationRequest.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class SendNotificationRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("channelRegistrationId"u8); + writer.WriteStringValue(ChannelRegistrationId); + writer.WritePropertyName("to"u8); + writer.WriteStartArray(); + foreach (var item in To) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + if (Optional.IsDefined(MediaUri)) + { + writer.WritePropertyName("mediaUri"u8); + writer.WriteStringValue(MediaUri); + } + if (Optional.IsDefined(Template)) + { + writer.WritePropertyName("template"u8); + writer.WriteObjectValue(Template); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendNotificationRequest.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendNotificationRequest.cs new file mode 100644 index 0000000000000..0fceff2f24608 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/SendNotificationRequest.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// Details of the message to send. + internal partial class SendNotificationRequest + { + /// Initializes a new instance of SendNotificationRequest. + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// The type of message. Supports text, image, template. + /// or is null. + public SendNotificationRequest(string channelRegistrationId, IEnumerable to, CommunicationMessageType type) + { + Argument.AssertNotNull(channelRegistrationId, nameof(channelRegistrationId)); + Argument.AssertNotNull(to, nameof(to)); + + ChannelRegistrationId = channelRegistrationId; + To = to.ToList(); + Type = type; + } + + /// The Channel Registration ID for the Business Identifier. + public string ChannelRegistrationId { get; } + /// The native external platform user identifiers of the recipient. + public IList To { get; } + /// The type of message. Supports text, image, template. + public CommunicationMessageType Type { get; } + /// Message content. + public string Content { get; set; } + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + public string MediaUri { get; set; } + /// The template object used to create templates. + public MessageTemplateInternal Template { get; set; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseInternal.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseInternal.Serialization.cs new file mode 100644 index 0000000000000..5723ad4855160 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseInternal.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class TemplateResponseInternal + { + internal static TemplateResponseInternal DeserializeTemplateResponseInternal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional language = default; + Optional channelType = default; + Optional status = default; + Optional whatsApp = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + channelType = new CommunicationMessagesChannelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new TemplateStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("whatsApp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + whatsApp = TemplateResponseWhatsAppInternal.DeserializeTemplateResponseWhatsAppInternal(property.Value); + continue; + } + } + return new TemplateResponseInternal(name.Value, language.Value, Optional.ToNullable(channelType), Optional.ToNullable(status), whatsApp.Value); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseInternal.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseInternal.cs new file mode 100644 index 0000000000000..2dece9fb1cfb2 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseInternal.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Communication.Messages +{ + /// The TemplateResponse. + internal partial class TemplateResponseInternal + { + /// Initializes a new instance of TemplateResponseInternal. + internal TemplateResponseInternal() + { + } + + /// Initializes a new instance of TemplateResponseInternal. + /// Get the template's Name. + /// Get the template's language. + /// + /// The aggregated template status. + /// The WhatsApp-specific template response contract. + internal TemplateResponseInternal(string name, string language, CommunicationMessagesChannelType? channelType, TemplateStatus? status, TemplateResponseWhatsAppInternal whatsApp) + { + Name = name; + Language = language; + ChannelType = channelType; + Status = status; + WhatsApp = whatsApp; + } + + /// Get the template's Name. + public string Name { get; } + /// Get the template's language. + public string Language { get; } + /// Gets the channel type. + public CommunicationMessagesChannelType? ChannelType { get; } + /// The aggregated template status. + public TemplateStatus? Status { get; } + /// The WhatsApp-specific template response contract. + public TemplateResponseWhatsAppInternal WhatsApp { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseWhatsAppInternal.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseWhatsAppInternal.Serialization.cs new file mode 100644 index 0000000000000..fd8cf5c3ebffa --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseWhatsAppInternal.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + internal partial class TemplateResponseWhatsAppInternal + { + internal static TemplateResponseWhatsAppInternal DeserializeTemplateResponseWhatsAppInternal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional content = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("content"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + content = property.Value.GetObject(); + continue; + } + } + return new TemplateResponseWhatsAppInternal(content.Value); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseWhatsAppInternal.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseWhatsAppInternal.cs new file mode 100644 index 0000000000000..88b0a97833819 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateResponseWhatsAppInternal.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Communication.Messages +{ + /// The WhatsApp-specific template response contract. + internal partial class TemplateResponseWhatsAppInternal + { + /// Initializes a new instance of TemplateResponseWhatsAppInternal. + internal TemplateResponseWhatsAppInternal() + { + } + + /// Initializes a new instance of TemplateResponseWhatsAppInternal. + /// + /// WhatsApp platform's template content + /// This is the payload returned from WhatsApp API. + /// + internal TemplateResponseWhatsAppInternal(object content) + { + Content = content; + } + + /// + /// WhatsApp platform's template content + /// This is the payload returned from WhatsApp API. + /// + public object Content { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateStatus.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateStatus.cs new file mode 100644 index 0000000000000..fb01fda63cf84 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/Models/TemplateStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Communication.Messages +{ + /// The aggregated template status. + public readonly partial struct TemplateStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TemplateStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApprovedValue = "approved"; + private const string RejectedValue = "rejected"; + private const string PendingValue = "pending"; + private const string PausedValue = "paused"; + + /// approved. + public static TemplateStatus Approved { get; } = new TemplateStatus(ApprovedValue); + /// rejected. + public static TemplateStatus Rejected { get; } = new TemplateStatus(RejectedValue); + /// pending. + public static TemplateStatus Pending { get; } = new TemplateStatus(PendingValue); + /// paused. + public static TemplateStatus Paused { get; } = new TemplateStatus(PausedValue); + /// Determines if two values are the same. + public static bool operator ==(TemplateStatus left, TemplateStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TemplateStatus left, TemplateStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TemplateStatus(string value) => new TemplateStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TemplateStatus other && Equals(other); + /// + public bool Equals(TemplateStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationMessagesRestClient.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationMessagesRestClient.cs new file mode 100644 index 0000000000000..ddf5bdefa29ed --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationMessagesRestClient.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.Messages +{ + internal partial class NotificationMessagesRestClient + { + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// Initializes a new instance of NotificationMessagesRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The communication resource, for example https://my-resource.communication.azure.com. + /// Api Version. + /// , , or is null. + public NotificationMessagesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion = "2023-08-24-preview") + { + ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); + _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); + } + + internal HttpMessage CreateSendMessageRequest(string channelRegistrationId, IEnumerable to, CommunicationMessageType type, string content, string mediaUri, MessageTemplateInternal template) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/messages/notifications/:send", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var model = new SendNotificationRequest(channelRegistrationId, to.ToList(), type) + { + Content = content, + MediaUri = mediaUri, + Template = template + }; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(model); + request.Content = content0; + return message; + } + + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// The type of message. Supports text, image, template. + /// Message content. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// The template object used to create templates. + /// The cancellation token to use. + /// or is null. + public async Task> SendMessageAsync(string channelRegistrationId, IEnumerable to, CommunicationMessageType type, string content = null, string mediaUri = null, MessageTemplateInternal template = null, CancellationToken cancellationToken = default) + { + if (channelRegistrationId == null) + { + throw new ArgumentNullException(nameof(channelRegistrationId)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + + using var message = CreateSendMessageRequest(channelRegistrationId, to, type, content, mediaUri, template); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + { + SendMessageResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SendMessageResult.DeserializeSendMessageResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// The type of message. Supports text, image, template. + /// Message content. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// The template object used to create templates. + /// The cancellation token to use. + /// or is null. + public Response SendMessage(string channelRegistrationId, IEnumerable to, CommunicationMessageType type, string content = null, string mediaUri = null, MessageTemplateInternal template = null, CancellationToken cancellationToken = default) + { + if (channelRegistrationId == null) + { + throw new ArgumentNullException(nameof(channelRegistrationId)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + + using var message = CreateSendMessageRequest(channelRegistrationId, to, type, content, mediaUri, template); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + { + SendMessageResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SendMessageResult.DeserializeSendMessageResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/StreamRestClient.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/StreamRestClient.cs new file mode 100644 index 0000000000000..d42b1c26eb7fb --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/StreamRestClient.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.IO; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.Messages +{ + internal partial class StreamRestClient + { + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// Initializes a new instance of StreamRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The communication resource, for example https://my-resource.communication.azure.com. + /// Api Version. + /// , , or is null. + public StreamRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion = "2023-08-24-preview") + { + ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); + _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); + } + + internal HttpMessage CreateDownloadMediaRequest(string id) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + message.BufferResponse = false; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/messages/streams/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Download the Media payload from a User to Business message. + /// The Media Identifier contained in the User to Business message event. + /// The cancellation token to use. + /// is null. + public async Task> DownloadMediaAsync(string id, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + + using var message = CreateDownloadMediaRequest(id); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + var value = message.ExtractResponseContent(); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Download the Media payload from a User to Business message. + /// The Media Identifier contained in the User to Business message event. + /// The cancellation token to use. + /// is null. + public Response DownloadMedia(string id, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + + using var message = CreateDownloadMediaRequest(id); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + var value = message.ExtractResponseContent(); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/TemplateV2RestClient.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/TemplateV2RestClient.cs new file mode 100644 index 0000000000000..bb42713c2f8cb --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/TemplateV2RestClient.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.Messages +{ + internal partial class TemplateV2RestClient + { + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// Initializes a new instance of TemplateV2RestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The communication resource, for example https://my-resource.communication.azure.com. + /// Api Version. + /// , , or is null. + public TemplateV2RestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion = "2023-08-24-preview") + { + ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); + _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); + } + + internal HttpMessage CreateListRequest(Guid channelId, int? maxPageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/messages/channels/", false); + uri.AppendPath(channelId, true); + uri.AppendPath("/templates", false); + if (maxPageSize != null) + { + uri.AppendQuery("maxPageSize", maxPageSize.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all templates for given ACS channel. + /// The Guid to use. + /// The Int32 to use. + /// The cancellation token to use. + public async Task> ListAsync(Guid channelId, int? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(channelId, maxPageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListTemplatesResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListTemplatesResponse.DeserializeListTemplatesResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all templates for given ACS channel. + /// The Guid to use. + /// The Int32 to use. + /// The cancellation token to use. + public Response List(Guid channelId, int? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(channelId, maxPageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListTemplatesResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListTemplatesResponse.DeserializeListTemplatesResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, Guid channelId, int? maxPageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all templates for given ACS channel. + /// The URL to the next page of results. + /// The Guid to use. + /// The Int32 to use. + /// The cancellation token to use. + /// is null. + public async Task> ListNextPageAsync(string nextLink, Guid channelId, int? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateListNextPageRequest(nextLink, channelId, maxPageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListTemplatesResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListTemplatesResponse.DeserializeListTemplatesResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all templates for given ACS channel. + /// The URL to the next page of results. + /// The Guid to use. + /// The Int32 to use. + /// The cancellation token to use. + /// is null. + public Response ListNextPage(string nextLink, Guid channelId, int? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateListNextPageRequest(nextLink, channelId, maxPageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListTemplatesResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListTemplatesResponse.DeserializeListTemplatesResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/MessageTemplateClient.cs b/sdk/communication/Azure.Communication.Messages/src/MessageTemplateClient.cs new file mode 100644 index 0000000000000..02772bc587064 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/MessageTemplateClient.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure.Communication.Pipeline; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.Messages +{ + /// + /// The Azure Communication Services Message Template client. + /// + public class MessageTemplateClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly TemplateV2RestClient _templateV2RestClient; + private readonly StreamRestClient _streamRestClient; + + #region public constructors + + /// + /// Initializes a new instance of + /// + /// Connection string acquired from the Azure Communication Services resource. + public MessageTemplateClient(string connectionString) + : this( + ConnectionString.Parse(Argument.CheckNotNullOrEmpty(connectionString, nameof(connectionString))), + new CommunicationMessagesClientOptions()) + { + } + + /// Initializes a new instance of . + /// Connection string acquired from the Azure Communication Services resource. + /// Client options exposing , , , etc. + public MessageTemplateClient(string connectionString, CommunicationMessagesClientOptions options) + : this( + ConnectionString.Parse(Argument.CheckNotNullOrEmpty(connectionString, nameof(connectionString))), + options ?? new CommunicationMessagesClientOptions()) + { + } + + /// Initializes a new instance of . + /// The URI of the Azure Communication Services resource. + /// The used to authenticate requests. + /// Client options exposing , , , etc. + public MessageTemplateClient(Uri endpoint, AzureKeyCredential keyCredential, CommunicationMessagesClientOptions options = default) + : this( + Argument.CheckNotNull(endpoint, nameof(endpoint)).AbsoluteUri, + Argument.CheckNotNull(keyCredential, nameof(keyCredential)), + options ?? new CommunicationMessagesClientOptions()) + { + } + + #endregion + + #region private constructors + private MessageTemplateClient(ConnectionString connectionString, CommunicationMessagesClientOptions options) + : this(new Uri(connectionString.GetRequired("endpoint")), options.BuildHttpPipeline(connectionString), options) + { } + + private MessageTemplateClient(string endpoint, TokenCredential tokenCredential, CommunicationMessagesClientOptions options) + : this(new Uri(endpoint), options.BuildHttpPipeline(tokenCredential), options) + { } + + private MessageTemplateClient(string endpoint, AzureKeyCredential keyCredential, CommunicationMessagesClientOptions options) + : this(new Uri(endpoint), options.BuildHttpPipeline(keyCredential), options) + { } + + private MessageTemplateClient(Uri endpoint, HttpPipeline httpPipeline, CommunicationMessagesClientOptions options) + { + _clientDiagnostics = new ClientDiagnostics(options); + _templateV2RestClient = new TemplateV2RestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion); + _streamRestClient = new StreamRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion); + } + + #endregion + + /// Initializes a new instance of for mocking. + protected MessageTemplateClient() + { + _clientDiagnostics = null!; + _templateV2RestClient = null!; + _streamRestClient = null!; + } + + #region List Templates Operations + /// List all templates for given ACS channel asynchronously. + /// The registration ID of the channel. + /// The cancellation token to use. + /// The server returned an error. See for details returned from the server. + public virtual AsyncPageable GetTemplatesAsync(string channelRegistrationId, CancellationToken cancellationToken = default) + { + _ = channelRegistrationId ?? throw new ArgumentNullException(nameof(channelRegistrationId)); + + async Task> FirstPageFunc(int? pageSizeHint) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MessageTemplateClient)}.{nameof(GetTemplates)}"); + scope.Start(); + + try + { + Response response = await _templateV2RestClient.ListAsync(new Guid(channelRegistrationId), pageSizeHint, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(x => new MessageTemplateItem(x)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MessageTemplateClient)}.{nameof(GetTemplates)}"); + scope.Start(); + + try + { + Response response = await _templateV2RestClient.ListNextPageAsync(nextLink, new Guid(channelRegistrationId), pageSizeHint, cancellationToken).ConfigureAwait(false); + if (response.Value.Value == null || response.Value.Value.Count == 0) + { + return Page.FromValues(new List(), null, response.GetRawResponse()); + } + return Page.FromValues(response.Value.Value.Select(x => new MessageTemplateItem(x)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// List all templates for given ACS channel. + /// The registration ID of the channel. + /// The cancellation token to use. + /// The server returned an error. See for details returned from the server. + public virtual Pageable GetTemplates(string channelRegistrationId, CancellationToken cancellationToken = default) + { + _ = channelRegistrationId ?? throw new ArgumentNullException(nameof(channelRegistrationId)); + + Page FirstPageFunc(int? pageSizeHint) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MessageTemplateClient)}.{nameof(GetTemplates)}"); + scope.Start(); + + try + { + Response response = _templateV2RestClient.List(new Guid(channelRegistrationId), pageSizeHint, cancellationToken); + return Page.FromValues(response.Value.Value.Select(x=> new MessageTemplateItem(x)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MessageTemplateClient)}.{nameof(GetTemplates)}"); + scope.Start(); + + try + { + Response response = _templateV2RestClient.ListNextPage(nextLink, new Guid(channelRegistrationId), pageSizeHint, cancellationToken); + if (response.Value.Value == null || response.Value.Value.Count == 0) + { + return Page.FromValues(new List(), null, response.GetRawResponse()); + } + return Page.FromValues(response.Value.Value.Select(x => new MessageTemplateItem(x)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + #endregion + + private static HttpPipeline CreatePipelineFromOptions(ConnectionString connectionString, CommunicationMessagesClientOptions options) + { + return options.BuildHttpPipeline(connectionString); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/CommunicationMessagesChannelType.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/CommunicationMessagesChannelType.cs new file mode 100644 index 0000000000000..78cc2eb8cb14a --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/CommunicationMessagesChannelType.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The ChannelType. + [CodeGenModel("ChannelType")] + public partial struct CommunicationMessagesChannelType + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsInternal.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsInternal.cs new file mode 100644 index 0000000000000..11e41a720be50 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsInternal.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("MessageTemplateBindings")] + internal partial class MessageTemplateBindingsInternal + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsWhatsApp.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsWhatsApp.cs new file mode 100644 index 0000000000000..7b02e29ff0baa --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsWhatsApp.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("MessageTemplateBindingsWhatsApp")] + internal partial class MessageTemplateBindingsWhatsApp + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsWhatsAppButton.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsWhatsAppButton.cs new file mode 100644 index 0000000000000..6ff65e06860c4 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsWhatsAppButton.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("MessageTemplateBindingsWhatsAppButton")] + internal partial class MessageTemplateBindingsWhatsAppButton + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsWhatsAppComponent.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsWhatsAppComponent.cs new file mode 100644 index 0000000000000..c11efc8c5ed20 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateBindingsWhatsAppComponent.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("MessageTemplateBindingsWhatsAppComponent")] + internal partial class MessageTemplateBindingsWhatsAppComponent + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateInternal.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateInternal.cs new file mode 100644 index 0000000000000..199b8d9880278 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateInternal.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("MessageTemplate")] + internal partial class MessageTemplateInternal + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateParameterLocation.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateParameterLocation.cs new file mode 100644 index 0000000000000..fafd25050e590 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateParameterLocation.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("MessageTemplateParameterLocation")] + internal partial class MessageTemplateParameterLocation + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueInternal.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueInternal.cs new file mode 100644 index 0000000000000..05ce7151160bc --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueInternal.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("MessageTemplateValue")] + internal partial class MessageTemplateValueInternal + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueMedia.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueMedia.cs new file mode 100644 index 0000000000000..2a88d562009a3 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueMedia.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("MessageTemplateValueMedia")] + internal partial class MessageTemplateValueMedia + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueQuickAction.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueQuickAction.cs new file mode 100644 index 0000000000000..ecec485855811 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueQuickAction.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("MessageTemplateValueQuickAction")] + internal partial class MessageTemplateValueQuickAction + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueText.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueText.cs new file mode 100644 index 0000000000000..0a7c554cb1951 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/MessageTemplateValueText.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("MessageTemplateValueText")] + internal partial class MessageTemplateValueText + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/TemplateResponseInternal.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/TemplateResponseInternal.cs new file mode 100644 index 0000000000000..dd3936bb1a003 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/TemplateResponseInternal.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The response item for template. + [CodeGenModel("TemplateResponse")] + internal partial class TemplateResponseInternal + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/TemplateResponseWhatsAppInternal.cs b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/TemplateResponseWhatsAppInternal.cs new file mode 100644 index 0000000000000..0a93cc25f6a76 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/InternalModels/TemplateResponseWhatsAppInternal.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + [CodeGenModel("TemplateResponseWhatsApp")] + internal partial class TemplateResponseWhatsAppInternal + { + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplate.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplate.cs new file mode 100644 index 0000000000000..d5b26081ba5c8 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplate.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.Messages +{ + /// The template object used to create templates. + public class MessageTemplate + { + /// + /// Initializes a new instance of the class. + /// + /// Name of the template. + /// The codes for the supported languages for templates. + /// The template values. + /// The binding object to link values to the template specific locations. + public MessageTemplate(string name, string language, IEnumerable values = null, MessageTemplateBindings bindings = null) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Language = language ?? throw new ArgumentNullException(nameof(language)); + Values = values; + Bindings = bindings; + } + + /// Name of the template. + public string Name { get; } + /// The codes for the supported languages for templates. + public string Language { get; } + /// The template values. + public IEnumerable Values { get; } + /// The binding object to link values to the template specific locations. + public MessageTemplateBindings Bindings { get; } + + internal MessageTemplateInternal ToMessageTemplateInternal() + { + var messageTemplateInternal = new MessageTemplateInternal(Name, Language); + + if (Values != null) + { + foreach (MessageTemplateValue value in Values) + { + messageTemplateInternal.Values.Add(value.Name, value.ToMessageTemplateValueInternal()); + } + } + + if (Bindings != null) + { + messageTemplateInternal.Bindings = Bindings.ToMessageTemplateBindingsInternal(); + } + + return messageTemplateInternal; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateBindings.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateBindings.cs new file mode 100644 index 0000000000000..93ad6206eb604 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateBindings.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Communication.Messages +{ + /// The binding object to link values to the template specific locations. + public abstract class MessageTemplateBindings + { + /// Initializes a new instance of MessageTemplateBindings. + public MessageTemplateBindings() + { + } + + internal abstract MessageTemplateBindingsInternal ToMessageTemplateBindingsInternal(); + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateDocument.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateDocument.cs new file mode 100644 index 0000000000000..86364c176559a --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateDocument.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +namespace Azure.Communication.Messages +{ + /// + public class MessageTemplateDocument: MessageTemplateValue + { + /// + public MessageTemplateDocument(string name, Uri uri, string caption = null, string fileName = null) : base(name) + { + Uri = uri; + Caption = caption; + FileName = fileName; + } + + /// The (public) URL of the document media. + public Uri Uri { get; set; } + /// The [optional] caption of the media object. + public string Caption { get; set; } + /// The [optional] filename of the media file. + public string FileName { get; set; } + + internal override MessageTemplateValueInternal ToMessageTemplateValueInternal() + { + return new MessageTemplateValueInternal(MessageTemplateValueKind.Document) + { + Document = new MessageTemplateValueMedia { + Url = Uri, + Caption = Caption, + FileName = FileName + } + }; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateImage.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateImage.cs new file mode 100644 index 0000000000000..c42a816c625e3 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateImage.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +namespace Azure.Communication.Messages +{ + /// + public class MessageTemplateImage: MessageTemplateValue + { + /// + public MessageTemplateImage(string name, Uri uri, string caption = null, string fileName = null) : base(name) + { + Uri = uri; + Caption = caption; + FileName = fileName; + } + + /// The (public) URL of the document media. + public Uri Uri { get; set; } + /// The [optional] caption of the media object. + public string Caption { get; set; } + /// The [optional] filename of the media file. + public string FileName { get; set; } + + internal override MessageTemplateValueInternal ToMessageTemplateValueInternal() + { + return new MessageTemplateValueInternal(MessageTemplateValueKind.Image) + { + Image = new MessageTemplateValueMedia + { + Url = Uri, + Caption = Caption, + FileName = FileName + } + }; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateItem.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateItem.cs new file mode 100644 index 0000000000000..f2b567d44b2b7 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateItem.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Communication.Messages +{ + /// The TemplateResponse. + public partial class MessageTemplateItem + { + /// Initializes a new instance of MessageTemplateItem. + internal MessageTemplateItem() + { + } + + /// Initializes a new instance of MessageTemplateItem. + /// Get the template's Name. + /// Get the template's language. + /// + /// The aggregated template status. + /// The WhatsApp-specific template response contract. + internal MessageTemplateItem(string name, string language, CommunicationMessagesChannelType? channelType, TemplateStatus? status, MessageTemplateItemWhatsApp whatsApp) + { + Name = name; + Language = language; + ChannelType = channelType; + Status = status; + WhatsApp = whatsApp; + } + + /// Get the template's Name. + public string Name { get; } + /// Get the template's language. + public string Language { get; } + /// Gets the channel type. + public CommunicationMessagesChannelType? ChannelType { get; } + /// The aggregated template status. + public TemplateStatus? Status { get; } + /// The WhatsApp-specific template response contract. + public MessageTemplateItemWhatsApp WhatsApp { get; } + + internal MessageTemplateItem(TemplateResponseInternal templateResponseInternal) + { + Name = templateResponseInternal.Name; + Language = templateResponseInternal.Language; + ChannelType = templateResponseInternal.ChannelType; + Status = templateResponseInternal.Status; + WhatsApp = new MessageTemplateItemWhatsApp(templateResponseInternal.WhatsApp); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateItemWhatsApp.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateItemWhatsApp.cs new file mode 100644 index 0000000000000..9645e73a16a8e --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateItemWhatsApp.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +namespace Azure.Communication.Messages +{ + /// The WhatsApp-specific template response contract. + public partial class MessageTemplateItemWhatsApp + { + /// Initializes a new instance of TemplateResponseWhatsApp. + internal MessageTemplateItemWhatsApp() + { + } + + /// + /// WhatsApp platform's template content + /// This is the payload returned from WhatsApp API. + /// + public BinaryData Content { get; } + + internal MessageTemplateItemWhatsApp(TemplateResponseWhatsAppInternal templateResponseWhatsAppInternal) + { + Content = new BinaryData(templateResponseWhatsAppInternal.Content); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateLocation.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateLocation.cs new file mode 100644 index 0000000000000..d89ce369843ef --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateLocation.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Communication.Messages +{ + /// + public class MessageTemplateLocation : MessageTemplateValue + { + /// + public MessageTemplateLocation(string name, double latitude, double longitude, string locationName = null, string address = null) + : base(name) + { + Latitude = latitude; + Longitude = longitude; + LocationName = locationName; + Address = address; + } + + /// The name of the location. + public string LocationName { get; set; } + /// The address of the location. + public string Address { get; set; } + /// The latitude of the location. + public double Latitude { get; set; } + /// The longitude of the location. + public double Longitude { get; set; } + + internal override MessageTemplateValueInternal ToMessageTemplateValueInternal() + { + return new MessageTemplateValueInternal(MessageTemplateValueKind.Location) + { + Location = new MessageTemplateParameterLocation + { + Name = LocationName, + Address = Address, + Latitude = Latitude, + Longitude = Longitude + } + }; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateQuickAction.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateQuickAction.cs new file mode 100644 index 0000000000000..93704a902b5d3 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateQuickAction.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using static System.Net.Mime.MediaTypeNames; + +namespace Azure.Communication.Messages +{ + /// + public class MessageTemplateQuickAction: MessageTemplateValue + { + /// + public MessageTemplateQuickAction(string name, string text = null, string payload = null) : base(name) + { + Text = text; + Payload = payload; + } + + /// The quick action text. + public string Text { get; set; } + /// The quick action payload. + public string Payload { get; set; } + + internal override MessageTemplateValueInternal ToMessageTemplateValueInternal() + { + return new MessageTemplateValueInternal(MessageTemplateValueKind.QuickAction) + { + QuickAction = new MessageTemplateValueQuickAction + { + Payload = Payload, + Text = Text + } + }; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateText.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateText.cs new file mode 100644 index 0000000000000..0f7fb02a7e441 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateText.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Communication.Messages +{ + /// + public class MessageTemplateText: MessageTemplateValue + { + /// + public MessageTemplateText(string name, string text) : base(name) + { + Text = text; + } + + /// The message template's text value information. + public string Text { get; set; } + + internal override MessageTemplateValueInternal ToMessageTemplateValueInternal() + { + return new MessageTemplateValueInternal(MessageTemplateValueKind.Text) + { + Text = new MessageTemplateValueText(Text) + }; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateValue.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateValue.cs new file mode 100644 index 0000000000000..afecb9548fbb6 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateValue.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// The class describes a parameter of a template. + public abstract class MessageTemplateValue + { + /// Initializes a new instance of MessageTemplateValueInternal. + /// The template value name. + public MessageTemplateValue(string name) + { + Name = name; + } + + /// The template value name. + public string Name { get; } + + internal abstract MessageTemplateValueInternal ToMessageTemplateValueInternal(); + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateVideo.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateVideo.cs new file mode 100644 index 0000000000000..5ff68d901b0f7 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateVideo.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +namespace Azure.Communication.Messages +{ + /// + public class MessageTemplateVideo: MessageTemplateValue + { + /// + public MessageTemplateVideo(string name, Uri uri, string caption = null, string fileName = null) : base(name) + { + Uri = uri; + Caption = caption; + FileName = fileName; + } + + /// The (public) URL of the document media. + public Uri Uri { get; set; } + /// The [optional] caption of the media object. + public string Caption { get; set; } + /// The [optional] filename of the media file. + public string FileName { get; set; } + + internal override MessageTemplateValueInternal ToMessageTemplateValueInternal() + { + return new MessageTemplateValueInternal(MessageTemplateValueKind.Video) + { + Video = new MessageTemplateValueMedia { + Url = Uri, + Caption = Caption, + FileName = FileName + } + }; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateWhatsAppBindings.cs b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateWhatsAppBindings.cs new file mode 100644 index 0000000000000..5f87acb75472e --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/MessageTemplateWhatsAppBindings.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System; +using System.Linq; + +namespace Azure.Communication.Messages +{ + /// The binding object to link values to the template specific locations. + public class MessageTemplateWhatsAppBindings: MessageTemplateBindings + { + /// Initializes a new instance of MessageTemplateWhatsAppBindings. + public MessageTemplateWhatsAppBindings(IEnumerable header = null, IEnumerable body = null, IEnumerable footer = null, IEnumerable> button = null) + { + Header = header; + Body = body; + Footer = footer; + Button = button; + } + + /// Gets the header. + public IEnumerable Header { get; } + /// Gets the body. + public IEnumerable Body { get; } + /// Gets the footer. + public IEnumerable Footer { get; } + /// Gets the button. + public IEnumerable> Button { get; } + + internal override MessageTemplateBindingsInternal ToMessageTemplateBindingsInternal() + { + var whatsApp = new MessageTemplateBindingsWhatsApp(); + + if (Header != null) + { + foreach (string item in Header) + { + whatsApp.Header.Add(new MessageTemplateBindingsWhatsAppComponent(item)); + } + }; + + if (Body != null) + { + foreach (string item in Body) + { + whatsApp.Body.Add(new MessageTemplateBindingsWhatsAppComponent(item)); + } + }; + + if (Footer != null) + { + foreach (string item in Footer) + { + whatsApp.Footer.Add(new MessageTemplateBindingsWhatsAppComponent(item)); + } + }; + + if (Button != null) + { + foreach (var item in Button) + { + whatsApp.Button.Add(new MessageTemplateBindingsWhatsAppButton(item.Key) { SubType = item.Value }); + } + }; + + return new MessageTemplateBindingsInternal() { WhatsApp = whatsApp }; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Models/SendMessageOptions.cs b/sdk/communication/Azure.Communication.Messages/src/Models/SendMessageOptions.cs new file mode 100644 index 0000000000000..0af50fc982ea3 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Models/SendMessageOptions.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + /// Options for the notification message. + public class SendMessageOptions + { + /// + /// Initializes a new instance of the class for sending a Text message. + /// + /// + /// + /// + public SendMessageOptions(string channelRegistrationId, IEnumerable to, string content) + { + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(channelRegistrationId, nameof(channelRegistrationId)); + ChannelRegistrationId = channelRegistrationId; + To = to; + Content = content; + MessageType = CommunicationMessageType.Text; + } + + /// + /// Initializes a new instance of the class for sending a Media message. + /// + /// + /// + /// + /// + public SendMessageOptions(string channelRegistrationId, IEnumerable to, Uri mediaUri, string content = null) + { + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(mediaUri, nameof(mediaUri)); + Argument.AssertNotNull(channelRegistrationId, nameof(channelRegistrationId)); + ChannelRegistrationId = channelRegistrationId; + To = to; + MediaUri = mediaUri; + Content = content; + MessageType = CommunicationMessageType.Image; + } + + /// + /// Initializes a new instance of the class for sending a Template message. + /// + /// + /// + /// + public SendMessageOptions(string channelRegistrationId, IEnumerable to, MessageTemplate template) // type implicitly Template + { + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(template, nameof(template)); + Argument.AssertNotNull(channelRegistrationId, nameof(channelRegistrationId)); + ChannelRegistrationId = channelRegistrationId; + To = to; + Template = template; + MessageType = CommunicationMessageType.Template; + } + + /// The Channel Registration ID for the Business Identifier. + public string ChannelRegistrationId { get; } + /// The native external platform user identifiers of the recipient. + public IEnumerable To { get; } + /// The cross-platform threadless message type. + public CommunicationMessageType MessageType { get; } + /// Threadless message content. + public string Content { get; } + /// The media Object. + public Uri MediaUri { get; } + /// The template object used to create message templates. + public MessageTemplate Template { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/NotificationMessagesClient.cs b/sdk/communication/Azure.Communication.Messages/src/NotificationMessagesClient.cs new file mode 100644 index 0000000000000..7bbe835d7be31 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/NotificationMessagesClient.cs @@ -0,0 +1,320 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using System.Threading; +using System.Threading.Tasks; +using Azure.Communication.Pipeline; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.Messages +{ + /// + /// The Azure Communication Services Notification Messages client. + /// + public class NotificationMessagesClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly NotificationMessagesRestClient _notificationMessagesRestClient; + private readonly StreamRestClient _streamRestClient; + + #region public constructors + + /// + /// Initializes a new instance of + /// + /// Connection string acquired from the Azure Communication Services resource. + public NotificationMessagesClient(string connectionString) + : this( + ConnectionString.Parse(Argument.CheckNotNullOrEmpty(connectionString, nameof(connectionString))), + new CommunicationMessagesClientOptions()) + { + } + + /// Initializes a new instance of . + /// Connection string acquired from the Azure Communication Services resource. + /// Client options exposing , , , etc. + public NotificationMessagesClient(string connectionString, CommunicationMessagesClientOptions options) + : this( + ConnectionString.Parse(Argument.CheckNotNullOrEmpty(connectionString, nameof(connectionString))), + options ?? new CommunicationMessagesClientOptions()) + { + } + + /// Initializes a new instance of . + /// The URI of the Azure Communication Services resource. + /// The used to authenticate requests. + /// Client options exposing , , , etc. + public NotificationMessagesClient(Uri endpoint, AzureKeyCredential keyCredential, CommunicationMessagesClientOptions options = default) + : this( + Argument.CheckNotNull(endpoint, nameof(endpoint)).AbsoluteUri, + Argument.CheckNotNull(keyCredential, nameof(keyCredential)), + options ?? new CommunicationMessagesClientOptions()) + { + } + + #endregion + + #region private constructors + private NotificationMessagesClient(ConnectionString connectionString, CommunicationMessagesClientOptions options) + : this(new Uri(connectionString.GetRequired("endpoint")), options.BuildHttpPipeline(connectionString), options) + { } + + private NotificationMessagesClient(string endpoint, TokenCredential tokenCredential, CommunicationMessagesClientOptions options) + : this(new Uri(endpoint), options.BuildHttpPipeline(tokenCredential), options) + { } + + private NotificationMessagesClient(string endpoint, AzureKeyCredential keyCredential, CommunicationMessagesClientOptions options) + : this(new Uri(endpoint), options.BuildHttpPipeline(keyCredential), options) + { } + + private NotificationMessagesClient(Uri endpoint, HttpPipeline httpPipeline, CommunicationMessagesClientOptions options) + { + _clientDiagnostics = new ClientDiagnostics(options); + _notificationMessagesRestClient = new NotificationMessagesRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion); + _streamRestClient = new StreamRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion); + } + + #endregion + + /// Initializes a new instance of for mocking. + protected NotificationMessagesClient() + { + _clientDiagnostics = null!; + _notificationMessagesRestClient = null!; + _streamRestClient = null!; + } + + #region Send Message Operations + /// Sends a notification message asynchronously. + /// Options for the message. + /// The cancellation token to use. + /// The server returned an error. See for details returned from the server. + public virtual async Task> SendMessageAsync(SendMessageOptions options, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(NotificationMessagesClient)}.{nameof(SendMessage)}"); + scope.Start(); + _ = options ?? throw new ArgumentNullException(nameof(options)); + + try + { + return await _notificationMessagesRestClient.SendMessageAsync(options.ChannelRegistrationId, options.To, options.MessageType, options.Content, options.MediaUri?.AbsoluteUri, options.Template?.ToMessageTemplateInternal(), cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// Sends a notification message. + /// Options for the message. + /// The cancellation token to use. + /// The server returned an error. See for details returned from the server. + public virtual Response SendMessage(SendMessageOptions options, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(NotificationMessagesClient)}.{nameof(SendMessage)}"); + scope.Start(); + _ = options ?? throw new ArgumentNullException(nameof(options)); + + try + { + return _notificationMessagesRestClient.SendMessage(options.ChannelRegistrationId, options.To, options.MessageType, options.Content, options.MediaUri?.AbsoluteUri, options.Template?.ToMessageTemplateInternal(), cancellationToken); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + #endregion + + #region Download Media Operations + /// Download the Media payload from a User to Business message asynchronously. + /// The Media Identifier contained in the User to Business message event. + /// The cancellation token to use. + /// The server returned an error. See for details returned from the server. + public virtual async Task> DownloadMediaAsync(string mediaContentId, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(StreamRestClient)}.{nameof(DownloadMediaAsync)}"); + scope.Start(); + _ = mediaContentId ?? throw new ArgumentNullException(nameof(mediaContentId)); + + try + { + return await _streamRestClient.DownloadMediaAsync(mediaContentId, cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// + /// The downloads + /// the Media payload from a User to Business message asynchronously. + /// + /// The Media Identifier contained in the User to Business message event. + /// The cancellation token to use. + /// The server returned an error. See for details returned from the server. + public virtual Response DownloadMedia(string mediaContentId, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(StreamRestClient)}.{nameof(DownloadMedia)}"); + scope.Start(); + _ = mediaContentId ?? throw new ArgumentNullException(nameof(mediaContentId)); + + try + { + return _streamRestClient.DownloadMedia(mediaContentId, cancellationToken); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// + /// The operation downloads the + /// specified content asynchronously, and writes the content to . + /// + /// The Media Identifier contained in the User to Business message event. + /// A to write the downloaded content to. + /// The cancellation token to use. + /// The server returned an error. See for details returned from the server. + public virtual async Task DownloadMediaToAsync(string mediaContentId, Stream destinationStream, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(StreamRestClient)}.{nameof(DownloadMediaAsync)}"); + scope.Start(); + _ = mediaContentId ?? throw new ArgumentNullException(nameof(mediaContentId)); + + try + { + return await DownloadMediaToAsyncInternal(mediaContentId, destinationStream, cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// + /// The operation downloads the + /// specified content, and writes the content to . + /// + /// The Media Identifier contained in the User to Business message event. + /// A to write the downloaded content to. + /// The cancellation token to use. + /// The server returned an error. See for details returned from the server. + public virtual Response DownloadMediaTo(string mediaContentId, Stream destinationStream, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(StreamRestClient)}.{nameof(DownloadMedia)}"); + scope.Start(); + _ = mediaContentId ?? throw new ArgumentNullException(nameof(mediaContentId)); + + try + { + return DownloadMediaToInternal(mediaContentId, destinationStream, cancellationToken); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// + /// The operation downloads the + /// specified content, and writes the content to . + /// + /// The Media Identifier contained in the User to Business message event. + /// A file path to write the downloaded content to. + /// The cancellation token to use. + /// The server returned an error. See for details returned from the server. + public virtual async Task DownloadMediaToAsync(string mediaContentId, string destinationPath, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(StreamRestClient)}.{nameof(DownloadMediaAsync)}"); + scope.Start(); + _ = mediaContentId ?? throw new ArgumentNullException(nameof(mediaContentId)); + + using Stream destinationStream = File.Create(destinationPath); + + try + { + return await DownloadMediaToAsyncInternal(mediaContentId, destinationStream, cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// + /// The operation downloads the + /// specified content, and writes the content to . + /// + /// The Media Identifier contained in the User to Business message event. + /// A file path to write the downloaded content to. + /// The cancellation token to use. + /// The server returned an error. See for details returned from the server. + public virtual Response DownloadMediaTo(string mediaContentId, string destinationPath, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(StreamRestClient)}.{nameof(DownloadMedia)}"); + scope.Start(); + _ = mediaContentId ?? throw new ArgumentNullException(nameof(mediaContentId)); + + using Stream destinationStream = File.Create(destinationPath); + + try + { + return DownloadMediaToInternal(mediaContentId, destinationStream, cancellationToken); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + private async Task DownloadMediaToAsyncInternal(string mediaContentId, Stream destinationStream, CancellationToken cancellationToken = default) + { + Response initialResponse = await _streamRestClient.DownloadMediaAsync(mediaContentId, cancellationToken).ConfigureAwait(false); + + await CopyToAsync(initialResponse, destinationStream).ConfigureAwait(false); + + return initialResponse.GetRawResponse(); + } + + private Response DownloadMediaToInternal(string mediaContentId, Stream destinationStream, CancellationToken cancellationToken = default) + { + Response initialResponse = _streamRestClient.DownloadMedia(mediaContentId, cancellationToken); + + CopyTo(initialResponse, destinationStream, cancellationToken); + + return initialResponse.GetRawResponse(); + } + + private static async Task CopyToAsync(Stream result, Stream destination) + { + await result.CopyToAsync(destination).ConfigureAwait(false); + } + + private static void CopyTo(Stream result, Stream destination, CancellationToken cancellationToken) + { + cancellationToken.ThrowIfCancellationRequested(); + result.CopyTo(destination); + result.Dispose(); + } + #endregion + + private static HttpPipeline CreatePipelineFromOptions(ConnectionString connectionString, CommunicationMessagesClientOptions options) + { + return options.BuildHttpPipeline(connectionString); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Properties/AssemblyInfo.cs b/sdk/communication/Azure.Communication.Messages/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000..6522e17d75ccb --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Properties/AssemblyInfo.cs @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: Azure.Core.AzureResourceProviderNamespace("Communication")] diff --git a/sdk/communication/Azure.Communication.Messages/src/autorest.md b/sdk/communication/Azure.Communication.Messages/src/autorest.md new file mode 100644 index 0000000000000..c036372cc217b --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/autorest.md @@ -0,0 +1,33 @@ +# Azure.Communication.Messages + +When a new version of the swagger needs to be updated: +1. Go to sdk\communication, and run `dotnet msbuild /t:GenerateCode` to generate code. +2. Upload the Azure.Communication.Messages.dll to the apiview.dev tool. +If any of the new objects needs to be overwritten, add the required changes to the 'Models' folder. +3. Repeat 2 and 3 until the decided interface is reflected in the apiview.dev + +### AutoRest Configuration + +> see https://aka.ms/autorest +``` yaml +title: Messages +tag: package-2023-08-24-preview +model-namespace: false +require: + - https://github.com/Azure/azure-rest-api-specs/blob/bf04fb1344aec3daf86deff14ae5d73f943d7cca/specification/communication/data-plane/Messages/readme.md +payload-flattening-threshold: 10 +generation1-convenience-client: true +``` + +### Don't buffer media downloads + +Sets the success response as binary stream, instead of error object. + +``` yaml +directive: +- from: swagger-document + where: $..[?(@.operationId=='Stream_DownloadMedia')] + transform: + $["x-csharp-buffer-response"] = false; + $.responses["200"].schema.format = "binary"; +``` diff --git a/sdk/communication/Azure.Communication.Messages/tests.yml b/sdk/communication/Azure.Communication.Messages/tests.yml new file mode 100644 index 0000000000000..56c818c046ec4 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests.yml @@ -0,0 +1,14 @@ +trigger: none + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml + parameters: + ServiceDirectory: communication + Project: Azure.Communication.Messages + CloudConfig: + Public: + SubscriptionConfigurations: + - $(sub-config-azure-cloud-test-resources) + - $(sub-config-communication-services-cloud-test-resources-common) + - $(sub-config-communication-services-cloud-test-resources-net) + Clouds: Public diff --git a/sdk/communication/Azure.Communication.Messages/tests/Azure.Communication.Messages.Tests.csproj b/sdk/communication/Azure.Communication.Messages/tests/Azure.Communication.Messages.Tests.csproj new file mode 100644 index 0000000000000..4de595b8fc55c --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/Azure.Communication.Messages.Tests.csproj @@ -0,0 +1,33 @@ + + + $(RequiredTargetFrameworks) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/communication/Azure.Communication.Messages/tests/Infrastructure/MessagesLiveTestBase.cs b/sdk/communication/Azure.Communication.Messages/tests/Infrastructure/MessagesLiveTestBase.cs new file mode 100644 index 0000000000000..e8283c3f60b2f --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/Infrastructure/MessagesLiveTestBase.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.Identity; + +namespace Azure.Communication.Messages.Tests +{ + public class MessagesLiveTestBase : RecordedTestBase + { + public MessagesLiveTestBase(bool isAsync) : base(isAsync) + { + SanitizedHeaders.Add("x-ms-content-sha256"); + } + + protected NotificationMessagesClient CreateInstrumentedNotificationMessagesClient() + { + var connectionString = TestEnvironment.LiveTestDynamicConnectionString; + var client = new NotificationMessagesClient(connectionString, InstrumentClientOptions(new CommunicationMessagesClientOptions())); + + return InstrumentClient(client); + } + + protected NotificationMessagesClient CreateInstrumentedNotificationMessagesClientWithAzureKeyCredential() + { + var endpoint = TestEnvironment.LiveTestDynamicEndpoint; + var accessKey = TestEnvironment.LiveTestDynamicAccessKey; + var client = new NotificationMessagesClient(endpoint, new AzureKeyCredential(accessKey), InstrumentClientOptions(new CommunicationMessagesClientOptions())); + + return InstrumentClient(client); + } + + protected MessageTemplateClient CreateInstrumentedMessageTemplateClient() + { + var connectionString = TestEnvironment.LiveTestDynamicConnectionString; + var client = new MessageTemplateClient(connectionString, InstrumentClientOptions(new CommunicationMessagesClientOptions())); + + return InstrumentClient(client); + } + + protected MessageTemplateClient CreateInstrumentedMessageTemplateClientWithAzureKeyCredential() + { + var endpoint = TestEnvironment.LiveTestDynamicEndpoint; + var accessKey = TestEnvironment.LiveTestDynamicAccessKey; + + var client = new MessageTemplateClient(endpoint, new AzureKeyCredential(accessKey), InstrumentClientOptions(new CommunicationMessagesClientOptions())); + + return InstrumentClient(client); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/Infrastructure/MessagesTestEnvironment.cs b/sdk/communication/Azure.Communication.Messages/tests/Infrastructure/MessagesTestEnvironment.cs new file mode 100644 index 0000000000000..841cfdb47121c --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/Infrastructure/MessagesTestEnvironment.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Communication.Tests; + +namespace Azure.Communication.Messages.Tests +{ + /// + /// A helper class used to retrieve information to be used for tests. + /// + public class MessagesTestEnvironment : CommunicationTestEnvironment + { + public string SenderChannelRegistrationId => GetRecordedVariable("SENDER_CHANNEL_REGISTRATION_ID"); + public string RecipientIdentifier => GetRecordedVariable("RECIPIENT_IDENTIFIER"); + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs b/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs new file mode 100644 index 0000000000000..3085023aebd6c --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using NUnit.Framework; + +namespace Azure.Communication.Messages.Tests +{ + public class NotificationMessagesClientLiveTests : MessagesLiveTestBase + { + public NotificationMessagesClientLiveTests(bool isAsync) : base(isAsync) + { + } + + public const string ImageUrl = "https://upload.wikimedia.org/wikipedia/commons/3/30/Building92microsoft.jpg"; + public const string VideoUrl = "https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4"; + public const string DocumentUrl = "https://go.microsoft.com/fwlink/?linkid=2131549"; + + [Test] + public async Task SendMessageShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + var options = new SendMessageOptions(TestEnvironment.SenderChannelRegistrationId, new List { TestEnvironment.RecipientIdentifier }, "LiveTest"); + + // Act + Response response = await notificationMessagesClient.SendMessageAsync(options); + + // Assert + validateResponse(response); + } + + [Test] + public async Task SendMessageWithAzureKeyCredentialShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClientWithAzureKeyCredential(); + var options = new SendMessageOptions(TestEnvironment.SenderChannelRegistrationId, new List { TestEnvironment.RecipientIdentifier }, "LiveTest"); + + // Act + Response response = await notificationMessagesClient.SendMessageAsync(options); + + // Assert + validateResponse(response); + } + + [Test] + public async Task SendShippingConfirmationTemplateMessageShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + string channelRegistrationId = TestEnvironment.SenderChannelRegistrationId; + IEnumerable recipients = new List { TestEnvironment.RecipientIdentifier }; + + var ThreeDays = new MessageTemplateText("threeDays", "3"); + IEnumerable values = new List { ThreeDays }; + + MessageTemplateWhatsAppBindings bindings = new MessageTemplateWhatsAppBindings( + body: new[] { ThreeDays.Name } + ); + + MessageTemplate template = new MessageTemplate("sample_shipping_confirmation", "en_us", values, bindings); + SendMessageOptions options = new SendMessageOptions(channelRegistrationId, recipients, template); + + // Act + Response response = await notificationMessagesClient.SendMessageAsync(options); + + // Assert + validateResponse(response); + } + + [Test] + public async Task SendPurchaseFeedbackTemplateMessageShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + string channelRegistrationId = TestEnvironment.SenderChannelRegistrationId; + IEnumerable recipients = new List { TestEnvironment.RecipientIdentifier }; + + var image = new MessageTemplateImage("image", new Uri(ImageUrl)); + var product = new MessageTemplateText("product", "Microsoft Office"); + + IEnumerable values = new List { image, product }; + MessageTemplateWhatsAppBindings bindings = new MessageTemplateWhatsAppBindings( + header: new[] { image.Name }, + body: new[] { product.Name } + ); + MessageTemplate template = new MessageTemplate("sample_purchase_feedback", "en_us", values, bindings); + SendMessageOptions options = new SendMessageOptions(channelRegistrationId, recipients, template); + + // Act + Response response = await notificationMessagesClient.SendMessageAsync(options); + + // Assert + validateResponse(response); + } + + [Test] + public async Task SendIssueResolutionTemplateMessageShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + string channelRegistrationId = TestEnvironment.SenderChannelRegistrationId; + IEnumerable recipients = new List { TestEnvironment.RecipientIdentifier }; + + var name = new MessageTemplateText("name", "Gloria"); + var yes = new MessageTemplateQuickAction("yes", null, "Yay!"); + var no = new MessageTemplateQuickAction("no", null, "Nay!"); + + IEnumerable values = new List { name, yes, no }; + MessageTemplateWhatsAppBindings bindings = new MessageTemplateWhatsAppBindings( + body: new[] { name.Name }, + button: new[] { + new KeyValuePair(yes.Name, MessageTemplateValueWhatsAppSubType.QuickReply), + new KeyValuePair(no.Name, MessageTemplateValueWhatsAppSubType.QuickReply), + } + ); + MessageTemplate template = new MessageTemplate("sample_issue_resolution", "en_us", values, bindings); + SendMessageOptions options = new SendMessageOptions(channelRegistrationId, recipients, template); + + // Act + Response response = await notificationMessagesClient.SendMessageAsync(options); + + // Assert + validateResponse(response); + } + + [Test] + public async Task SendHappyHourAnnocementTemplateMessageShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + string channelRegistrationId = TestEnvironment.SenderChannelRegistrationId; + IEnumerable recipients = new List { TestEnvironment.RecipientIdentifier }; + + var venue = new MessageTemplateText("venue", "Starbucks"); + var time = new MessageTemplateText("time", "Today 2-4PM"); + var video = new MessageTemplateVideo("video", new Uri(VideoUrl)); + + IEnumerable values = new List { venue, time, video }; + MessageTemplateWhatsAppBindings bindings = new MessageTemplateWhatsAppBindings( + header: new[] { video.Name }, + body: new[] { venue.Name, time.Name } + ); + MessageTemplate template = new MessageTemplate("sample_happy_hour_announcement", "en_us", values, bindings); + SendMessageOptions options = new SendMessageOptions(channelRegistrationId, recipients, template); + + // Act + Response response = await notificationMessagesClient.SendMessageAsync(options); + + // Assert + validateResponse(response); + } + + [Test] + public async Task SendFlightConfirmationTemplateMessageShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + string channelRegistrationId = TestEnvironment.SenderChannelRegistrationId; + IEnumerable recipients = new List { TestEnvironment.RecipientIdentifier }; + + var document = new MessageTemplateDocument("document", new Uri(DocumentUrl)); + var firstName = new MessageTemplateText("firstName", "Gloria"); + var lastName = new MessageTemplateText("lastName", "Li"); + var date = new MessageTemplateText("date", "July 1st, 2023"); + + IEnumerable values = new List { document, firstName, lastName, date }; + MessageTemplateWhatsAppBindings bindings = new MessageTemplateWhatsAppBindings( + header: new[] { document.Name }, + body: new[] { firstName.Name, lastName.Name, date.Name } + ); + MessageTemplate template = new MessageTemplate("sample_flight_confirmation", "en_us", values, bindings); + SendMessageOptions options = new SendMessageOptions(channelRegistrationId, recipients, template); + + // Act + Response response = await notificationMessagesClient.SendMessageAsync(options); + + // Assert + validateResponse(response); + } + + [Test] + public async Task SendMovieTicketConfirmationTemplateMessageShouldSucceed() + { + // Arrange + NotificationMessagesClient notificationMessagesClient = CreateInstrumentedNotificationMessagesClient(); + string channelRegistrationId = TestEnvironment.SenderChannelRegistrationId; + IEnumerable recipients = new List { TestEnvironment.RecipientIdentifier }; + + var image = new MessageTemplateImage("image", new Uri(ImageUrl)); + var title = new MessageTemplateText("title", "Avengers"); + var time = new MessageTemplateText("time", "July 1st, 2023 12:30PM"); + var venue = new MessageTemplateText("venue", "Cineplex"); + var seats = new MessageTemplateText("seats", "Seat 1A"); + IEnumerable values = new List { image, title, time, venue, seats }; + MessageTemplateWhatsAppBindings bindings = new MessageTemplateWhatsAppBindings( + header: new[] { image.Name }, + body: new[] { title.Name, time.Name, venue.Name, seats.Name } + ); + MessageTemplate template = new MessageTemplate("sample_movie_ticket_confirmation", "en_us", values, bindings); + SendMessageOptions options = new SendMessageOptions(channelRegistrationId, recipients, template); + + // Act + Response response = await notificationMessagesClient.SendMessageAsync(options); + + // Assert + validateResponse(response); + } + + private void validateResponse(Response response) + { + Assert.AreEqual(202, response.GetRawResponse().Status); + Assert.IsNotNull(response.Value.Receipts[0].MessageId); + Assert.IsNotNull(response.Value.Receipts[0].To); + Assert.AreEqual(TestEnvironment.RecipientIdentifier, response.Value.Receipts[0].To); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientTests.cs b/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientTests.cs new file mode 100644 index 0000000000000..1be3268dcbfda --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientTests.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Microsoft.Extensions.Options; +using NUnit.Framework; + +namespace Azure.Communication.Messages.Tests +{ + public class NotificationMessagesClientTests : ClientTestBase + { + protected const string ConnectionString = "endpoint=https://contoso.azure.com/;accesskey=ZHVtbXlhY2Nlc3NrZXk="; + + private const string SendMessageApiResponsePayload = "{\"receipts\":[{\"messageId\":\"d53605de-2f6e-437d-9e40-8d83b2111cb8\",\"to\":\"+1(123)456-7890\"}]}"; + + public NotificationMessagesClientTests(bool isAsync) : base(isAsync) + { + } + + [Test] + public void Constructor_InvalidParamsThrows() + { + Assert.Throws(() => new NotificationMessagesClient(null)); + Assert.Throws(() => new NotificationMessagesClient(string.Empty)); + Assert.Throws(() => new NotificationMessagesClient(" ")); + Assert.Throws(() => new NotificationMessagesClient("test")); + } + + [Test] + public async Task SendMessage_ValidParams_ShouldSucceed() + { + //arrange + NotificationMessagesClient notificationMessagesClient = CreateMockNotificationMessagesClient(202, SendMessageApiResponsePayload); + + //act + SendMessageOptions sendMessageOptions = new SendMessageOptions("testChannelRegistrationId", new List { "+1(123)456-7890" }, "testMessage"); + SendMessageResult sendMessageResult = await notificationMessagesClient.SendMessageAsync(sendMessageOptions); + + //assert + Assert.IsNotNull(sendMessageResult.Receipts[0].MessageId); + Assert.IsNotNull(sendMessageResult.Receipts[0].To); + Assert.AreEqual("d53605de-2f6e-437d-9e40-8d83b2111cb8", sendMessageResult.Receipts[0].MessageId); + Assert.AreEqual("+1(123)456-7890", sendMessageResult.Receipts[0].To); + } + + [Test] + public void SendNotificationMessage_NullSendMessageOptions_Throws() + { + //arrange + NotificationMessagesClient notificationMessagesClient = CreateMockNotificationMessagesClient(); + + //act & assert + Assert.ThrowsAsync(async () => await notificationMessagesClient.SendMessageAsync(null)); + } + + [Test] + public async Task SendMessage_InvalidChannelRegistrationId_ThrowsBadRequestException() + { + //arrange + NotificationMessagesClient notificationMessagesClient = CreateMockNotificationMessagesClient(400); + + try + { + //act + SendMessageOptions sendMessageOptions = new SendMessageOptions("invalidChannelRegistrationId", new List { "+1(123)456-7890" }, "testMessage"); + await notificationMessagesClient.SendMessageAsync(sendMessageOptions); + } + catch (RequestFailedException requestFailedException) + { + //assert + Assert.AreEqual(400, requestFailedException.Status); + } + } + + private NotificationMessagesClient CreateMockNotificationMessagesClient(int responseCode = 202, string responseContent = null) + { + var mockResponse = new MockResponse(responseCode); + if (responseContent != null) + { + mockResponse.SetContent(responseContent); + } + + var notificationMessagesClientOptions = new CommunicationMessagesClientOptions + { + Transport = new MockTransport(mockResponse) + }; + + return new NotificationMessagesClient(ConnectionString, notificationMessagesClientOptions); + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesShouldSucceed.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesShouldSucceed.json new file mode 100644 index 0000000000000..6f771fa284bd8 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesShouldSucceed.json @@ -0,0 +1,723 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-8570f5ccd3dfd6ce6777d0a08d1ba0b5-dfb1a805bbd63c39-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d824e77a461ffaa87df9cb7150d5e937", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:15 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "9833", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:16 GMT", + "MS-CV": "HSVUeJZ21023ph9hVFUaKw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "03K0gZQAAAACCTJz6LdAWSq690\u002BSbtvcUWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "514ms" + }, + "ResponseBody": { + "value": [ + { + "name": "optin_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Reply {{1}} to receive {{2}}. Txt {{3}} for HELP, Txt {{4}} to opt-out.", + "example": { + "body_text": [ + [ + "Y", + "appointment reminders", + "HELP", + "STOP" + ] + ] + } + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "This is your flight confirmation for {{1}}-{{2}} on {{3}}." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Esta \u00E9 a sua confirma\u00E7\u00E3o de voo para {{1}}-{{2}} em {{3}}." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Confirmamos tu vuelo a {{1}}-{{2}} para el {{3}}." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Ini merupakan konfirmasi penerbangan Anda untuk {{1}}-{{2}} di {{3}}." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Terima kasih sudah membeli {{1}}! Kami menghargai masukan Anda dan ingin mempelajari lebih lanjut terkait pengalaman Anda." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Ikuti survei", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Thank you for purchasing {{1}}! We value your feedback and would like to learn more about your experience." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Take Survey", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Agradecemos a aquisi\u00E7\u00E3o de {{1}}! Valorizamos seu feedback e gostar\u00EDamos de saber mais sobre sua experi\u00EAncia." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Responder \u00E0 pesquisa", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "\u00A1Gracias por comprar {{1}}! Valoramos tus comentarios y nos gustar\u00EDa saber c\u00F3mo fue tu experiencia." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Responder encuesta", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "Jam diskon telah tiba! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nBergembiralah dan nikmati hari Anda. \uD83C\uDF89\nTempat: {{1}}\nWaktu: {{2}}" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "\u00A1Lleg\u00F3 el happy hour! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nA divertirse y disfrutar. \uD83C\uDF89\nLugar: {{1}}\nHora: {{2}}" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "O happy hour chegou! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nSeja feliz e aproveite o dia. \uD83C\uDF89\nLocal: {{1}}\nHor\u00E1rio: {{2}}" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "Happy hour is here! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nPlease be merry and enjoy the day. \uD83C\uDF89\nVenue: {{1}}\nTime: {{2}}" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Oi, {{1}}. N\u00F3s conseguimos resolver o problema que voc\u00EA estava enfrentando?" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Sim" + }, + { + "type": "QUICK_REPLY", + "text": "N\u00E3o" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Hi {{1}}, were we able to solve the issue that you were facing?" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Yes" + }, + { + "type": "QUICK_REPLY", + "text": "No" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Halo {{1}}, apakah kami bisa mengatasi masalah yang sedang Anda hadapi?" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Ya" + }, + { + "type": "QUICK_REPLY", + "text": "Tidak" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Hola, {{1}}. \u00BFPudiste solucionar el problema que ten\u00EDas?" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "S\u00ED" + }, + { + "type": "QUICK_REPLY", + "text": "No" + } + ] + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Tu entrada para *{{1}}*\n*Hora* - {{2}}\n*Lugar* - {{3}}\n*Asientos* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Seu ingresso para *{{1}}*\n*Hor\u00E1rio* - {{2}}\n*Local* - {{3}}\n*Assentos* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Your ticket for *{{1}}*\n*Time* - {{2}}\n*Venue* - {{3}}\n*Seats* - {{4}}" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Tiket Anda untuk *{{1}}*\n*Waktu* - {{2}}\n*Tempat* - {{3}}\n*Kursi* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Your package has been shipped. It will be delivered in {{1}} business days." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Seu pacote foi enviado. Ele ser\u00E1 entregue em {{1}} dias \u00FAteis." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "\u00F3 tu paquete. La entrega se realizar\u00E1 en {{1}} d\u00ED." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Paket Anda sudah dikirim. Paket akan sampai dalam {{1}} hari kerja." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "appointment_reminder", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Dear {{1}} {{2}}, your next appointment with {{3}} is scheduled for {{4}}. Reply YES to confirm.", + "example": { + "body_text": [ + [ + "Eugenia", + "Lopez", + "Lamna Healthcare", + "September 25, 2022 at 9:00 AM" + ] + ] + } + } + ] + } + }, + { + "name": "order_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Your {{1}} order has been placed. Track order updates {{2}} Reply HELP for help." + } + ] + } + } + ], + "nextLink": "/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview\u0026continuationToken=MjQZD" + } + }, + { + "RequestUri": "https://sanitized.communication.azure.com/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview\u0026continuationToken=MjQZD", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-ed568cd511b864a9aeccc81aaad752de-d943206472d67079-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "865b2c0e3c8ac241ad864b537ae18160", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:17 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:17 GMT", + "MS-CV": "D0Geczfgq0SNStVwrBGXlQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "03a0gZQAAAAAFoJ3bQj82RZq2b\u002BaUk7ZMWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "440ms" + }, + "ResponseBody": { + "value": [] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "307047532", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesShouldSucceedAsync.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesShouldSucceedAsync.json new file mode 100644 index 0000000000000..d3c816460e0fd --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesShouldSucceedAsync.json @@ -0,0 +1,723 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-011a3fe03f19fcbfa4178d42ef8e5d9a-64cce9f7766f2ea3-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "efb9e77c0d6a1d4979fd3ec2afdf693c", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:19 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "9833", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:19 GMT", + "MS-CV": "CECycpoKAEuAetLY0HvRbw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0360gZQAAAAAAArMCtdFwQJeQwoVSowOIWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "376ms" + }, + "ResponseBody": { + "value": [ + { + "name": "optin_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Reply {{1}} to receive {{2}}. Txt {{3}} for HELP, Txt {{4}} to opt-out.", + "example": { + "body_text": [ + [ + "Y", + "appointment reminders", + "HELP", + "STOP" + ] + ] + } + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "This is your flight confirmation for {{1}}-{{2}} on {{3}}." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Esta \u00E9 a sua confirma\u00E7\u00E3o de voo para {{1}}-{{2}} em {{3}}." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Confirmamos tu vuelo a {{1}}-{{2}} para el {{3}}." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Ini merupakan konfirmasi penerbangan Anda untuk {{1}}-{{2}} di {{3}}." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Terima kasih sudah membeli {{1}}! Kami menghargai masukan Anda dan ingin mempelajari lebih lanjut terkait pengalaman Anda." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Ikuti survei", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Thank you for purchasing {{1}}! We value your feedback and would like to learn more about your experience." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Take Survey", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Agradecemos a aquisi\u00E7\u00E3o de {{1}}! Valorizamos seu feedback e gostar\u00EDamos de saber mais sobre sua experi\u00EAncia." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Responder \u00E0 pesquisa", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "\u00A1Gracias por comprar {{1}}! Valoramos tus comentarios y nos gustar\u00EDa saber c\u00F3mo fue tu experiencia." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Responder encuesta", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "Jam diskon telah tiba! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nBergembiralah dan nikmati hari Anda. \uD83C\uDF89\nTempat: {{1}}\nWaktu: {{2}}" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "\u00A1Lleg\u00F3 el happy hour! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nA divertirse y disfrutar. \uD83C\uDF89\nLugar: {{1}}\nHora: {{2}}" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "O happy hour chegou! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nSeja feliz e aproveite o dia. \uD83C\uDF89\nLocal: {{1}}\nHor\u00E1rio: {{2}}" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "Happy hour is here! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nPlease be merry and enjoy the day. \uD83C\uDF89\nVenue: {{1}}\nTime: {{2}}" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Oi, {{1}}. N\u00F3s conseguimos resolver o problema que voc\u00EA estava enfrentando?" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Sim" + }, + { + "type": "QUICK_REPLY", + "text": "N\u00E3o" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Hi {{1}}, were we able to solve the issue that you were facing?" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Yes" + }, + { + "type": "QUICK_REPLY", + "text": "No" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Halo {{1}}, apakah kami bisa mengatasi masalah yang sedang Anda hadapi?" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Ya" + }, + { + "type": "QUICK_REPLY", + "text": "Tidak" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Hola, {{1}}. \u00BFPudiste solucionar el problema que ten\u00EDas?" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "S\u00ED" + }, + { + "type": "QUICK_REPLY", + "text": "No" + } + ] + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Tu entrada para *{{1}}*\n*Hora* - {{2}}\n*Lugar* - {{3}}\n*Asientos* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Seu ingresso para *{{1}}*\n*Hor\u00E1rio* - {{2}}\n*Local* - {{3}}\n*Assentos* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Your ticket for *{{1}}*\n*Time* - {{2}}\n*Venue* - {{3}}\n*Seats* - {{4}}" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Tiket Anda untuk *{{1}}*\n*Waktu* - {{2}}\n*Tempat* - {{3}}\n*Kursi* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Your package has been shipped. It will be delivered in {{1}} business days." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Seu pacote foi enviado. Ele ser\u00E1 entregue em {{1}} dias \u00FAteis." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "\u00F3 tu paquete. La entrega se realizar\u00E1 en {{1}} d\u00ED." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Paket Anda sudah dikirim. Paket akan sampai dalam {{1}} hari kerja." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "appointment_reminder", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Dear {{1}} {{2}}, your next appointment with {{3}} is scheduled for {{4}}. Reply YES to confirm.", + "example": { + "body_text": [ + [ + "Eugenia", + "Lopez", + "Lamna Healthcare", + "September 25, 2022 at 9:00 AM" + ] + ] + } + } + ] + } + }, + { + "name": "order_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Your {{1}} order has been placed. Track order updates {{2}} Reply HELP for help." + } + ] + } + } + ], + "nextLink": "/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview\u0026continuationToken=MjQZD" + } + }, + { + "RequestUri": "https://sanitized.communication.azure.com/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview\u0026continuationToken=MjQZD", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-819ca6c0b23ddd961c0de6304fc36809-269437e3bf197793-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9491b3811273fa6ff6769b27e2e75fdc", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:19 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:19 GMT", + "MS-CV": "I1RfSdPPFk\u002BtPlnaorPJoA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04K0gZQAAAACOc\u002BOaK3qOSqEXfw\u002BA6jAmWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "325ms" + }, + "ResponseBody": { + "value": [] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "221729722", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesWithAzureKeyCredentialShouldSucceed.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesWithAzureKeyCredentialShouldSucceed.json new file mode 100644 index 0000000000000..e3228b1c784d7 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesWithAzureKeyCredentialShouldSucceed.json @@ -0,0 +1,723 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-aaf19dc41005bafcd0b5228b9364f7d1-0ad7114f5adeb89a-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "a9d52edc108c9fc4551e6c10e08d4f4c", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:18 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "9833", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:18 GMT", + "MS-CV": "cOKPLQZ8HUSmXEuHv7l36w.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "03q0gZQAAAAAcrz/IW1UmRLvrDycf\u002B85TWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "410ms" + }, + "ResponseBody": { + "value": [ + { + "name": "optin_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Reply {{1}} to receive {{2}}. Txt {{3}} for HELP, Txt {{4}} to opt-out.", + "example": { + "body_text": [ + [ + "Y", + "appointment reminders", + "HELP", + "STOP" + ] + ] + } + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "This is your flight confirmation for {{1}}-{{2}} on {{3}}." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Esta \u00E9 a sua confirma\u00E7\u00E3o de voo para {{1}}-{{2}} em {{3}}." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Confirmamos tu vuelo a {{1}}-{{2}} para el {{3}}." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Ini merupakan konfirmasi penerbangan Anda untuk {{1}}-{{2}} di {{3}}." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Terima kasih sudah membeli {{1}}! Kami menghargai masukan Anda dan ingin mempelajari lebih lanjut terkait pengalaman Anda." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Ikuti survei", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Thank you for purchasing {{1}}! We value your feedback and would like to learn more about your experience." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Take Survey", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Agradecemos a aquisi\u00E7\u00E3o de {{1}}! Valorizamos seu feedback e gostar\u00EDamos de saber mais sobre sua experi\u00EAncia." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Responder \u00E0 pesquisa", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "\u00A1Gracias por comprar {{1}}! Valoramos tus comentarios y nos gustar\u00EDa saber c\u00F3mo fue tu experiencia." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Responder encuesta", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "Jam diskon telah tiba! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nBergembiralah dan nikmati hari Anda. \uD83C\uDF89\nTempat: {{1}}\nWaktu: {{2}}" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "\u00A1Lleg\u00F3 el happy hour! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nA divertirse y disfrutar. \uD83C\uDF89\nLugar: {{1}}\nHora: {{2}}" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "O happy hour chegou! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nSeja feliz e aproveite o dia. \uD83C\uDF89\nLocal: {{1}}\nHor\u00E1rio: {{2}}" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "Happy hour is here! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nPlease be merry and enjoy the day. \uD83C\uDF89\nVenue: {{1}}\nTime: {{2}}" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Oi, {{1}}. N\u00F3s conseguimos resolver o problema que voc\u00EA estava enfrentando?" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Sim" + }, + { + "type": "QUICK_REPLY", + "text": "N\u00E3o" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Hi {{1}}, were we able to solve the issue that you were facing?" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Yes" + }, + { + "type": "QUICK_REPLY", + "text": "No" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Halo {{1}}, apakah kami bisa mengatasi masalah yang sedang Anda hadapi?" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Ya" + }, + { + "type": "QUICK_REPLY", + "text": "Tidak" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Hola, {{1}}. \u00BFPudiste solucionar el problema que ten\u00EDas?" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "S\u00ED" + }, + { + "type": "QUICK_REPLY", + "text": "No" + } + ] + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Tu entrada para *{{1}}*\n*Hora* - {{2}}\n*Lugar* - {{3}}\n*Asientos* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Seu ingresso para *{{1}}*\n*Hor\u00E1rio* - {{2}}\n*Local* - {{3}}\n*Assentos* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Your ticket for *{{1}}*\n*Time* - {{2}}\n*Venue* - {{3}}\n*Seats* - {{4}}" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Tiket Anda untuk *{{1}}*\n*Waktu* - {{2}}\n*Tempat* - {{3}}\n*Kursi* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Your package has been shipped. It will be delivered in {{1}} business days." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Seu pacote foi enviado. Ele ser\u00E1 entregue em {{1}} dias \u00FAteis." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "\u00F3 tu paquete. La entrega se realizar\u00E1 en {{1}} d\u00ED." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Paket Anda sudah dikirim. Paket akan sampai dalam {{1}} hari kerja." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "appointment_reminder", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Dear {{1}} {{2}}, your next appointment with {{3}} is scheduled for {{4}}. Reply YES to confirm.", + "example": { + "body_text": [ + [ + "Eugenia", + "Lopez", + "Lamna Healthcare", + "September 25, 2022 at 9:00 AM" + ] + ] + } + } + ] + } + }, + { + "name": "order_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Your {{1}} order has been placed. Track order updates {{2}} Reply HELP for help." + } + ] + } + } + ], + "nextLink": "/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview\u0026continuationToken=MjQZD" + } + }, + { + "RequestUri": "https://sanitized.communication.azure.com/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview\u0026continuationToken=MjQZD", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-1bac7abff5f0e9ef2f00b3df2e6f5926-c6333d834b580bae-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9a89f7751bc9c5e37a78c0a96dab4187", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:18 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:18 GMT", + "MS-CV": "npKJcuovqEeZPHWdTALfCQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0360gZQAAAAAfHNNQWWPoTbJsMpzdwlP6WVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "339ms" + }, + "ResponseBody": { + "value": [] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "2063248734", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesWithAzureKeyCredentialShouldSucceedAsync.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesWithAzureKeyCredentialShouldSucceedAsync.json new file mode 100644 index 0000000000000..c680676a6d3a9 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/MessageTemplateClientLiveTests/GetTemplatesWithAzureKeyCredentialShouldSucceedAsync.json @@ -0,0 +1,723 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-002f3498c8a48460f230f8ff846da6eb-22c6d8db6ac095e3-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2ee392ebecdd6b787b444eccb46c4e43", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:20 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "9833", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:20 GMT", + "MS-CV": "W/UMsv\u002BlckS20OBwgQILcA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04K0gZQAAAABW8m13NEJySJPAVxyfnx0AWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "367ms" + }, + "ResponseBody": { + "value": [ + { + "name": "optin_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Reply {{1}} to receive {{2}}. Txt {{3}} for HELP, Txt {{4}} to opt-out.", + "example": { + "body_text": [ + [ + "Y", + "appointment reminders", + "HELP", + "STOP" + ] + ] + } + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "This is your flight confirmation for {{1}}-{{2}} on {{3}}." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Esta \u00E9 a sua confirma\u00E7\u00E3o de voo para {{1}}-{{2}} em {{3}}." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Confirmamos tu vuelo a {{1}}-{{2}} para el {{3}}." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_flight_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "DOCUMENT" + }, + { + "type": "BODY", + "text": "Ini merupakan konfirmasi penerbangan Anda untuk {{1}}-{{2}} di {{3}}." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Terima kasih sudah membeli {{1}}! Kami menghargai masukan Anda dan ingin mempelajari lebih lanjut terkait pengalaman Anda." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Ikuti survei", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Thank you for purchasing {{1}}! We value your feedback and would like to learn more about your experience." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Take Survey", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Agradecemos a aquisi\u00E7\u00E3o de {{1}}! Valorizamos seu feedback e gostar\u00EDamos de saber mais sobre sua experi\u00EAncia." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Responder \u00E0 pesquisa", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_purchase_feedback", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "\u00A1Gracias por comprar {{1}}! Valoramos tus comentarios y nos gustar\u00EDa saber c\u00F3mo fue tu experiencia." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "URL", + "text": "Responder encuesta", + "url": "https://www.example.com/" + } + ] + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "Jam diskon telah tiba! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nBergembiralah dan nikmati hari Anda. \uD83C\uDF89\nTempat: {{1}}\nWaktu: {{2}}" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "\u00A1Lleg\u00F3 el happy hour! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nA divertirse y disfrutar. \uD83C\uDF89\nLugar: {{1}}\nHora: {{2}}" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "O happy hour chegou! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nSeja feliz e aproveite o dia. \uD83C\uDF89\nLocal: {{1}}\nHor\u00E1rio: {{2}}" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_happy_hour_announcement", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "VIDEO" + }, + { + "type": "BODY", + "text": "Happy hour is here! \uD83C\uDF7A\uD83D\uDE00\uD83C\uDF78\nPlease be merry and enjoy the day. \uD83C\uDF89\nVenue: {{1}}\nTime: {{2}}" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Oi, {{1}}. N\u00F3s conseguimos resolver o problema que voc\u00EA estava enfrentando?" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Sim" + }, + { + "type": "QUICK_REPLY", + "text": "N\u00E3o" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Hi {{1}}, were we able to solve the issue that you were facing?" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Yes" + }, + { + "type": "QUICK_REPLY", + "text": "No" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Halo {{1}}, apakah kami bisa mengatasi masalah yang sedang Anda hadapi?" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "Ya" + }, + { + "type": "QUICK_REPLY", + "text": "Tidak" + } + ] + } + ] + } + }, + { + "name": "sample_issue_resolution", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Hola, {{1}}. \u00BFPudiste solucionar el problema que ten\u00EDas?" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + }, + { + "type": "BUTTONS", + "buttons": [ + { + "type": "QUICK_REPLY", + "text": "S\u00ED" + }, + { + "type": "QUICK_REPLY", + "text": "No" + } + ] + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Tu entrada para *{{1}}*\n*Hora* - {{2}}\n*Lugar* - {{3}}\n*Asientos* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Seu ingresso para *{{1}}*\n*Hor\u00E1rio* - {{2}}\n*Local* - {{3}}\n*Assentos* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Your ticket for *{{1}}*\n*Time* - {{2}}\n*Venue* - {{3}}\n*Seats* - {{4}}" + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_movie_ticket_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "HEADER", + "format": "IMAGE" + }, + { + "type": "BODY", + "text": "Tiket Anda untuk *{{1}}*\n*Waktu* - {{2}}\n*Tempat* - {{3}}\n*Kursi* - {{4}}" + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Your package has been shipped. It will be delivered in {{1}} business days." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "pt_BR", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Seu pacote foi enviado. Ele ser\u00E1 entregue em {{1}} dias \u00FAteis." + }, + { + "type": "FOOTER", + "text": "Esta mensagem \u00E9 de uma empresa n\u00E3o verificada." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "es", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "\u00F3 tu paquete. La entrega se realizar\u00E1 en {{1}} d\u00ED." + }, + { + "type": "FOOTER", + "text": "Este mensaje proviene de un negocio no verificado." + } + ] + } + }, + { + "name": "sample_shipping_confirmation", + "language": "id", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Paket Anda sudah dikirim. Paket akan sampai dalam {{1}} hari kerja." + }, + { + "type": "FOOTER", + "text": "Pesan ini berasal dari bisnis yang tidak terverifikasi." + } + ] + } + }, + { + "name": "appointment_reminder", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Dear {{1}} {{2}}, your next appointment with {{3}} is scheduled for {{4}}. Reply YES to confirm.", + "example": { + "body_text": [ + [ + "Eugenia", + "Lopez", + "Lamna Healthcare", + "September 25, 2022 at 9:00 AM" + ] + ] + } + } + ] + } + }, + { + "name": "order_confirmation", + "language": "en_US", + "channelType": "whatsApp", + "status": "approved", + "whatsApp": { + "content": [ + { + "type": "BODY", + "text": "Your {{1}} order has been placed. Track order updates {{2}} Reply HELP for help." + } + ] + } + } + ], + "nextLink": "/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview\u0026continuationToken=MjQZD" + } + }, + { + "RequestUri": "https://sanitized.communication.azure.com/messages/channels/59aced66-68ae-4b7a-8430-36f4c5dfa328/templates?api-version=2023-08-24-preview\u0026continuationToken=MjQZD", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-63e66c13220b3335fcbdb4df1ed96f6a-eb2f17bfb01d43af-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1aa6ae78185f51d4580dc8de10c4a984", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:20 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:20 GMT", + "MS-CV": "rqf4J1VvAk212bBLYuXaeQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04K0gZQAAAAAl4x0KVzvNRaJ8koPoFkw/WVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "337ms" + }, + "ResponseBody": { + "value": [] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1377625755", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendFlightConfirmationTemplateMessageShouldSucceed.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendFlightConfirmationTemplateMessageShouldSucceed.json new file mode 100644 index 0000000000000..590a7dd4bda07 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendFlightConfirmationTemplateMessageShouldSucceed.json @@ -0,0 +1,104 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "584", + "Content-Type": "application/json", + "traceparent": "00-5b302ea9abb9c00f631dfe69dbe8d2d0-b87cd84b819a53a5-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c0cebc46eeecc75e0bc5b321ea6d0f82", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:21 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_flight_confirmation", + "language": "en_us", + "values": { + "document": { + "kind": "document", + "document": { + "url": "https://go.microsoft.com/fwlink/?linkid=2131549" + } + }, + "firstName": { + "kind": "text", + "text": { + "text": "Gloria" + } + }, + "lastName": { + "kind": "text", + "text": { + "text": "Li" + } + }, + "date": { + "kind": "text", + "text": { + "text": "July 1st, 2023" + } + } + }, + "bindings": { + "whatsApp": { + "header": [ + { + "refValue": "document" + } + ], + "body": [ + { + "refValue": "firstName" + }, + { + "refValue": "lastName" + }, + { + "refValue": "date" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:21 GMT", + "MS-CV": "x/NvXQjmrEKJhELrhdK9lQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04a0gZQAAAABGakUZz/AzQ63klzOmukJMWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "870ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "973115cb-7c71-4447-8b69-ca63f52107e3", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1148499426", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendFlightConfirmationTemplateMessageShouldSucceedAsync.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendFlightConfirmationTemplateMessageShouldSucceedAsync.json new file mode 100644 index 0000000000000..11bb274c003e0 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendFlightConfirmationTemplateMessageShouldSucceedAsync.json @@ -0,0 +1,104 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "584", + "Content-Type": "application/json", + "traceparent": "00-dac936a57341dff0d9745b4fa978bab5-7ef27d78253f922e-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "16559d33213de4b550542f081050671e", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:28 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_flight_confirmation", + "language": "en_us", + "values": { + "document": { + "kind": "document", + "document": { + "url": "https://go.microsoft.com/fwlink/?linkid=2131549" + } + }, + "firstName": { + "kind": "text", + "text": { + "text": "Gloria" + } + }, + "lastName": { + "kind": "text", + "text": { + "text": "Li" + } + }, + "date": { + "kind": "text", + "text": { + "text": "July 1st, 2023" + } + } + }, + "bindings": { + "whatsApp": { + "header": [ + { + "refValue": "document" + } + ], + "body": [ + { + "refValue": "firstName" + }, + { + "refValue": "lastName" + }, + { + "refValue": "date" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:28 GMT", + "MS-CV": "JqdH6Sk4wUGI1V5eW7VAzA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "06K0gZQAAAABzg34ku7ZrRrkccoq7KgiZWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "803ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "1851243d-de4d-4923-a39d-c31016e6e0d1", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1598327269", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendHappyHourAnnocementTemplateMessageShouldSucceed.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendHappyHourAnnocementTemplateMessageShouldSucceed.json new file mode 100644 index 0000000000000..8ea56a2b5aef9 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendHappyHourAnnocementTemplateMessageShouldSucceed.json @@ -0,0 +1,95 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "519", + "Content-Type": "application/json", + "traceparent": "00-3d664034721f674f6386bfb96f8c9ec6-68032dc64a7533b3-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ed9f2d6c6e5bd4362604199b56d95a69", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:22 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_happy_hour_announcement", + "language": "en_us", + "values": { + "venue": { + "kind": "text", + "text": { + "text": "Starbucks" + } + }, + "time": { + "kind": "text", + "text": { + "text": "Today 2-4PM" + } + }, + "video": { + "kind": "video", + "video": { + "url": "https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4" + } + } + }, + "bindings": { + "whatsApp": { + "header": [ + { + "refValue": "video" + } + ], + "body": [ + { + "refValue": "venue" + }, + { + "refValue": "time" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:22 GMT", + "MS-CV": "AnsPlmXunUCI1P4Wejk6xQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04q0gZQAAAADnbAFnc4G6SLP6f6LHfdtmWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "837ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "d6254a6d-0556-4a81-8627-f75320bd7d09", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1238209351", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendHappyHourAnnocementTemplateMessageShouldSucceedAsync.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendHappyHourAnnocementTemplateMessageShouldSucceedAsync.json new file mode 100644 index 0000000000000..781daf6ccf761 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendHappyHourAnnocementTemplateMessageShouldSucceedAsync.json @@ -0,0 +1,95 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "519", + "Content-Type": "application/json", + "traceparent": "00-8c1ba28a05a241978bb05ee096a24826-e540bf11a4767a89-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1f70ecea5a455aa5532a232266791aac", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:29 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_happy_hour_announcement", + "language": "en_us", + "values": { + "venue": { + "kind": "text", + "text": { + "text": "Starbucks" + } + }, + "time": { + "kind": "text", + "text": { + "text": "Today 2-4PM" + } + }, + "video": { + "kind": "video", + "video": { + "url": "https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4" + } + } + }, + "bindings": { + "whatsApp": { + "header": [ + { + "refValue": "video" + } + ], + "body": [ + { + "refValue": "venue" + }, + { + "refValue": "time" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:29 GMT", + "MS-CV": "Zh/m2eCriEeW8MvEapZZQQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "06a0gZQAAAABjP7mBv30CTKjJeqm72qMhWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "818ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "194c60fb-0ff1-4492-8afe-abfccb052f34", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1767657619", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendIssueResolutionTemplateMessageShouldSucceed.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendIssueResolutionTemplateMessageShouldSucceed.json new file mode 100644 index 0000000000000..ba304e3c0bf58 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendIssueResolutionTemplateMessageShouldSucceed.json @@ -0,0 +1,97 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "507", + "Content-Type": "application/json", + "traceparent": "00-c91ff39b5d9256151777c286fb2930d4-bc6a49d24b15a8ba-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "5682e393246220dc2ffa1c9a29a74f06", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:23 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_issue_resolution", + "language": "en_us", + "values": { + "name": { + "kind": "text", + "text": { + "text": "Gloria" + } + }, + "yes": { + "kind": "quick_action", + "quickAction": { + "payload": "Yay!" + } + }, + "no": { + "kind": "quick_action", + "quickAction": { + "payload": "Nay!" + } + } + }, + "bindings": { + "whatsApp": { + "body": [ + { + "refValue": "name" + } + ], + "button": [ + { + "subType": "quickReply", + "refValue": "yes" + }, + { + "subType": "quickReply", + "refValue": "no" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:23 GMT", + "MS-CV": "ZrDgRvpSJEKn45UDZqY6lA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0460gZQAAAAAczrG8lIWTRr\u002BH\u002BKmjZUHYWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "642ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "77673d05-57de-4926-b22a-973e348ce44f", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1388647227", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendIssueResolutionTemplateMessageShouldSucceedAsync.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendIssueResolutionTemplateMessageShouldSucceedAsync.json new file mode 100644 index 0000000000000..4cb36c0ae984c --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendIssueResolutionTemplateMessageShouldSucceedAsync.json @@ -0,0 +1,97 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "507", + "Content-Type": "application/json", + "traceparent": "00-6d0fb03b868c08da6478265c59bbf923-d6fab23b44ad7f92-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3605649c32ad65980526ecd19e6f197e", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:30 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_issue_resolution", + "language": "en_us", + "values": { + "name": { + "kind": "text", + "text": { + "text": "Gloria" + } + }, + "yes": { + "kind": "quick_action", + "quickAction": { + "payload": "Yay!" + } + }, + "no": { + "kind": "quick_action", + "quickAction": { + "payload": "Nay!" + } + } + }, + "bindings": { + "whatsApp": { + "body": [ + { + "refValue": "name" + } + ], + "button": [ + { + "subType": "quickReply", + "refValue": "yes" + }, + { + "subType": "quickReply", + "refValue": "no" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:30 GMT", + "MS-CV": "fye6SSfDHkezlLGxvthDhw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "06q0gZQAAAADi54HnAk3eQJokVKM\u002B/YCMWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "745ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "eaaba955-e6f9-4cd9-96c8-f645f9d250e9", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1703708581", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageShouldSucceed.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageShouldSucceed.json new file mode 100644 index 0000000000000..81e91fe198631 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageShouldSucceed.json @@ -0,0 +1,55 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "126", + "Content-Type": "application/json", + "traceparent": "00-a19b8d7e5b13fd1afce0167aec3bce86-b4d288d5ee0b9624-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fb098fd65d54824e5e846fc9674db0c4", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:24 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "text", + "content": "LiveTest" + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:24 GMT", + "MS-CV": "ZIHd9FLNMU6nhxdZ3\u002Bjfbg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05K0gZQAAAADyMGec3lgrR5g0sQsmsXQJWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "728ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "3627b7be-1d1b-4506-9aa9-f38e07235191", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1281624781", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageShouldSucceedAsync.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageShouldSucceedAsync.json new file mode 100644 index 0000000000000..27686b24ba572 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageShouldSucceedAsync.json @@ -0,0 +1,55 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "126", + "Content-Type": "application/json", + "traceparent": "00-28291313fcabb2734dbbbe464f6b17bc-30b2b90f988ba3c2-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b66516d31b3a94219e3ab990d3b7247e", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:31 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "text", + "content": "LiveTest" + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:31 GMT", + "MS-CV": "GO2FCAzOUkaLPShPRD5Umw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0660gZQAAAACtE3\u002BLpKqTRKUjpLdT6sUmWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "724ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "82eff05b-8d81-43e8-b760-a0fcf81d2764", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "800021773", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageWithAzureKeyCredentialShouldSucceed.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageWithAzureKeyCredentialShouldSucceed.json new file mode 100644 index 0000000000000..b6d591cbe9326 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageWithAzureKeyCredentialShouldSucceed.json @@ -0,0 +1,55 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "126", + "Content-Type": "application/json", + "traceparent": "00-b9ccba99cf859a0f08517056b168adf5-f31f09e84ac8fdba-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "0594c92d3d032fa3b57b67c8e02b4ef6", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:24 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "text", + "content": "LiveTest" + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:25 GMT", + "MS-CV": "Gpo\u002BsOhLAkON12CWErZSow.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05a0gZQAAAAAvIsKSMUUhQ6cSzgGCdixFWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "731ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "b77d2e27-721a-4a85-b8c2-49229592ed7e", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1061618726", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageWithAzureKeyCredentialShouldSucceedAsync.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageWithAzureKeyCredentialShouldSucceedAsync.json new file mode 100644 index 0000000000000..928767a21d976 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMessageWithAzureKeyCredentialShouldSucceedAsync.json @@ -0,0 +1,55 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "126", + "Content-Type": "application/json", + "traceparent": "00-0f206a1b799efa69be54d322bcfeac63-d8a8563506aaecf6-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fb76eef7f35060afa689256f8e41d40b", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:31 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "text", + "content": "LiveTest" + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:32 GMT", + "MS-CV": "LJRUTRFezk\u002BjQZcBHC0fGQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0660gZQAAAACGCnGn5Q9STbDvRqzmwqTXWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "747ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "e909a302-c3a7-4a8e-b606-e2441411c1e8", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1573986230", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMovieTicketConfirmationTemplateMessageShouldSucceed.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMovieTicketConfirmationTemplateMessageShouldSucceed.json new file mode 100644 index 0000000000000..22e33c9e7eb63 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMovieTicketConfirmationTemplateMessageShouldSucceed.json @@ -0,0 +1,113 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "679", + "Content-Type": "application/json", + "traceparent": "00-28a069dec931b615a4a192902c7bdae4-ccbe83da90024398-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c6d70676df5992d30b28968e6ddee0d0", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:25 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_movie_ticket_confirmation", + "language": "en_us", + "values": { + "image": { + "kind": "image", + "image": { + "url": "https://upload.wikimedia.org/wikipedia/commons/3/30/Building92microsoft.jpg" + } + }, + "title": { + "kind": "text", + "text": { + "text": "Avengers" + } + }, + "time": { + "kind": "text", + "text": { + "text": "July 1st, 2023 12:30PM" + } + }, + "venue": { + "kind": "text", + "text": { + "text": "Cineplex" + } + }, + "seats": { + "kind": "text", + "text": { + "text": "Seat 1A" + } + } + }, + "bindings": { + "whatsApp": { + "header": [ + { + "refValue": "image" + } + ], + "body": [ + { + "refValue": "title" + }, + { + "refValue": "time" + }, + { + "refValue": "venue" + }, + { + "refValue": "seats" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:26 GMT", + "MS-CV": "eeFMv\u002BsqPUiznrNh9XsuRA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05a0gZQAAAABORaHDlyiKTZjQiCJGKEyFWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "789ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "ef59fa36-dec4-415e-b784-ebc01082370f", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1486206713", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMovieTicketConfirmationTemplateMessageShouldSucceedAsync.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMovieTicketConfirmationTemplateMessageShouldSucceedAsync.json new file mode 100644 index 0000000000000..bbfb48d3fe32b --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendMovieTicketConfirmationTemplateMessageShouldSucceedAsync.json @@ -0,0 +1,113 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "679", + "Content-Type": "application/json", + "traceparent": "00-373af7b647622765e299dec47f79fae4-1d0c7e7a9dd25051-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ac66a37a6fc67070d329bcc5bb9fef70", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:32 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_movie_ticket_confirmation", + "language": "en_us", + "values": { + "image": { + "kind": "image", + "image": { + "url": "https://upload.wikimedia.org/wikipedia/commons/3/30/Building92microsoft.jpg" + } + }, + "title": { + "kind": "text", + "text": { + "text": "Avengers" + } + }, + "time": { + "kind": "text", + "text": { + "text": "July 1st, 2023 12:30PM" + } + }, + "venue": { + "kind": "text", + "text": { + "text": "Cineplex" + } + }, + "seats": { + "kind": "text", + "text": { + "text": "Seat 1A" + } + } + }, + "bindings": { + "whatsApp": { + "header": [ + { + "refValue": "image" + } + ], + "body": [ + { + "refValue": "title" + }, + { + "refValue": "time" + }, + { + "refValue": "venue" + }, + { + "refValue": "seats" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:32 GMT", + "MS-CV": "0P0MHOLtSEW5XPRLAshBuA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "07K0gZQAAAABcrp2ZajUFS4N\u002BBuFIG/KLWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "788ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "afda89b5-906f-4131-b98b-3f25f6f7564c", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "48928599", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendPurchaseFeedbackTemplateMessageShouldSucceed.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendPurchaseFeedbackTemplateMessageShouldSucceed.json new file mode 100644 index 0000000000000..b270369016485 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendPurchaseFeedbackTemplateMessageShouldSucceed.json @@ -0,0 +1,86 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "456", + "Content-Type": "application/json", + "traceparent": "00-c7c3e7a3626b5967930ed5cf378fa681-e72bfd2a03a8e038-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f3855ba96456edafd257c159fe5a515e", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:26 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_purchase_feedback", + "language": "en_us", + "values": { + "image": { + "kind": "image", + "image": { + "url": "https://upload.wikimedia.org/wikipedia/commons/3/30/Building92microsoft.jpg" + } + }, + "product": { + "kind": "text", + "text": { + "text": "Microsoft Office" + } + } + }, + "bindings": { + "whatsApp": { + "header": [ + { + "refValue": "image" + } + ], + "body": [ + { + "refValue": "product" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:26 GMT", + "MS-CV": "3XJpA1EE\u002BEuvg8eA5pH9qw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05q0gZQAAAACv3m4YFraBS4ouf/dAwXXPWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "772ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "9d32a9ba-535a-45a3-b314-cf89f2d1c6fc", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "200691319", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendPurchaseFeedbackTemplateMessageShouldSucceedAsync.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendPurchaseFeedbackTemplateMessageShouldSucceedAsync.json new file mode 100644 index 0000000000000..cdface20e8650 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendPurchaseFeedbackTemplateMessageShouldSucceedAsync.json @@ -0,0 +1,86 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "456", + "Content-Type": "application/json", + "traceparent": "00-913861f2b409168794dfe53454963f50-7adf8c14a29e5b7d-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9af600b4717209ed7b6413a938b3c74a", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:33 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_purchase_feedback", + "language": "en_us", + "values": { + "image": { + "kind": "image", + "image": { + "url": "https://upload.wikimedia.org/wikipedia/commons/3/30/Building92microsoft.jpg" + } + }, + "product": { + "kind": "text", + "text": { + "text": "Microsoft Office" + } + } + }, + "bindings": { + "whatsApp": { + "header": [ + { + "refValue": "image" + } + ], + "body": [ + { + "refValue": "product" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:33 GMT", + "MS-CV": "/Fs2gutpikuYNqK17XF8sw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "07a0gZQAAAAB767DXOlxrSJyaGRAqau0jWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "818ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "a8224921-46df-4880-95a9-fcf7a4552047", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1926562621", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendShippingConfirmationTemplateMessageShouldSucceed.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendShippingConfirmationTemplateMessageShouldSucceed.json new file mode 100644 index 0000000000000..7a4b8f0aad25c --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendShippingConfirmationTemplateMessageShouldSucceed.json @@ -0,0 +1,75 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "298", + "Content-Type": "application/json", + "traceparent": "00-c5094b4dab6e94babfa4474517fdceca-b63405a9b5f0ba06-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "64ad9df3e9f199cd4d8163643796ea15", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:27 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_shipping_confirmation", + "language": "en_us", + "values": { + "threeDays": { + "kind": "text", + "text": { + "text": "3" + } + } + }, + "bindings": { + "whatsApp": { + "body": [ + { + "refValue": "threeDays" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:27 GMT", + "MS-CV": "sgJSvemGzkS2nQ7\u002BkUAV0g.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0560gZQAAAADh70gXXPljTLoAHPCD1L9mWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "731ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "f9b7d2c0-2203-4efa-ab44-7ce810564491", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1830441038", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendShippingConfirmationTemplateMessageShouldSucceedAsync.json b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendShippingConfirmationTemplateMessageShouldSucceedAsync.json new file mode 100644 index 0000000000000..4085a444bcb6b --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/SessionRecords/NotificationMessagesClientLiveTests/SendShippingConfirmationTemplateMessageShouldSucceedAsync.json @@ -0,0 +1,75 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.communication.azure.com/messages/notifications/:send?api-version=2023-08-24-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "298", + "Content-Type": "application/json", + "traceparent": "00-eb20ca5d3d660ee50b61e27d7de4b63b-09c1259b41262bc8-00", + "User-Agent": "azsdk-net-Communication.Messages/1.0.0-alpha.20231006.1 (.NET 7.0.11; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "09535b8bdef4aa8251b74a2a35a5ab0b", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Sat, 07 Oct 2023 01:01:34 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelRegistrationId": "59aced66-68ae-4b7a-8430-36f4c5dfa328", + "to": [ + "\u002B16041234567" + ], + "type": "template", + "template": { + "name": "sample_shipping_confirmation", + "language": "en_us", + "values": { + "threeDays": { + "kind": "text", + "text": { + "text": "3" + } + } + }, + "bindings": { + "whatsApp": { + "body": [ + { + "refValue": "threeDays" + } + ] + } + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "api-supported-versions": "2023-02-01-preview, 2023-08-24-preview", + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sat, 07 Oct 2023 01:01:34 GMT", + "MS-CV": "bl2BfznVskaJWGHFBBpgHg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "07q0gZQAAAADXuVvCzWUGSoBtUN5uY4NzWVZSMzExMDAwMTE1MDQ1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Cache": "CONFIG_NOCACHE", + "X-Processing-Time": "766ms" + }, + "ResponseBody": { + "receipts": [ + { + "messageId": "0f574fa9-8357-41f1-b86a-cf86ac83d306", + "to": "\u002B16041234567" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1946321366", + "RECIPIENT_IDENTIFIER": "\u002B16041234567", + "SENDER_CHANNEL_REGISTRATION_ID": "59aced66-68ae-4b7a-8430-36f4c5dfa328" + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/TemplateClient/MessageTemplateClientLiveTests.cs b/sdk/communication/Azure.Communication.Messages/tests/TemplateClient/MessageTemplateClientLiveTests.cs new file mode 100644 index 0000000000000..bbb7787da395d --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/TemplateClient/MessageTemplateClientLiveTests.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Communication.Messages.Tests +{ + public class MessageTemplateClientLiveTests : MessagesLiveTestBase + { + public MessageTemplateClientLiveTests(bool isAsync) : base(isAsync) + { + } + + [Test] + public Task GetTemplatesShouldSucceed() + { + // Arrange + MessageTemplateClient messageTemplateClient = CreateInstrumentedMessageTemplateClient(); + string channelRegistrationId = TestEnvironment.SenderChannelRegistrationId; + + // Act + AsyncPageable templates = messageTemplateClient.GetTemplatesAsync(channelRegistrationId); + + // Assert + Assert.IsNotNull(templates); + var templatesEnumerable = templates.ToEnumerableAsync().Result; + Assert.IsNotEmpty(templatesEnumerable); + foreach (MessageTemplateItem template in templatesEnumerable) + { + Assert.IsNotNull(template.Name); + Assert.IsNotNull(template.Language); + } + + return Task.CompletedTask; + } + + [Test] + public Task GetTemplatesWithAzureKeyCredentialShouldSucceed() + { + // Arrange + MessageTemplateClient messageTemplateClient = CreateInstrumentedMessageTemplateClientWithAzureKeyCredential(); + string channelRegistrationId = TestEnvironment.SenderChannelRegistrationId; + + // Act + AsyncPageable templates = messageTemplateClient.GetTemplatesAsync(channelRegistrationId); + + // Assert + Assert.IsNotNull(templates); + var templatesEnumerable = templates.ToEnumerableAsync().Result; + Assert.IsNotEmpty(templatesEnumerable); + foreach (MessageTemplateItem template in templatesEnumerable) + { + Assert.IsNotNull(template.Name); + Assert.IsNotNull(template.Language); + } + + return Task.CompletedTask; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tests/TemplateClient/MessageTemplateClientTests.cs b/sdk/communication/Azure.Communication.Messages/tests/TemplateClient/MessageTemplateClientTests.cs new file mode 100644 index 0000000000000..bc4ef6d54886d --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/tests/TemplateClient/MessageTemplateClientTests.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Communication.Messages.Tests +{ + public class MessageTemplateClientTests : ClientTestBase + { + protected const string ConnectionString = "endpoint=https://contoso.azure.com/;accesskey=ZHVtbXlhY2Nlc3NrZXk="; + private const string GetTemplatesApiResponsePayload = "{\"value\":[{\"name\":\"optin_confirmation\",\"language\":\"en_US\",\"channelType\":\"whatsApp\",\"status\":\"approved\",\"whatsApp\":{\"content\":[{\"type\":\"BODY\",\"text\":\"Reply {{1}} to receive {{2}}. Txt {{3}} for HELP, Txt {{4}} to opt-out.\"}]}},{\"name\":\"sample_flight_confirmation\",\"language\":\"en_US\",\"channelType\":\"whatsApp\",\"status\":\"approved\",\"whatsApp\":{\"content\":[{\"type\":\"HEADER\",\"format\":\"DOCUMENT\"},{\"type\":\"BODY\",\"text\":\"This is your flight confirmation for {{1}}-{{2}} on {{3}}.\"},{\"type\":\"FOOTER\",\"text\":\"This message is from an unverified business.\"}]}},{\"name\":\"sample_happy_hour_announcement\",\"language\":\"pt_BR\",\"channelType\":\"whatsApp\",\"status\":\"approved\",\"whatsApp\":{\"content\":[{\"type\":\"HEADER\",\"format\":\"VIDEO\"},{\"type\":\"BODY\",\"text\":\"O happy hour chegou! \\ud83c\\udf7a😀\\ud83c\\udf78\\nSeja feliz e aproveite o dia. \\ud83c\\udf89\\nLocal: {{1}}\\nHorário: {{2}}\"},{\"type\":\"FOOTER\",\"text\":\"Esta mensagem é de uma empresa não verificada.\"}]}}]}"; + + public MessageTemplateClientTests(bool isAsync) : base(isAsync) + { + } + + [Test] + public void Constructor_InvalidParamsThrows() + { + Assert.Throws(() => new MessageTemplateClient(null)); + Assert.Throws(() => new MessageTemplateClient(string.Empty)); + Assert.Throws(() => new MessageTemplateClient(" ")); + Assert.Throws(() => new MessageTemplateClient("test")); + } + + [Test] + public async Task GetTemplates_ValidParams_ShouldSucceed() + { + //arrange + MessageTemplateClient messageTemplateClient = CreateMockMessageTemplateClient(200, GetTemplatesApiResponsePayload); + var channelId = Guid.NewGuid().ToString(); + + //act + AsyncPageable templates = messageTemplateClient.GetTemplatesAsync(channelId); + + //assert + await foreach (MessageTemplateItem template in templates) + { + Assert.IsNotNull(template.Name); + Assert.IsNotNull(template.Language); + Assert.IsNotNull(template.Status); + Assert.AreEqual(template.ChannelType, CommunicationMessagesChannelType.WhatsApp); + } + } + + [Test] + public void GetTemplates_NullChannelId_Throws() + { + //arrange + MessageTemplateClient messageTemplateClient = CreateMockMessageTemplateClient(); + + //act & assert + Assert.Throws(() => messageTemplateClient.GetTemplatesAsync(null)); + } + + [Test] + public Task GetTemplates_InvalidChannelRegistrationId_ThrowsBadRequestException() + { + //arrange + MessageTemplateClient messageTemplateClient = CreateMockMessageTemplateClient(400); + + try + { + //act + messageTemplateClient.GetTemplatesAsync("invalidChannelRegistrationId"); + } + catch (RequestFailedException requestFailedException) + { + //assert + Assert.AreEqual(400, requestFailedException.Status); + } + + return Task.CompletedTask; + } + + private MessageTemplateClient CreateMockMessageTemplateClient(int responseCode = 200, string responseContent = null) + { + var mockResponse = new MockResponse(responseCode); + if (responseContent != null) + { + mockResponse.SetContent(responseContent); + } + + var MessageTemplateClientOptions = new CommunicationMessagesClientOptions + { + Transport = new MockTransport(mockResponse) + }; + + return new MessageTemplateClient(ConnectionString, MessageTemplateClientOptions); + } + } +} diff --git a/sdk/communication/Azure.Communication.sln b/sdk/communication/Azure.Communication.sln index d44b404a05aed..e0dd68e827437 100644 --- a/sdk/communication/Azure.Communication.sln +++ b/sdk/communication/Azure.Communication.sln @@ -68,6 +68,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Communication.CallAut EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Communication.CallAutomation.Tests", "Azure.Communication.CallAutomation\tests\Azure.Communication.CallAutomation.Tests.csproj", "{8E628698-3ECB-4FA0-BDDF-62E018FDA0CA}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Communication.Messages", "Azure.Communication.Messages\src\Azure.Communication.Messages.csproj", "{EC7299A9-8563-4FF3-97E2-CB3DDE8AEFBE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Communication.Messages.Tests", "Azure.Communication.Messages\tests\Azure.Communication.Messages.Tests.csproj", "{4232B393-700D-4AC5-9358-70ED4B98B0ED}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -190,6 +194,14 @@ Global {8E628698-3ECB-4FA0-BDDF-62E018FDA0CA}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E628698-3ECB-4FA0-BDDF-62E018FDA0CA}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E628698-3ECB-4FA0-BDDF-62E018FDA0CA}.Release|Any CPU.Build.0 = Release|Any CPU + {EC7299A9-8563-4FF3-97E2-CB3DDE8AEFBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC7299A9-8563-4FF3-97E2-CB3DDE8AEFBE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC7299A9-8563-4FF3-97E2-CB3DDE8AEFBE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC7299A9-8563-4FF3-97E2-CB3DDE8AEFBE}.Release|Any CPU.Build.0 = Release|Any CPU + {4232B393-700D-4AC5-9358-70ED4B98B0ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4232B393-700D-4AC5-9358-70ED4B98B0ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4232B393-700D-4AC5-9358-70ED4B98B0ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4232B393-700D-4AC5-9358-70ED4B98B0ED}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/communication/ci.yml b/sdk/communication/ci.yml index e1d00ba3b8e4c..fd304e1b64119 100644 --- a/sdk/communication/ci.yml +++ b/sdk/communication/ci.yml @@ -39,6 +39,8 @@ extends: safeName: AzureCommunicationCallingServer - name: Azure.Communication.Chat safeName: AzureCommunicationChat + - name: Azure.Communication.Messages + safeName: AzureCommunicationMessages - name: Azure.Communication.Common safeName: AzureCommunicationCommon - name: Azure.Communication.Email 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 cd967d9566999..13faef37fefef 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml @@ -118,7 +118,7 @@ This sample shows how to call CreateLedgerEntryAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { contents = "", }); @@ -132,7 +132,7 @@ This sample shows how to call CreateLedgerEntryAsync with all parameters and req TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { contents = "", }); @@ -149,7 +149,7 @@ This sample shows how to call CreateLedgerEntry and parse the result. TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { contents = "", }); @@ -163,7 +163,7 @@ This sample shows how to call CreateLedgerEntry with all parameters and request TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { contents = "", }); @@ -494,7 +494,7 @@ This sample shows how to call CreateOrUpdateUserAsync and parse the result. TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { assignedRole = "Administrator", }); @@ -508,7 +508,7 @@ This sample shows how to call CreateOrUpdateUserAsync with all parameters and re TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { assignedRole = "Administrator", }); @@ -526,7 +526,7 @@ This sample shows how to call CreateOrUpdateUser and parse the result. TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { assignedRole = "Administrator", }); @@ -540,7 +540,7 @@ This sample shows how to call CreateOrUpdateUser with all parameters and request TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { assignedRole = "Administrator", }); 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 2dff67cad594e..68cb572380847 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 @@ -147,7 +147,7 @@ public void Example_CreateLedgerEntry_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { contents = "", }); @@ -164,7 +164,7 @@ public async Task Example_CreateLedgerEntry_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { contents = "", }); @@ -181,7 +181,7 @@ public void Example_CreateLedgerEntry_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { contents = "", }); @@ -198,7 +198,7 @@ public async Task Example_CreateLedgerEntry_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { contents = "", }); @@ -565,7 +565,7 @@ public void Example_CreateOrUpdateUser_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { assignedRole = "Administrator", }); @@ -582,7 +582,7 @@ public async Task Example_CreateOrUpdateUser_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { assignedRole = "Administrator", }); @@ -599,7 +599,7 @@ public void Example_CreateOrUpdateUser_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { assignedRole = "Administrator", }); @@ -617,7 +617,7 @@ public async Task Example_CreateOrUpdateUser_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { assignedRole = "Administrator", }); diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs index 5cf374ddc9a3b..44e41bd84a12b 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs @@ -79,7 +79,8 @@ public virtual async Task> AnalyzeTextAsync(AnalyzeT Argument.AssertNotNull(body, nameof(body)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await AnalyzeTextAsync(body.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = body.ToRequestContent(); + Response response = await AnalyzeTextAsync(content, context).ConfigureAwait(false); return Response.FromValue(AnalyzeTextResult.FromResponse(response), response); } @@ -94,7 +95,8 @@ public virtual Response AnalyzeText(AnalyzeTextOptions body, Argument.AssertNotNull(body, nameof(body)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = AnalyzeText(body.ToRequestContent(), context); + using RequestContent content = body.ToRequestContent(); + Response response = AnalyzeText(content, context); return Response.FromValue(AnalyzeTextResult.FromResponse(response), response); } @@ -187,7 +189,8 @@ public virtual async Task> AnalyzeImageAsync(Analyz Argument.AssertNotNull(body, nameof(body)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await AnalyzeImageAsync(body.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = body.ToRequestContent(); + Response response = await AnalyzeImageAsync(content, context).ConfigureAwait(false); return Response.FromValue(AnalyzeImageResult.FromResponse(response), response); } @@ -202,7 +205,8 @@ public virtual Response AnalyzeImage(AnalyzeImageOptions bod Argument.AssertNotNull(body, nameof(body)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = AnalyzeImage(body.ToRequestContent(), context); + using RequestContent content = body.ToRequestContent(); + Response response = AnalyzeImage(content, context); return Response.FromValue(AnalyzeImageResult.FromResponse(response), response); } @@ -556,7 +560,8 @@ public virtual async Task> AddBlockItemsAsync(stri Argument.AssertNotNull(addBlockItemsOptions, nameof(addBlockItemsOptions)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await AddBlockItemsAsync(blocklistName, addBlockItemsOptions.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = addBlockItemsOptions.ToRequestContent(); + Response response = await AddBlockItemsAsync(blocklistName, content, context).ConfigureAwait(false); return Response.FromValue(AddBlockItemsResult.FromResponse(response), response); } @@ -574,7 +579,8 @@ public virtual Response AddBlockItems(string blocklistName, Argument.AssertNotNull(addBlockItemsOptions, nameof(addBlockItemsOptions)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = AddBlockItems(blocklistName, addBlockItemsOptions.ToRequestContent(), context); + using RequestContent content = addBlockItemsOptions.ToRequestContent(); + Response response = AddBlockItems(blocklistName, content, context); return Response.FromValue(AddBlockItemsResult.FromResponse(response), response); } @@ -676,7 +682,8 @@ public virtual async Task RemoveBlockItemsAsync(string blocklistName, Argument.AssertNotNull(removeBlockItemsOptions, nameof(removeBlockItemsOptions)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await RemoveBlockItemsAsync(blocklistName, removeBlockItemsOptions.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = removeBlockItemsOptions.ToRequestContent(); + Response response = await RemoveBlockItemsAsync(blocklistName, content, context).ConfigureAwait(false); return response; } @@ -694,7 +701,8 @@ public virtual Response RemoveBlockItems(string blocklistName, RemoveBlockItemsO Argument.AssertNotNull(removeBlockItemsOptions, nameof(removeBlockItemsOptions)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = RemoveBlockItems(blocklistName, removeBlockItemsOptions.ToRequestContent(), context); + using RequestContent content = removeBlockItemsOptions.ToRequestContent(); + Response response = RemoveBlockItems(blocklistName, content, context); return response; } 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 02beccfefd8bb..66d75df37e287 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml @@ -61,7 +61,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { text = "", }); @@ -76,7 +76,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { text = "", categories = new object[] @@ -115,7 +115,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { text = "", }); @@ -130,7 +130,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { text = "", categories = new object[] @@ -225,7 +225,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { image = new object(), }); @@ -240,7 +240,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { image = new { @@ -273,7 +273,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { image = new object(), }); @@ -288,7 +288,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { image = new { @@ -411,7 +411,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blocklistName = "", }); @@ -426,7 +426,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blocklistName = "", description = "", @@ -446,7 +446,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blocklistName = "", }); @@ -461,7 +461,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blocklistName = "", description = "", @@ -587,7 +587,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blockItems = new object[] { @@ -608,7 +608,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blockItems = new object[] { @@ -635,7 +635,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blockItems = new object[] { @@ -656,7 +656,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blockItems = new object[] { @@ -725,7 +725,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blockItemIds = new object[] { @@ -742,7 +742,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blockItemIds = new object[] { @@ -762,7 +762,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blockItemIds = new object[] { @@ -779,7 +779,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { blockItemIds = new object[] { 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 020ba2c95eb5e..8615f5e3496a9 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 @@ -26,7 +26,7 @@ public void Example_AnalyzeText_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { text = "", }); @@ -44,7 +44,7 @@ public async Task Example_AnalyzeText_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { text = "", }); @@ -86,7 +86,7 @@ public void Example_AnalyzeText_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { text = "", categories = new object[] @@ -125,7 +125,7 @@ public async Task Example_AnalyzeText_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { text = "", categories = new object[] @@ -198,7 +198,7 @@ public void Example_AnalyzeImage_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { image = new object(), }); @@ -216,7 +216,7 @@ public async Task Example_AnalyzeImage_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { image = new object(), }); @@ -258,7 +258,7 @@ public void Example_AnalyzeImage_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { image = new { @@ -291,7 +291,7 @@ public async Task Example_AnalyzeImage_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { image = new { @@ -464,7 +464,7 @@ public void Example_CreateOrUpdateTextBlocklist_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blocklistName = "", }); @@ -482,7 +482,7 @@ public async Task Example_CreateOrUpdateTextBlocklist_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blocklistName = "", }); @@ -500,7 +500,7 @@ public void Example_CreateOrUpdateTextBlocklist_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blocklistName = "", description = "", @@ -520,7 +520,7 @@ public async Task Example_CreateOrUpdateTextBlocklist_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blocklistName = "", description = "", @@ -592,7 +592,7 @@ public void Example_AddBlockItems_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blockItems = new object[] { @@ -616,7 +616,7 @@ public async Task Example_AddBlockItems_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blockItems = new object[] { @@ -670,7 +670,7 @@ public void Example_AddBlockItems_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blockItems = new object[] { @@ -697,7 +697,7 @@ public async Task Example_AddBlockItems_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blockItems = new object[] { @@ -760,7 +760,7 @@ public void Example_RemoveBlockItems_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blockItemIds = new object[] { @@ -780,7 +780,7 @@ public async Task Example_RemoveBlockItems_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blockItemIds = new object[] { @@ -824,7 +824,7 @@ public void Example_RemoveBlockItems_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blockItemIds = new object[] { @@ -844,7 +844,7 @@ public async Task Example_RemoveBlockItems_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { blockItemIds = new object[] { diff --git a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs index 5b7099fb27238..61c8abdf0f227 100644 --- a/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs +++ b/sdk/core/Azure.Core.TestFramework/src/ProxyTransport.cs @@ -135,8 +135,16 @@ public override Request CreateRequest() _recording.HasRequests = true; lock (_recording.Random) { - // Make sure ClientRequestId are the same across request and response - request.ClientRequestId = _recording.Random.NewGuid().ToString("N"); + if (_recording.UseDefaultGuidFormatForClientRequestId) + { + // User want the client format to use the default format + request.ClientRequestId = _recording.Random.NewGuid().ToString(); + } + else + { + // Make sure ClientRequestId are the same across request and response + request.ClientRequestId = _recording.Random.NewGuid().ToString("N"); + } } return request; } diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs index bf9d6306c5647..7161f0b06aca3 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs @@ -149,6 +149,13 @@ public string ReplacementHost /// public bool CompareBodies { get; set; } = true; + /// + /// Determines if the ClientRequestId that is sent as part of a request while in Record mode + /// should use the default Guid format. The default Guid format contains hyphens. + /// The default value is false. + /// + public bool UseDefaultGuidFormatForClientRequestId { get; set; } = false; + /// /// Request headers whose values can change between recording and playback without causing request matching /// to fail. The presence or absence of the header itself is still respected in matching. diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index 25aec74da98aa..bc36ff3936de3 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -199,6 +199,18 @@ public TestRandom Random public string RecordingId { get; private set; } + /// + /// Determines if the ClientRequestId that is sent as part of a request while in Record mode + /// should use the default Guid format. The default Guid format contains hyphens. + /// + public bool UseDefaultGuidFormatForClientRequestId + { + get + { + return _recordedTestBase.UseDefaultGuidFormatForClientRequestId; + } + } + /// /// Gets the moment in time that this test is being run. This is useful /// for any test recordings that capture the current time. 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 a64f4a2643f4a..b69a9d918ef81 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DeploymentEnvironmentsClient.xml +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DeploymentEnvironmentsClient.xml @@ -653,7 +653,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { environmentType = "", catalogName = "", @@ -673,7 +673,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { environmentType = "", catalogName = "", @@ -705,7 +705,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { environmentType = "", catalogName = "", @@ -725,7 +725,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { environmentType = "", catalogName = "", diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml index 3dabb8d5f1278..1bfc0e684d083 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml @@ -1087,7 +1087,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { poolName = "", }); @@ -1103,7 +1103,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { poolName = "", localAdministrator = "Enabled", @@ -1147,7 +1147,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { poolName = "", }); @@ -1163,7 +1163,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { poolName = "", localAdministrator = "Enabled", 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 38be41796ee5a..46a011a3fa19b 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 @@ -724,7 +724,7 @@ public void Example_CreateOrUpdateEnvironment_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { environmentType = "", catalogName = "", @@ -747,7 +747,7 @@ public async Task Example_CreateOrUpdateEnvironment_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { environmentType = "", catalogName = "", @@ -770,7 +770,7 @@ public void Example_CreateOrUpdateEnvironment_AllParameters() TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { environmentType = "", catalogName = "", @@ -802,7 +802,7 @@ public async Task Example_CreateOrUpdateEnvironment_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); DeploymentEnvironmentsClient client = new DeploymentEnvironmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { environmentType = "", catalogName = "", 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 9b1d64744cdf5..f90303ff7bd96 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 @@ -1188,7 +1188,7 @@ public void Example_CreateDevBox_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { poolName = "", }); @@ -1207,7 +1207,7 @@ public async Task Example_CreateDevBox_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { poolName = "", }); @@ -1226,7 +1226,7 @@ public void Example_CreateDevBox_AllParameters() TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { poolName = "", localAdministrator = "Enabled", @@ -1270,7 +1270,7 @@ public async Task Example_CreateDevBox_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); DevBoxesClient client = new DevBoxesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { poolName = "", localAdministrator = "Enabled", 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 259e1cacf00a5..3f9e5bdf6b5c1 100644 --- a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceManagementClient.xml +++ b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceManagementClient.xml @@ -79,7 +79,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -95,7 +95,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -122,7 +122,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -138,7 +138,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -765,7 +765,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { deploymentId = "", startDateTime = "2022-05-10T18:57:31.2311892Z", @@ -796,7 +796,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { deploymentId = "", startDateTime = "2022-05-10T18:57:31.2311892Z", @@ -858,7 +858,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { deploymentId = "", startDateTime = "2022-05-10T18:57:31.2311892Z", @@ -889,7 +889,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { deploymentId = "", startDateTime = "2022-05-10T18:57:31.2311892Z", @@ -1841,7 +1841,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { deviceList = new object[] { @@ -1862,7 +1862,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { operationId = "", deviceList = new object[] @@ -1895,7 +1895,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { deviceList = new object[] { @@ -1916,7 +1916,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { operationId = "", deviceList = new object[] @@ -3037,7 +3037,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create("Devices"); +using RequestContent content = RequestContent.Create("Devices"); Operation operation = await client.ImportDevicesAsync(WaitUntil.Completed, content); ]]> This sample shows how to call ImportDevicesAsync with all parameters and request content. @@ -3046,7 +3046,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create("Devices"); +using RequestContent content = RequestContent.Create("Devices"); Operation operation = await client.ImportDevicesAsync(WaitUntil.Completed, content); ]]> @@ -3058,7 +3058,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create("Devices"); +using RequestContent content = RequestContent.Create("Devices"); Operation operation = client.ImportDevices(WaitUntil.Completed, content); ]]> This sample shows how to call ImportDevices with all parameters and request content. @@ -3067,7 +3067,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -RequestContent content = RequestContent.Create("Devices"); +using RequestContent content = RequestContent.Create("Devices"); Operation operation = client.ImportDevices(WaitUntil.Completed, content); ]]> 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 1fff89c0226f6..76c2ee36dfbb6 100644 --- a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceUpdateClient.xml +++ b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceUpdateClient.xml @@ -763,7 +763,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new object[] +using 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 object[] +using RequestContent content = RequestContent.Create(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 object[] +using 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 object[] +using RequestContent content = RequestContent.Create(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 a0f1623c3e0d3..4707b22e880bc 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 @@ -102,7 +102,7 @@ public void Example_UpdateDeviceClass_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -121,7 +121,7 @@ public async Task Example_UpdateDeviceClass_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -140,7 +140,7 @@ public void Example_UpdateDeviceClass_AllParameters() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -167,7 +167,7 @@ public async Task Example_UpdateDeviceClass_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -842,7 +842,7 @@ public void Example_CreateOrUpdateDeployment_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { deploymentId = "", startDateTime = "2022-05-10T18:57:31.2311892Z", @@ -876,7 +876,7 @@ public async Task Example_CreateOrUpdateDeployment_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { deploymentId = "", startDateTime = "2022-05-10T18:57:31.2311892Z", @@ -910,7 +910,7 @@ public void Example_CreateOrUpdateDeployment_AllParameters() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { deploymentId = "", startDateTime = "2022-05-10T18:57:31.2311892Z", @@ -972,7 +972,7 @@ public async Task Example_CreateOrUpdateDeployment_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { deploymentId = "", startDateTime = "2022-05-10T18:57:31.2311892Z", @@ -1996,7 +1996,7 @@ public void Example_StartLogCollection_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { deviceList = new object[] { @@ -2020,7 +2020,7 @@ public async Task Example_StartLogCollection_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { deviceList = new object[] { @@ -2044,7 +2044,7 @@ public void Example_StartLogCollection_AllParameters() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { operationId = "", deviceList = new object[] @@ -2077,7 +2077,7 @@ public async Task Example_StartLogCollection_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { operationId = "", deviceList = new object[] @@ -3282,7 +3282,7 @@ public void Example_ImportDevices_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create("Devices"); + using RequestContent content = RequestContent.Create("Devices"); Operation operation = client.ImportDevices(WaitUntil.Completed, content); } @@ -3294,7 +3294,7 @@ public async Task Example_ImportDevices_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create("Devices"); + using RequestContent content = RequestContent.Create("Devices"); Operation operation = await client.ImportDevicesAsync(WaitUntil.Completed, content); } @@ -3306,7 +3306,7 @@ public void Example_ImportDevices_AllParameters() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create("Devices"); + using RequestContent content = RequestContent.Create("Devices"); Operation operation = client.ImportDevices(WaitUntil.Completed, content); } @@ -3318,7 +3318,7 @@ public async Task Example_ImportDevices_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - RequestContent content = RequestContent.Create("Devices"); + using RequestContent content = RequestContent.Create("Devices"); Operation operation = await client.ImportDevicesAsync(WaitUntil.Completed, content); } } diff --git a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/tests/Generated/Samples/Samples_DeviceUpdateClient.cs b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/tests/Generated/Samples/Samples_DeviceUpdateClient.cs index b938b4c9ad9a4..06963442c11b3 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 @@ -840,7 +840,7 @@ public void Example_StartImportUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -866,7 +866,7 @@ public async Task Example_StartImportUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -892,7 +892,7 @@ public void Example_StartImportUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -927,7 +927,7 @@ public async Task Example_StartImportUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md index d653ec7e92751..3ae84e7fbc46a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 4.19.0-beta.1 (Unreleased) +## 4.19.0 (2023-10-11) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added new system events for Resource Notifications and Azure Communication Services. ## 4.18.0 (2023-09-12) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SourceVisitor.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SourceVisitor.cs index 760cadaaf0ad6..e3a4bfead277a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SourceVisitor.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SourceVisitor.cs @@ -30,7 +30,8 @@ public override void VisitNamedType(INamedTypeSymbol symbol) XmlDocument xmlDoc = new(); xmlDoc.LoadXml(symbol.GetDocumentationCommentXml()); var xmlNode = xmlDoc.SelectSingleNode("member/summary"); - var match = Regex.Match(xmlNode.InnerText, "[a-zA-Z]+\\.[a-zA-Z]+\\.[a-zA-Z]+"); + // the event name is either 3 or 4 parts, e.g. Microsoft.AppConfiguration.KeyValueDeleted or Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged + var match = Regex.Match(xmlNode.InnerText, "[a-zA-Z]+\\.[a-zA-Z]+\\.[a-zA-Z]+(\\.[a-zA-Z]+)?"); if (!match.Success) { // We expect some EventData to not have event types if they are base types, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs index cb342dde6dbff..33127bb2c8527 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs @@ -78,6 +78,31 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties AcsRecordingStorageInfoProperties(System.Collections.Generic.IEnumerable recordingChunks = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsRecordingStorageInfoProperties AcsRecordingStorageInfoProperties(System.Collections.Generic.IReadOnlyList recordingChunks) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterChannelConfiguration AcsRouterChannelConfiguration(string channelId = null, int? capacityCostPerJob = default(int?), int? maxNumberOfJobs = default(int?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterEventData AcsRouterEventData(string jobId = null, string channelReference = null, string channelId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobCancelledEventData AcsRouterJobCancelledEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string note = null, string dispositionCode = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobClassifiedEventData AcsRouterJobClassifiedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.Messaging.EventGrid.SystemEvents.AcsRouterQueueDetails queueDetails = null, string classificationPolicyId = null, int? priority = default(int?), System.Collections.Generic.IEnumerable attachedWorkerSelectors = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobClosedEventData AcsRouterJobClosedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string assignmentId = null, string workerId = null, string dispositionCode = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobCompletedEventData AcsRouterJobCompletedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string assignmentId = null, string workerId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobDeletedEventData AcsRouterJobDeletedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData AcsRouterJobEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobExceptionTriggeredEventData AcsRouterJobExceptionTriggeredEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string ruleKey = null, string exceptionRuleId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobQueuedEventData AcsRouterJobQueuedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, int? priority = default(int?), System.Collections.Generic.IEnumerable attachedWorkerSelectors = null, System.Collections.Generic.IEnumerable requestedWorkerSelectors = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.Messaging.EventGrid.Models.AcsRouterJobStatus? jobStatus = default(Azure.Messaging.EventGrid.Models.AcsRouterJobStatus?), string classificationPolicyId = null, int? priority = default(int?), System.Collections.Generic.IEnumerable requestedWorkerSelectors = null, System.DateTimeOffset? scheduledOn = default(System.DateTimeOffset?), bool unavailableForMatching = false) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobSchedulingFailedEventData AcsRouterJobSchedulingFailedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, int? priority = default(int?), System.Collections.Generic.IEnumerable expiredAttachedWorkerSelectors = null, System.Collections.Generic.IEnumerable expiredRequestedWorkerSelectors = null, System.DateTimeOffset? scheduledOn = default(System.DateTimeOffset?), string failureReason = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobUnassignedEventData AcsRouterJobUnassignedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string assignmentId = null, string workerId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobWaitingForActivationEventData AcsRouterJobWaitingForActivationEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, int? priority = default(int?), System.Collections.Generic.IEnumerable expiredAttachedWorkerSelectors = null, System.Collections.Generic.IEnumerable expiredRequestedWorkerSelectors = null, System.DateTimeOffset? scheduledOn = default(System.DateTimeOffset?), bool unavailableForMatching = false) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobWorkerSelectorsExpiredEventData AcsRouterJobWorkerSelectorsExpiredEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null, System.Collections.Generic.IEnumerable expiredRequestedWorkerSelectors = null, System.Collections.Generic.IEnumerable expiredAttachedWorkerSelectors = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterQueueDetails AcsRouterQueueDetails(string id = null, string name = null, System.Collections.Generic.IReadOnlyDictionary labels = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerDeletedEventData AcsRouterWorkerDeletedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerDeregisteredEventData AcsRouterWorkerDeregisteredEventData(string workerId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerEventData AcsRouterWorkerEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferAcceptedEventData AcsRouterWorkerOfferAcceptedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null, string assignmentId = null, int? jobPriority = default(int?), System.Collections.Generic.IReadOnlyDictionary workerLabels = null, System.Collections.Generic.IReadOnlyDictionary workerTags = null, System.Collections.Generic.IReadOnlyDictionary jobLabels = null, System.Collections.Generic.IReadOnlyDictionary jobTags = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferDeclinedEventData AcsRouterWorkerOfferDeclinedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferExpiredEventData AcsRouterWorkerOfferExpiredEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferIssuedEventData AcsRouterWorkerOfferIssuedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null, int? jobPriority = default(int?), System.Collections.Generic.IReadOnlyDictionary workerLabels = null, System.DateTimeOffset? offeredOn = default(System.DateTimeOffset?), System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary workerTags = null, System.Collections.Generic.IReadOnlyDictionary jobLabels = null, System.Collections.Generic.IReadOnlyDictionary jobTags = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerOfferRevokedEventData AcsRouterWorkerOfferRevokedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerRegisteredEventData AcsRouterWorkerRegisteredEventData(string workerId = null, System.Collections.Generic.IEnumerable queueAssignments = null, System.Collections.Generic.IEnumerable channelConfigurations = null, int? totalCapacity = default(int?), System.Collections.Generic.IReadOnlyDictionary labels = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsSmsDeliveryAttemptProperties AcsSmsDeliveryAttemptProperties(System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), int? segmentsSucceeded = default(int?), int? segmentsFailed = default(int?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsSmsDeliveryReportReceivedEventData AcsSmsDeliveryReportReceivedEventData(string messageId = null, string from = null, string to = null, string deliveryStatus = null, string deliveryStatusDetails = null, System.Collections.Generic.IEnumerable deliveryAttempts = null, System.DateTimeOffset? receivedTimestamp = default(System.DateTimeOffset?), string tag = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -255,6 +280,11 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ResourceDeleteFailureEventData ResourceDeleteFailureEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, string authorization = null, string claims = null, string correlationId = null, string httpRequest = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceDeleteSuccessEventData ResourceDeleteSuccessEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, string authorization = null, string claims = null, string correlationId = null, string httpRequest = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceHttpRequest ResourceHttpRequest(string clientRequestId = null, string clientIpAddress = null, Azure.Core.RequestMethod? method = default(Azure.Core.RequestMethod?), string url = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsHealthResourcesAnnotatedEventData ResourceNotificationsHealthResourcesAnnotatedEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails ResourceNotificationsOperationalDetails(System.DateTimeOffset? resourceEventTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails ResourceNotificationsResourceUpdatedDetails(string id = null, string name = null, string type = null, string location = null, string tags = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedEventData ResourceNotificationsResourceUpdatedEventData(Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails resourceDetails = null, Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceWriteCancelEventData ResourceWriteCancelEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, string authorization = null, string claims = null, string correlationId = null, string httpRequest = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceWriteFailureEventData ResourceWriteFailureEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, string authorization = null, string claims = null, string correlationId = null, string httpRequest = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ResourceWriteSuccessEventData ResourceWriteSuccessEventData(string tenantId = null, string subscriptionId = null, string resourceGroup = null, string resourceProvider = null, string resourceUri = null, string operationName = null, string status = null, string authorization = null, string claims = null, string correlationId = null, string httpRequest = null) { throw null; } @@ -362,6 +392,27 @@ public static partial class SystemEventNames public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; public const string AcsRecordingFileStatusUpdated = "Microsoft.Communication.RecordingFileStatusUpdated"; + public const string AcsRouterJobCancelled = "Microsoft.Communication.RouterJobCancelled"; + public const string AcsRouterJobClassificationFailed = "Microsoft.Communication.RouterJobClassificationFailed"; + public const string AcsRouterJobClassified = "Microsoft.Communication.RouterJobClassified"; + public const string AcsRouterJobClosed = "Microsoft.Communication.RouterJobClosed"; + public const string AcsRouterJobCompleted = "Microsoft.Communication.RouterJobCompleted"; + public const string AcsRouterJobDeleted = "Microsoft.Communication.RouterJobDeleted"; + public const string AcsRouterJobExceptionTriggered = "Microsoft.Communication.RouterJobExceptionTriggered"; + public const string AcsRouterJobQueued = "Microsoft.Communication.RouterJobQueued"; + public const string AcsRouterJobReceived = "Microsoft.Communication.RouterJobReceived"; + public const string AcsRouterJobSchedulingFailed = "Microsoft.Communication.RouterJobSchedulingFailed"; + public const string AcsRouterJobUnassigned = "Microsoft.Communication.RouterJobUnassigned"; + public const string AcsRouterJobWaitingForActivation = "Microsoft.Communication.RouterJobWaitingForActivation"; + public const string AcsRouterJobWorkerSelectorsExpired = "Microsoft.Communication.RouterJobWorkerSelectorsExpired"; + public const string AcsRouterWorkerDeleted = "Microsoft.Communication.RouterWorkerDeleted"; + public const string AcsRouterWorkerDeregistered = "Microsoft.Communication.RouterWorkerDeregistered"; + public const string AcsRouterWorkerOfferAccepted = "Microsoft.Communication.RouterWorkerOfferAccepted"; + public const string AcsRouterWorkerOfferDeclined = "Microsoft.Communication.RouterWorkerOfferDeclined"; + public const string AcsRouterWorkerOfferExpired = "Microsoft.Communication.RouterWorkerOfferExpired"; + public const string AcsRouterWorkerOfferIssued = "Microsoft.Communication.RouterWorkerOfferIssued"; + public const string AcsRouterWorkerOfferRevoked = "Microsoft.Communication.RouterWorkerOfferRevoked"; + public const string AcsRouterWorkerRegistered = "Microsoft.Communication.RouterWorkerRegistered"; public const string AcsSmsDeliveryReportReceived = "Microsoft.Communication.SMSDeliveryReportReceived"; public const string AcsSmsReceived = "Microsoft.Communication.SMSReceived"; public const string AcsUserDisconnected = "Microsoft.Communication.UserDisconnected"; @@ -482,6 +533,8 @@ public static partial class SystemEventNames public const string ResourceDeleteCancel = "Microsoft.Resources.ResourceDeleteCancel"; public const string ResourceDeleteFailure = "Microsoft.Resources.ResourceDeleteFailure"; public const string ResourceDeleteSuccess = "Microsoft.Resources.ResourceDeleteSuccess"; + public const string ResourceNotificationsHealthResourcesAnnotated = "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated"; + public const string ResourceNotificationsHealthResourcesAvailabilityStatusChanged = "Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged"; public const string ResourceWriteCancel = "Microsoft.Resources.ResourceWriteCancel"; public const string ResourceWriteFailure = "Microsoft.Resources.ResourceWriteFailure"; public const string ResourceWriteSuccess = "Microsoft.Resources.ResourceWriteSuccess"; @@ -520,6 +573,74 @@ public static partial class SystemEventNames } namespace Azure.Messaging.EventGrid.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsRouterJobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsRouterJobStatus(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus Assigned { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus Cancelled { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus ClassificationFailed { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus Closed { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus Completed { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus Created { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus PendingClassification { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus PendingSchedule { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus Queued { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus Scheduled { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus ScheduleFailed { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterJobStatus WaitingForActivation { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsRouterJobStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsRouterJobStatus left, Azure.Messaging.EventGrid.Models.AcsRouterJobStatus right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsRouterJobStatus (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsRouterJobStatus left, Azure.Messaging.EventGrid.Models.AcsRouterJobStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsRouterLabelOperator : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsRouterLabelOperator(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator Equal { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator Greater { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator GreaterThanOrEqual { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator Less { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator LessThanOrEqual { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator NotEqual { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator left, Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator left, Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsRouterWorkerSelectorState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsRouterWorkerSelectorState(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsRouterWorkerSelectorState Active { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsRouterWorkerSelectorState Expired { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsRouterWorkerSelectorState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Messaging.EventGrid.Models.AcsRouterWorkerSelectorState left, Azure.Messaging.EventGrid.Models.AcsRouterWorkerSelectorState right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsRouterWorkerSelectorState (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsRouterWorkerSelectorState left, Azure.Messaging.EventGrid.Models.AcsRouterWorkerSelectorState right) { throw null; } + public override string ToString() { throw null; } + } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RecordingChannelType : System.IEquatable @@ -890,6 +1011,201 @@ public partial class AcsRecordingStorageInfoProperties internal AcsRecordingStorageInfoProperties() { } public System.Collections.Generic.IReadOnlyList RecordingChunks { get { throw null; } } } + public partial class AcsRouterChannelConfiguration + { + internal AcsRouterChannelConfiguration() { } + public int? CapacityCostPerJob { get { throw null; } } + public string ChannelId { get { throw null; } } + public int? MaxNumberOfJobs { get { throw null; } } + } + public partial class AcsRouterEventData + { + internal AcsRouterEventData() { } + public string ChannelId { get { throw null; } } + public string ChannelReference { get { throw null; } } + public string JobId { get { throw null; } } + } + public partial class AcsRouterJobCancelledEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobCancelledEventData() { } + public string DispositionCode { get { throw null; } } + public string Note { get { throw null; } } + } + public partial class AcsRouterJobClassificationFailedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobClassificationFailedEventData() { } + public string ClassificationPolicyId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + } + public partial class AcsRouterJobClassifiedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobClassifiedEventData() { } + public System.Collections.Generic.IReadOnlyList AttachedWorkerSelectors { get { throw null; } } + public string ClassificationPolicyId { get { throw null; } } + public int? Priority { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsRouterQueueDetails QueueDetails { get { throw null; } } + } + public partial class AcsRouterJobClosedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobClosedEventData() { } + public string AssignmentId { get { throw null; } } + public string DispositionCode { get { throw null; } } + public string WorkerId { get { throw null; } } + } + public partial class AcsRouterJobCompletedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobCompletedEventData() { } + public string AssignmentId { get { throw null; } } + public string WorkerId { get { throw null; } } + } + public partial class AcsRouterJobDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobDeletedEventData() { } + } + public partial class AcsRouterJobEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterEventData + { + internal AcsRouterJobEventData() { } + public System.Collections.Generic.IReadOnlyDictionary Labels { get { throw null; } } + public string QueueId { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + } + public partial class AcsRouterJobExceptionTriggeredEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobExceptionTriggeredEventData() { } + public string ExceptionRuleId { get { throw null; } } + public string RuleKey { get { throw null; } } + } + public partial class AcsRouterJobQueuedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobQueuedEventData() { } + public System.Collections.Generic.IReadOnlyList AttachedWorkerSelectors { get { throw null; } } + public int? Priority { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequestedWorkerSelectors { get { throw null; } } + } + public partial class AcsRouterJobReceivedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobReceivedEventData() { } + public string ClassificationPolicyId { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsRouterJobStatus? JobStatus { get { throw null; } } + public int? Priority { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequestedWorkerSelectors { get { throw null; } } + public System.DateTimeOffset? ScheduledOn { get { throw null; } } + public bool UnavailableForMatching { get { throw null; } } + } + public partial class AcsRouterJobSchedulingFailedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobSchedulingFailedEventData() { } + public System.Collections.Generic.IReadOnlyList ExpiredAttachedWorkerSelectors { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ExpiredRequestedWorkerSelectors { get { throw null; } } + public string FailureReason { get { throw null; } } + public int? Priority { get { throw null; } } + public System.DateTimeOffset? ScheduledOn { get { throw null; } } + } + public partial class AcsRouterJobUnassignedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobUnassignedEventData() { } + public string AssignmentId { get { throw null; } } + public string WorkerId { get { throw null; } } + } + public partial class AcsRouterJobWaitingForActivationEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobWaitingForActivationEventData() { } + public System.Collections.Generic.IReadOnlyList ExpiredAttachedWorkerSelectors { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ExpiredRequestedWorkerSelectors { get { throw null; } } + public int? Priority { get { throw null; } } + public System.DateTimeOffset? ScheduledOn { get { throw null; } } + public bool UnavailableForMatching { get { throw null; } } + } + public partial class AcsRouterJobWorkerSelectorsExpiredEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterJobEventData + { + internal AcsRouterJobWorkerSelectorsExpiredEventData() { } + public System.Collections.Generic.IReadOnlyList ExpiredAttachedWorkerSelectors { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ExpiredRequestedWorkerSelectors { get { throw null; } } + } + public partial class AcsRouterQueueDetails + { + internal AcsRouterQueueDetails() { } + public string Id { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Labels { get { throw null; } } + public string Name { get { throw null; } } + } + public partial class AcsRouterWorkerDeletedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerEventData + { + internal AcsRouterWorkerDeletedEventData() { } + } + public partial class AcsRouterWorkerDeregisteredEventData + { + internal AcsRouterWorkerDeregisteredEventData() { } + public string WorkerId { get { throw null; } } + } + public partial class AcsRouterWorkerEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterEventData + { + internal AcsRouterWorkerEventData() { } + public string WorkerId { get { throw null; } } + } + public partial class AcsRouterWorkerOfferAcceptedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerEventData + { + internal AcsRouterWorkerOfferAcceptedEventData() { } + public string AssignmentId { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary JobLabels { get { throw null; } } + public int? JobPriority { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary JobTags { get { throw null; } } + public string OfferId { get { throw null; } } + public string QueueId { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary WorkerLabels { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary WorkerTags { get { throw null; } } + } + public partial class AcsRouterWorkerOfferDeclinedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerEventData + { + internal AcsRouterWorkerOfferDeclinedEventData() { } + public string OfferId { get { throw null; } } + public string QueueId { get { throw null; } } + } + public partial class AcsRouterWorkerOfferExpiredEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerEventData + { + internal AcsRouterWorkerOfferExpiredEventData() { } + public string OfferId { get { throw null; } } + public string QueueId { get { throw null; } } + } + public partial class AcsRouterWorkerOfferIssuedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerEventData + { + internal AcsRouterWorkerOfferIssuedEventData() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary JobLabels { get { throw null; } } + public int? JobPriority { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary JobTags { get { throw null; } } + public System.DateTimeOffset? OfferedOn { get { throw null; } } + public string OfferId { get { throw null; } } + public string QueueId { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary WorkerLabels { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary WorkerTags { get { throw null; } } + } + public partial class AcsRouterWorkerOfferRevokedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsRouterWorkerEventData + { + internal AcsRouterWorkerOfferRevokedEventData() { } + public string OfferId { get { throw null; } } + public string QueueId { get { throw null; } } + } + public partial class AcsRouterWorkerRegisteredEventData + { + internal AcsRouterWorkerRegisteredEventData() { } + public System.Collections.Generic.IReadOnlyList ChannelConfigurations { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Labels { get { throw null; } } + public System.Collections.Generic.IReadOnlyList QueueAssignments { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + public int? TotalCapacity { get { throw null; } } + public string WorkerId { get { throw null; } } + } + public partial class AcsRouterWorkerSelector + { + internal AcsRouterWorkerSelector() { } + public System.DateTimeOffset? ExpirationTime { get { throw null; } } + public string Key { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsRouterLabelOperator? LabelOperator { get { throw null; } } + public object LabelValue { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsRouterWorkerSelectorState? State { get { throw null; } } + public System.TimeSpan? TimeToLive { get { throw null; } } + } public partial class AcsSmsDeliveryAttemptProperties { internal AcsSmsDeliveryAttemptProperties() { } @@ -2421,6 +2737,36 @@ internal ResourceHttpRequest() { } public Azure.Core.RequestMethod Method { get { throw null; } } public string Url { get { throw null; } } } + public partial class ResourceNotificationsHealthResourcesAnnotatedEventData : Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedEventData + { + internal ResourceNotificationsHealthResourcesAnnotatedEventData() { } + } + public partial class ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData : Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedEventData + { + internal ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData() { } + } + public partial class ResourceNotificationsOperationalDetails + { + internal ResourceNotificationsOperationalDetails() { } + public System.DateTimeOffset? ResourceEventTime { get { throw null; } } + } + public partial class ResourceNotificationsResourceUpdatedDetails + { + internal ResourceNotificationsResourceUpdatedDetails() { } + public string Id { get { throw null; } } + public string Location { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } + public string Tags { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class ResourceNotificationsResourceUpdatedEventData + { + internal ResourceNotificationsResourceUpdatedEventData() { } + public string ApiVersion { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsOperationalDetails OperationalDetails { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ResourceNotificationsResourceUpdatedDetails ResourceDetails { get { throw null; } } + } public partial class ResourceWriteCancelEventData { internal ResourceWriteCancelEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj index 2659882c3b62f..7b211b2951592 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj @@ -2,7 +2,7 @@ This library can be used to publish events to Azure Event Grid and to consume events delivered by EventGrid. It also defines the event schemas for the events published to EventGrid by various Azure services. Microsoft Azure.Messaging.EventGrid client library - 4.19.0-beta.1 + 4.19.0 4.18.0 Microsoft Azure EventGrid;Event Grid;Event Grid Publishing; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsRouterCommunicationError.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsRouterCommunicationError.cs new file mode 100644 index 0000000000000..d604d5329eb0f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsRouterCommunicationError.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + internal partial class AcsRouterCommunicationError + { + } +} \ No newline at end of file diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsRouterJobClassificationFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsRouterJobClassificationFailedEventData.cs new file mode 100644 index 0000000000000..2b3b041b92b8c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsRouterJobClassificationFailedEventData.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClassificationFailed event. + public partial class AcsRouterJobClassificationFailedEventData + { + /// List of Router Communication Errors. + [CodeGenMember("Errors")] + internal IReadOnlyList ErrorsInternal { get; } + + /// List of Router Communication Errors. + public IReadOnlyList Errors + { + get + { + if (_errors == null) + { + // Need to re-serialize to be able to deserialize as ResponseError with the internal properties populated. + var serialized = JsonSerializer.Serialize( + ErrorsInternal, + new JsonSerializerOptions + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase + }); + _errors = JsonSerializer.Deserialize>(serialized); + } + + return _errors; + } + } + + private List _errors; + } +} \ No newline at end of file diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsRouterWorkerSelector.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsRouterWorkerSelector.cs new file mode 100644 index 0000000000000..d092f9754a315 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsRouterWorkerSelector.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Router Job Worker Selector. + public partial class AcsRouterWorkerSelector + { + internal float? TtlSeconds { get; } + + /// Router Job Worker Selector TTL. + public TimeSpan? TimeToLive => TtlSeconds.HasValue ? TimeSpan.FromSeconds(TtlSeconds.Value) : null; + } +} \ No newline at end of file diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs index 207f314f39de6..d46869293edf0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.Messaging.EventGrid.Models; using Azure.Messaging.EventGrid.SystemEvents; namespace Azure.Messaging.EventGrid @@ -1741,6 +1742,428 @@ public static AcsUserDisconnectedEventData AcsUserDisconnectedEventData(Communic return new AcsUserDisconnectedEventData(userCommunicationIdentifier); } + /// Initializes a new instance of AcsRouterJobCancelledEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Note. + /// Router Job Disposition Code. + /// A new instance for mocking. + public static AcsRouterJobCancelledEventData AcsRouterJobCancelledEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, string note = null, string dispositionCode = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + + return new AcsRouterJobCancelledEventData(jobId, channelReference, channelId, queueId, labels, tags, note, dispositionCode); + } + + /// Initializes a new instance of AcsRouterJobEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// A new instance for mocking. + public static AcsRouterJobEventData AcsRouterJobEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + + return new AcsRouterJobEventData(jobId, channelReference, channelId, queueId, labels, tags); + } + + /// Initializes a new instance of AcsRouterEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// A new instance for mocking. + public static AcsRouterEventData AcsRouterEventData(string jobId = null, string channelReference = null, string channelId = null) + { + return new AcsRouterEventData(jobId, channelReference, channelId); + } + + /// Initializes a new instance of AcsRouterJobClassifiedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Queue Info. + /// Router Job Classification Policy Id. + /// Router Job Priority. + /// Router Job Attached Worker Selector. + /// A new instance for mocking. + public static AcsRouterJobClassifiedEventData AcsRouterJobClassifiedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, AcsRouterQueueDetails queueDetails = null, string classificationPolicyId = null, int? priority = null, IEnumerable attachedWorkerSelectors = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + attachedWorkerSelectors ??= new List(); + + return new AcsRouterJobClassifiedEventData(jobId, channelReference, channelId, queueId, labels, tags, queueDetails, classificationPolicyId, priority, attachedWorkerSelectors?.ToList()); + } + + /// Initializes a new instance of AcsRouterQueueDetails. + /// Router Queue Id. + /// Router Queue Name. + /// Router Queue Labels. + /// A new instance for mocking. + public static AcsRouterQueueDetails AcsRouterQueueDetails(string id = null, string name = null, IReadOnlyDictionary labels = null) + { + labels ??= new Dictionary(); + + return new AcsRouterQueueDetails(id, name, labels); + } + + /// Initializes a new instance of AcsRouterJobClosedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Closed Assignment Id. + /// Router Job Closed Worker Id. + /// Router Job Closed Disposition Code. + /// A new instance for mocking. + public static AcsRouterJobClosedEventData AcsRouterJobClosedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, string assignmentId = null, string workerId = null, string dispositionCode = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + + return new AcsRouterJobClosedEventData(jobId, channelReference, channelId, queueId, labels, tags, assignmentId, workerId, dispositionCode); + } + + /// Initializes a new instance of AcsRouterJobCompletedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Completed Assignment Id. + /// Router Job Completed Worker Id. + /// A new instance for mocking. + public static AcsRouterJobCompletedEventData AcsRouterJobCompletedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, string assignmentId = null, string workerId = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + + return new AcsRouterJobCompletedEventData(jobId, channelReference, channelId, queueId, labels, tags, assignmentId, workerId); + } + + /// Initializes a new instance of AcsRouterJobDeletedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// A new instance for mocking. + public static AcsRouterJobDeletedEventData AcsRouterJobDeletedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + + return new AcsRouterJobDeletedEventData(jobId, channelReference, channelId, queueId, labels, tags); + } + + /// Initializes a new instance of AcsRouterJobExceptionTriggeredEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Exception Triggered Rule Key. + /// Router Job Exception Triggered Rule Id. + /// A new instance for mocking. + public static AcsRouterJobExceptionTriggeredEventData AcsRouterJobExceptionTriggeredEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, string ruleKey = null, string exceptionRuleId = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + + return new AcsRouterJobExceptionTriggeredEventData(jobId, channelReference, channelId, queueId, labels, tags, ruleKey, exceptionRuleId); + } + + /// Initializes a new instance of AcsRouterJobQueuedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Priority. + /// Router Job Queued Attached Worker Selector. + /// Router Job Queued Requested Worker Selector. + /// A new instance for mocking. + public static AcsRouterJobQueuedEventData AcsRouterJobQueuedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, int? priority = null, IEnumerable attachedWorkerSelectors = null, IEnumerable requestedWorkerSelectors = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + attachedWorkerSelectors ??= new List(); + requestedWorkerSelectors ??= new List(); + + return new AcsRouterJobQueuedEventData(jobId, channelReference, channelId, queueId, labels, tags, priority, attachedWorkerSelectors?.ToList(), requestedWorkerSelectors?.ToList()); + } + + /// Initializes a new instance of AcsRouterJobReceivedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Received Job Status. + /// Router Job Classification Policy Id. + /// Router Job Priority. + /// Router Job Received Requested Worker Selectors. + /// Router Job Received Scheduled Time in UTC. + /// Unavailable For Matching for Router Job Received. + /// A new instance for mocking. + public static AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, AcsRouterJobStatus? jobStatus = null, string classificationPolicyId = null, int? priority = null, IEnumerable requestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, bool unavailableForMatching = default) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + requestedWorkerSelectors ??= new List(); + + return new AcsRouterJobReceivedEventData(jobId, channelReference, channelId, queueId, labels, tags, jobStatus, classificationPolicyId, priority, requestedWorkerSelectors?.ToList(), scheduledOn, unavailableForMatching); + } + + /// Initializes a new instance of AcsRouterJobSchedulingFailedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Priority. + /// Router Job Scheduling Failed Attached Worker Selector Expired. + /// Router Job Scheduling Failed Requested Worker Selector Expired. + /// Router Job Scheduling Failed Scheduled Time in UTC. + /// Router Job Scheduling Failed Reason. + /// A new instance for mocking. + public static AcsRouterJobSchedulingFailedEventData AcsRouterJobSchedulingFailedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, int? priority = null, IEnumerable expiredAttachedWorkerSelectors = null, IEnumerable expiredRequestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, string failureReason = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + expiredAttachedWorkerSelectors ??= new List(); + expiredRequestedWorkerSelectors ??= new List(); + + return new AcsRouterJobSchedulingFailedEventData(jobId, channelReference, channelId, queueId, labels, tags, priority, expiredAttachedWorkerSelectors?.ToList(), expiredRequestedWorkerSelectors?.ToList(), scheduledOn, failureReason); + } + + /// Initializes a new instance of AcsRouterJobUnassignedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Unassigned Assignment Id. + /// Router Job Unassigned Worker Id. + /// A new instance for mocking. + public static AcsRouterJobUnassignedEventData AcsRouterJobUnassignedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, string assignmentId = null, string workerId = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + + return new AcsRouterJobUnassignedEventData(jobId, channelReference, channelId, queueId, labels, tags, assignmentId, workerId); + } + + /// Initializes a new instance of AcsRouterJobWaitingForActivationEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Waiting For Activation Priority. + /// Router Job Waiting For Activation Worker Selector Expired. + /// Router Job Waiting For Activation Requested Worker Selector Expired. + /// Router Job Waiting For Activation Scheduled Time in UTC. + /// Router Job Waiting For Activation Unavailable For Matching. + /// A new instance for mocking. + public static AcsRouterJobWaitingForActivationEventData AcsRouterJobWaitingForActivationEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, int? priority = null, IEnumerable expiredAttachedWorkerSelectors = null, IEnumerable expiredRequestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, bool unavailableForMatching = default) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + expiredAttachedWorkerSelectors ??= new List(); + expiredRequestedWorkerSelectors ??= new List(); + + return new AcsRouterJobWaitingForActivationEventData(jobId, channelReference, channelId, queueId, labels, tags, priority, expiredAttachedWorkerSelectors?.ToList(), expiredRequestedWorkerSelectors?.ToList(), scheduledOn, unavailableForMatching); + } + + /// Initializes a new instance of AcsRouterJobWorkerSelectorsExpiredEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Worker Selectors Expired Requested Worker Selectors. + /// Router Job Worker Selectors Expired Attached Worker Selectors. + /// A new instance for mocking. + public static AcsRouterJobWorkerSelectorsExpiredEventData AcsRouterJobWorkerSelectorsExpiredEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, IEnumerable expiredRequestedWorkerSelectors = null, IEnumerable expiredAttachedWorkerSelectors = null) + { + labels ??= new Dictionary(); + tags ??= new Dictionary(); + expiredRequestedWorkerSelectors ??= new List(); + expiredAttachedWorkerSelectors ??= new List(); + + return new AcsRouterJobWorkerSelectorsExpiredEventData(jobId, channelReference, channelId, queueId, labels, tags, expiredRequestedWorkerSelectors?.ToList(), expiredAttachedWorkerSelectors?.ToList()); + } + + /// Initializes a new instance of AcsRouterWorkerDeletedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// A new instance for mocking. + public static AcsRouterWorkerDeletedEventData AcsRouterWorkerDeletedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null) + { + return new AcsRouterWorkerDeletedEventData(jobId, channelReference, channelId, workerId); + } + + /// Initializes a new instance of AcsRouterWorkerEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// A new instance for mocking. + public static AcsRouterWorkerEventData AcsRouterWorkerEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null) + { + return new AcsRouterWorkerEventData(jobId, channelReference, channelId, workerId); + } + + /// Initializes a new instance of AcsRouterWorkerDeregisteredEventData. + /// Router Worker Deregistered Worker Id. + /// A new instance for mocking. + public static AcsRouterWorkerDeregisteredEventData AcsRouterWorkerDeregisteredEventData(string workerId = null) + { + return new AcsRouterWorkerDeregisteredEventData(workerId); + } + + /// Initializes a new instance of AcsRouterWorkerOfferAcceptedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// Router Worker Offer Accepted Queue Id. + /// Router Worker Offer Accepted Offer Id. + /// Router Worker Offer Accepted Assignment Id. + /// Router Worker Offer Accepted Job Priority. + /// Router Worker Offer Accepted Worker Labels. + /// Router Worker Offer Accepted Worker Tags. + /// Router Worker Offer Accepted Job Labels. + /// Router Worker Offer Accepted Job Tags. + /// A new instance for mocking. + public static AcsRouterWorkerOfferAcceptedEventData AcsRouterWorkerOfferAcceptedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null, string assignmentId = null, int? jobPriority = null, IReadOnlyDictionary workerLabels = null, IReadOnlyDictionary workerTags = null, IReadOnlyDictionary jobLabels = null, IReadOnlyDictionary jobTags = null) + { + workerLabels ??= new Dictionary(); + workerTags ??= new Dictionary(); + jobLabels ??= new Dictionary(); + jobTags ??= new Dictionary(); + + return new AcsRouterWorkerOfferAcceptedEventData(jobId, channelReference, channelId, workerId, queueId, offerId, assignmentId, jobPriority, workerLabels, workerTags, jobLabels, jobTags); + } + + /// Initializes a new instance of AcsRouterWorkerOfferDeclinedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// Router Worker Offer Declined Queue Id. + /// Router Worker Offer Declined Offer Id. + /// A new instance for mocking. + public static AcsRouterWorkerOfferDeclinedEventData AcsRouterWorkerOfferDeclinedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null) + { + return new AcsRouterWorkerOfferDeclinedEventData(jobId, channelReference, channelId, workerId, queueId, offerId); + } + + /// Initializes a new instance of AcsRouterWorkerOfferExpiredEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// Router Worker Offer Expired Queue Id. + /// Router Worker Offer Expired Offer Id. + /// A new instance for mocking. + public static AcsRouterWorkerOfferExpiredEventData AcsRouterWorkerOfferExpiredEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null) + { + return new AcsRouterWorkerOfferExpiredEventData(jobId, channelReference, channelId, workerId, queueId, offerId); + } + + /// Initializes a new instance of AcsRouterWorkerOfferIssuedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// Router Worker Offer Issued Queue Id. + /// Router Worker Offer Issued Offer Id. + /// Router Worker Offer Issued Job Priority. + /// Router Worker Offer Issued Worker Labels. + /// Router Worker Offer Issued Time in UTC. + /// Router Worker Offer Issued Expiration Time in UTC. + /// Router Worker Offer Issued Worker Tags. + /// Router Worker Offer Issued Job Labels. + /// Router Worker Offer Issued Job Tags. + /// A new instance for mocking. + public static AcsRouterWorkerOfferIssuedEventData AcsRouterWorkerOfferIssuedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null, int? jobPriority = null, IReadOnlyDictionary workerLabels = null, DateTimeOffset? offeredOn = null, DateTimeOffset? expiresOn = null, IReadOnlyDictionary workerTags = null, IReadOnlyDictionary jobLabels = null, IReadOnlyDictionary jobTags = null) + { + workerLabels ??= new Dictionary(); + workerTags ??= new Dictionary(); + jobLabels ??= new Dictionary(); + jobTags ??= new Dictionary(); + + return new AcsRouterWorkerOfferIssuedEventData(jobId, channelReference, channelId, workerId, queueId, offerId, jobPriority, workerLabels, offeredOn, expiresOn, workerTags, jobLabels, jobTags); + } + + /// Initializes a new instance of AcsRouterWorkerOfferRevokedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// Router Worker Offer Revoked Queue Id. + /// Router Worker Offer Revoked Offer Id. + /// A new instance for mocking. + public static AcsRouterWorkerOfferRevokedEventData AcsRouterWorkerOfferRevokedEventData(string jobId = null, string channelReference = null, string channelId = null, string workerId = null, string queueId = null, string offerId = null) + { + return new AcsRouterWorkerOfferRevokedEventData(jobId, channelReference, channelId, workerId, queueId, offerId); + } + + /// Initializes a new instance of AcsRouterWorkerRegisteredEventData. + /// Router Worker Registered Worker Id. + /// Router Worker Registered Queue Info. + /// Router Worker Registered Channel Configuration. + /// Router Worker Register Total Capacity. + /// Router Worker Registered Labels. + /// Router Worker Registered Tags. + /// A new instance for mocking. + public static AcsRouterWorkerRegisteredEventData AcsRouterWorkerRegisteredEventData(string workerId = null, IEnumerable queueAssignments = null, IEnumerable channelConfigurations = null, int? totalCapacity = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null) + { + queueAssignments ??= new List(); + channelConfigurations ??= new List(); + labels ??= new Dictionary(); + tags ??= new Dictionary(); + + return new AcsRouterWorkerRegisteredEventData(workerId, queueAssignments?.ToList(), channelConfigurations?.ToList(), totalCapacity, labels, tags); + } + + /// Initializes a new instance of AcsRouterChannelConfiguration. + /// Channel ID for Router Job. + /// Capacity Cost Per Job for Router Job. + /// Max Number of Jobs for Router Job. + /// A new instance for mocking. + public static AcsRouterChannelConfiguration AcsRouterChannelConfiguration(string channelId = null, int? capacityCostPerJob = null, int? maxNumberOfJobs = null) + { + return new AcsRouterChannelConfiguration(channelId, capacityCostPerJob, maxNumberOfJobs); + } + /// Initializes a new instance of AcsChatMessageReceivedEventData. /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -2596,5 +3019,58 @@ public static HealthcareDicomImageDeletedEventData HealthcareDicomImageDeletedEv { return new HealthcareDicomImageDeletedEventData(partitionName, imageStudyInstanceUid, imageSeriesInstanceUid, imageSopInstanceUid, serviceHostName, sequenceNumber); } + + /// Initializes a new instance of ResourceNotificationsResourceUpdatedDetails. + /// id of the resource for which the event is being emitted. + /// name of the resource for which the event is being emitted. + /// the type of the resource for which the event is being emitted. + /// the location of the resource for which the event is being emitted. + /// the tags on the resource for which the event is being emitted. + /// properties in the payload of the resource for which the event is being emitted. + /// A new instance for mocking. + public static ResourceNotificationsResourceUpdatedDetails ResourceNotificationsResourceUpdatedDetails(string id = null, string name = null, string type = null, string location = null, string tags = null, IReadOnlyDictionary properties = null) + { + properties ??= new Dictionary(); + + return new ResourceNotificationsResourceUpdatedDetails(id, name, type, location, tags, properties); + } + + /// Initializes a new instance of ResourceNotificationsOperationalDetails. + /// Date and Time when resource was updated. + /// A new instance for mocking. + public static ResourceNotificationsOperationalDetails ResourceNotificationsOperationalDetails(DateTimeOffset? resourceEventTime = null) + { + return new ResourceNotificationsOperationalDetails(resourceEventTime); + } + + /// Initializes a new instance of ResourceNotificationsResourceUpdatedEventData. + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + /// A new instance for mocking. + public static ResourceNotificationsResourceUpdatedEventData ResourceNotificationsResourceUpdatedEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails = null, ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) + { + return new ResourceNotificationsResourceUpdatedEventData(resourceDetails, operationalDetails, apiVersion); + } + + /// Initializes a new instance of ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData. + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + /// A new instance for mocking. + public static ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails = null, ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) + { + return new ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData(resourceDetails, operationalDetails, apiVersion); + } + + /// Initializes a new instance of ResourceNotificationsHealthResourcesAnnotatedEventData. + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + /// A new instance for mocking. + public static ResourceNotificationsHealthResourcesAnnotatedEventData ResourceNotificationsHealthResourcesAnnotatedEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails = null, ResourceNotificationsOperationalDetails operationalDetails = null, string apiVersion = null) + { + return new ResourceNotificationsHealthResourcesAnnotatedEventData(resourceDetails, operationalDetails, apiVersion); + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterChannelConfiguration.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterChannelConfiguration.Serialization.cs new file mode 100644 index 0000000000000..680bbdd0c8804 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterChannelConfiguration.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsRouterChannelConfiguration + { + internal static AcsRouterChannelConfiguration DeserializeAcsRouterChannelConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional channelId = default; + Optional capacityCostPerJob = default; + Optional maxNumberOfJobs = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("capacityCostPerJob"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacityCostPerJob = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxNumberOfJobs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxNumberOfJobs = property.Value.GetInt32(); + continue; + } + } + return new AcsRouterChannelConfiguration(channelId.Value, Optional.ToNullable(capacityCostPerJob), Optional.ToNullable(maxNumberOfJobs)); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterChannelConfiguration.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterChannelConfiguration.cs new file mode 100644 index 0000000000000..11ce5018accbf --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterChannelConfiguration.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Router Channel Configuration. + public partial class AcsRouterChannelConfiguration + { + /// Initializes a new instance of AcsRouterChannelConfiguration. + internal AcsRouterChannelConfiguration() + { + } + + /// Initializes a new instance of AcsRouterChannelConfiguration. + /// Channel ID for Router Job. + /// Capacity Cost Per Job for Router Job. + /// Max Number of Jobs for Router Job. + internal AcsRouterChannelConfiguration(string channelId, int? capacityCostPerJob, int? maxNumberOfJobs) + { + ChannelId = channelId; + CapacityCostPerJob = capacityCostPerJob; + MaxNumberOfJobs = maxNumberOfJobs; + } + + /// Channel ID for Router Job. + public string ChannelId { get; } + /// Capacity Cost Per Job for Router Job. + public int? CapacityCostPerJob { get; } + /// Max Number of Jobs for Router Job. + public int? MaxNumberOfJobs { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterCommunicationError.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterCommunicationError.Serialization.cs new file mode 100644 index 0000000000000..cb33290b1ee76 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterCommunicationError.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + internal partial class AcsRouterCommunicationError + { + internal static AcsRouterCommunicationError DeserializeAcsRouterCommunicationError(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional code = default; + Optional message = default; + Optional target = default; + Optional innererror = default; + Optional> details = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = DeserializeAcsRouterCommunicationError(property.Value); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeAcsRouterCommunicationError(item)); + } + details = array; + continue; + } + } + return new AcsRouterCommunicationError(code.Value, message.Value, target.Value, innererror.Value, Optional.ToList(details)); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterCommunicationError.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterCommunicationError.cs new file mode 100644 index 0000000000000..b878576811fdb --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterCommunicationError.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Router Communication Error. + internal partial class AcsRouterCommunicationError + { + /// Initializes a new instance of AcsRouterCommunicationError. + internal AcsRouterCommunicationError() + { + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of AcsRouterCommunicationError. + /// Router Communication Error Code. + /// Router Communication Error Message. + /// Router Communication Error Target. + /// Router Communication Inner Error. + /// List of Router Communication Errors. + internal AcsRouterCommunicationError(string code, string message, string target, AcsRouterCommunicationError innererror, IReadOnlyList details) + { + Code = code; + Message = message; + Target = target; + Innererror = innererror; + Details = details; + } + + /// Router Communication Error Code. + public string Code { get; } + /// Router Communication Error Message. + public string Message { get; } + /// Router Communication Error Target. + public string Target { get; } + /// Router Communication Inner Error. + public AcsRouterCommunicationError Innererror { get; } + /// List of Router Communication Errors. + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterEventData.Serialization.cs new file mode 100644 index 0000000000000..42fb0a87cede4 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterEventData.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterEventDataConverter))] + public partial class AcsRouterEventData + { + internal static AcsRouterEventData DeserializeAcsRouterEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterEventData(jobId.Value, channelReference.Value, channelId.Value); + } + + internal partial class AcsRouterEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterEventData.cs new file mode 100644 index 0000000000000..19d4a8ffbe65b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterEventData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of all Router events. + public partial class AcsRouterEventData + { + /// Initializes a new instance of AcsRouterEventData. + internal AcsRouterEventData() + { + } + + /// Initializes a new instance of AcsRouterEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + internal AcsRouterEventData(string jobId, string channelReference, string channelId) + { + JobId = jobId; + ChannelReference = channelReference; + ChannelId = channelId; + } + + /// Router Event Job ID. + public string JobId { get; } + /// Router Event Channel Reference. + public string ChannelReference { get; } + /// Router Event Channel ID. + public string ChannelId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs new file mode 100644 index 0000000000000..c6d915bfaff8e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobCancelledEventDataConverter))] + public partial class AcsRouterJobCancelledEventData + { + internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional note = default; + Optional dispositionCode = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("note"u8)) + { + note = property.Value.GetString(); + continue; + } + if (property.NameEquals("dispositionCode"u8)) + { + dispositionCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobCancelledEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), note.Value, dispositionCode.Value); + } + + internal partial class AcsRouterJobCancelledEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobCancelledEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobCancelledEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobCancelledEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs new file mode 100644 index 0000000000000..1a96986b24d13 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobCancelled event. + public partial class AcsRouterJobCancelledEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobCancelledEventData. + internal AcsRouterJobCancelledEventData() + { + } + + /// Initializes a new instance of AcsRouterJobCancelledEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Note. + /// Router Job Disposition Code. + internal AcsRouterJobCancelledEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, string note, string dispositionCode) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + Note = note; + DispositionCode = dispositionCode; + } + + /// Router Job Note. + public string Note { get; } + /// Router Job Disposition Code. + public string DispositionCode { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs new file mode 100644 index 0000000000000..d7e7935a5504c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobClassificationFailedEventDataConverter))] + public partial class AcsRouterJobClassificationFailedEventData + { + internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJobClassificationFailedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional classificationPolicyId = default; + Optional> errors = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classificationPolicyId"u8)) + { + classificationPolicyId = property.Value.GetString(); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterCommunicationError.DeserializeAcsRouterCommunicationError(item)); + } + errors = array; + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobClassificationFailedEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), classificationPolicyId.Value, Optional.ToList(errors)); + } + + internal partial class AcsRouterJobClassificationFailedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobClassificationFailedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobClassificationFailedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobClassificationFailedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs new file mode 100644 index 0000000000000..6056c0d2ab83d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClassificationFailed event. + public partial class AcsRouterJobClassificationFailedEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobClassificationFailedEventData. + internal AcsRouterJobClassificationFailedEventData() + { + ErrorsInternal = new ChangeTrackingList(); + } + + /// Initializes a new instance of AcsRouterJobClassificationFailedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Classification Policy Id. + /// Router Job Classification Failed Errors. + internal AcsRouterJobClassificationFailedEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, string classificationPolicyId, IReadOnlyList errorsInternal) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + ClassificationPolicyId = classificationPolicyId; + ErrorsInternal = errorsInternal; + } + + /// Router Job Classification Policy Id. + public string ClassificationPolicyId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs new file mode 100644 index 0000000000000..389cbc7045335 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobClassifiedEventDataConverter))] + public partial class AcsRouterJobClassifiedEventData + { + internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifiedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional queueDetails = default; + Optional classificationPolicyId = default; + Optional priority = default; + Optional> attachedWorkerSelectors = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("queueDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + queueDetails = AcsRouterQueueDetails.DeserializeAcsRouterQueueDetails(property.Value); + continue; + } + if (property.NameEquals("classificationPolicyId"u8)) + { + classificationPolicyId = property.Value.GetString(); + continue; + } + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("attachedWorkerSelectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterWorkerSelector.DeserializeAcsRouterWorkerSelector(item)); + } + attachedWorkerSelectors = array; + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobClassifiedEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), queueDetails.Value, classificationPolicyId.Value, Optional.ToNullable(priority), Optional.ToList(attachedWorkerSelectors)); + } + + internal partial class AcsRouterJobClassifiedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobClassifiedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobClassifiedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobClassifiedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs new file mode 100644 index 0000000000000..4a4bc7ae1551f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClassified event. + public partial class AcsRouterJobClassifiedEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobClassifiedEventData. + internal AcsRouterJobClassifiedEventData() + { + AttachedWorkerSelectors = new ChangeTrackingList(); + } + + /// Initializes a new instance of AcsRouterJobClassifiedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Queue Info. + /// Router Job Classification Policy Id. + /// Router Job Priority. + /// Router Job Attached Worker Selector. + internal AcsRouterJobClassifiedEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterQueueDetails queueDetails, string classificationPolicyId, int? priority, IReadOnlyList attachedWorkerSelectors) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + QueueDetails = queueDetails; + ClassificationPolicyId = classificationPolicyId; + Priority = priority; + AttachedWorkerSelectors = attachedWorkerSelectors; + } + + /// Router Job Queue Info. + public AcsRouterQueueDetails QueueDetails { get; } + /// Router Job Classification Policy Id. + public string ClassificationPolicyId { get; } + /// Router Job Priority. + public int? Priority { get; } + /// Router Job Attached Worker Selector. + public IReadOnlyList AttachedWorkerSelectors { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs new file mode 100644 index 0000000000000..800f54e7f7eba --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobClosedEventDataConverter))] + public partial class AcsRouterJobClosedEventData + { + internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional assignmentId = default; + Optional workerId = default; + Optional dispositionCode = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignmentId"u8)) + { + assignmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("dispositionCode"u8)) + { + dispositionCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobClosedEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), assignmentId.Value, workerId.Value, dispositionCode.Value); + } + + internal partial class AcsRouterJobClosedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobClosedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobClosedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobClosedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs new file mode 100644 index 0000000000000..dde7aff46f74a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClosed event. + public partial class AcsRouterJobClosedEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobClosedEventData. + internal AcsRouterJobClosedEventData() + { + } + + /// Initializes a new instance of AcsRouterJobClosedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Closed Assignment Id. + /// Router Job Closed Worker Id. + /// Router Job Closed Disposition Code. + internal AcsRouterJobClosedEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, string assignmentId, string workerId, string dispositionCode) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + AssignmentId = assignmentId; + WorkerId = workerId; + DispositionCode = dispositionCode; + } + + /// Router Job Closed Assignment Id. + public string AssignmentId { get; } + /// Router Job Closed Worker Id. + public string WorkerId { get; } + /// Router Job Closed Disposition Code. + public string DispositionCode { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs new file mode 100644 index 0000000000000..5c276566d3018 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobCompletedEventDataConverter))] + public partial class AcsRouterJobCompletedEventData + { + internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional assignmentId = default; + Optional workerId = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignmentId"u8)) + { + assignmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobCompletedEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), assignmentId.Value, workerId.Value); + } + + internal partial class AcsRouterJobCompletedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobCompletedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobCompletedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobCompletedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs new file mode 100644 index 0000000000000..4d88acf5c7185 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobCompleted event. + public partial class AcsRouterJobCompletedEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobCompletedEventData. + internal AcsRouterJobCompletedEventData() + { + } + + /// Initializes a new instance of AcsRouterJobCompletedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Completed Assignment Id. + /// Router Job Completed Worker Id. + internal AcsRouterJobCompletedEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, string assignmentId, string workerId) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + AssignmentId = assignmentId; + WorkerId = workerId; + } + + /// Router Job Completed Assignment Id. + public string AssignmentId { get; } + /// Router Job Completed Worker Id. + public string WorkerId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs new file mode 100644 index 0000000000000..d6eb2480ec497 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobDeletedEventDataConverter))] + public partial class AcsRouterJobDeletedEventData + { + internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobDeletedEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags)); + } + + internal partial class AcsRouterJobDeletedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobDeletedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobDeletedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobDeletedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs new file mode 100644 index 0000000000000..ef9eecc463ecf --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobDeleted event. + public partial class AcsRouterJobDeletedEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobDeletedEventData. + internal AcsRouterJobDeletedEventData() + { + } + + /// Initializes a new instance of AcsRouterJobDeletedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + internal AcsRouterJobDeletedEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs new file mode 100644 index 0000000000000..8157b7d250185 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobEventDataConverter))] + public partial class AcsRouterJobEventData + { + internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags)); + } + + internal partial class AcsRouterJobEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs new file mode 100644 index 0000000000000..85dea89131564 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of all Router Job events. + public partial class AcsRouterJobEventData : AcsRouterEventData + { + /// Initializes a new instance of AcsRouterJobEventData. + internal AcsRouterJobEventData() + { + Labels = new ChangeTrackingDictionary(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of AcsRouterJobEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + internal AcsRouterJobEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(jobId, channelReference, channelId) + { + QueueId = queueId; + Labels = labels; + Tags = tags; + } + + /// Router Job events Queue Id. + public string QueueId { get; } + /// Router Job events Labels. + public IReadOnlyDictionary Labels { get; } + /// Router Jobs events Tags. + public IReadOnlyDictionary Tags { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs new file mode 100644 index 0000000000000..304f14c18671c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobExceptionTriggeredEventDataConverter))] + public partial class AcsRouterJobExceptionTriggeredEventData + { + internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobExceptionTriggeredEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional ruleKey = default; + Optional exceptionRuleId = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ruleKey"u8)) + { + ruleKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("exceptionRuleId"u8)) + { + exceptionRuleId = property.Value.GetString(); + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobExceptionTriggeredEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), ruleKey.Value, exceptionRuleId.Value); + } + + internal partial class AcsRouterJobExceptionTriggeredEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobExceptionTriggeredEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobExceptionTriggeredEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobExceptionTriggeredEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs new file mode 100644 index 0000000000000..dec9c5ca360fe --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobExceptionTriggered event. + public partial class AcsRouterJobExceptionTriggeredEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobExceptionTriggeredEventData. + internal AcsRouterJobExceptionTriggeredEventData() + { + } + + /// Initializes a new instance of AcsRouterJobExceptionTriggeredEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Exception Triggered Rule Key. + /// Router Job Exception Triggered Rule Id. + internal AcsRouterJobExceptionTriggeredEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, string ruleKey, string exceptionRuleId) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + RuleKey = ruleKey; + ExceptionRuleId = exceptionRuleId; + } + + /// Router Job Exception Triggered Rule Key. + public string RuleKey { get; } + /// Router Job Exception Triggered Rule Id. + public string ExceptionRuleId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs new file mode 100644 index 0000000000000..665144712c0c1 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobQueuedEventDataConverter))] + public partial class AcsRouterJobQueuedEventData + { + internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional priority = default; + Optional> attachedWorkerSelectors = default; + Optional> requestedWorkerSelectors = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("attachedWorkerSelectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterWorkerSelector.DeserializeAcsRouterWorkerSelector(item)); + } + attachedWorkerSelectors = array; + continue; + } + if (property.NameEquals("requestedWorkerSelectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterWorkerSelector.DeserializeAcsRouterWorkerSelector(item)); + } + requestedWorkerSelectors = array; + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobQueuedEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), Optional.ToNullable(priority), Optional.ToList(attachedWorkerSelectors), Optional.ToList(requestedWorkerSelectors)); + } + + internal partial class AcsRouterJobQueuedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobQueuedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobQueuedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobQueuedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs new file mode 100644 index 0000000000000..5c6732ee3f550 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobQueued event. + public partial class AcsRouterJobQueuedEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobQueuedEventData. + internal AcsRouterJobQueuedEventData() + { + AttachedWorkerSelectors = new ChangeTrackingList(); + RequestedWorkerSelectors = new ChangeTrackingList(); + } + + /// Initializes a new instance of AcsRouterJobQueuedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Priority. + /// Router Job Queued Attached Worker Selector. + /// Router Job Queued Requested Worker Selector. + internal AcsRouterJobQueuedEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, int? priority, IReadOnlyList attachedWorkerSelectors, IReadOnlyList requestedWorkerSelectors) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + Priority = priority; + AttachedWorkerSelectors = attachedWorkerSelectors; + RequestedWorkerSelectors = requestedWorkerSelectors; + } + + /// Router Job Priority. + public int? Priority { get; } + /// Router Job Queued Attached Worker Selector. + public IReadOnlyList AttachedWorkerSelectors { get; } + /// Router Job Queued Requested Worker Selector. + public IReadOnlyList RequestedWorkerSelectors { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs new file mode 100644 index 0000000000000..6d232c0c323e8 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobReceivedEventDataConverter))] + public partial class AcsRouterJobReceivedEventData + { + internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional jobStatus = default; + Optional classificationPolicyId = default; + Optional priority = default; + Optional> requestedWorkerSelectors = default; + Optional scheduledOn = default; + bool unavailableForMatching = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobStatus = new AcsRouterJobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("classificationPolicyId"u8)) + { + classificationPolicyId = property.Value.GetString(); + continue; + } + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("requestedWorkerSelectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterWorkerSelector.DeserializeAcsRouterWorkerSelector(item)); + } + requestedWorkerSelectors = array; + continue; + } + if (property.NameEquals("scheduledOn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("unavailableForMatching"u8)) + { + unavailableForMatching = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobReceivedEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), Optional.ToNullable(jobStatus), classificationPolicyId.Value, Optional.ToNullable(priority), Optional.ToList(requestedWorkerSelectors), Optional.ToNullable(scheduledOn), unavailableForMatching); + } + + internal partial class AcsRouterJobReceivedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobReceivedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobReceivedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobReceivedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs new file mode 100644 index 0000000000000..3e0e38789325b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobReceived event. + public partial class AcsRouterJobReceivedEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobReceivedEventData. + /// Unavailable For Matching for Router Job Received. + internal AcsRouterJobReceivedEventData(bool unavailableForMatching) + { + RequestedWorkerSelectors = new ChangeTrackingList(); + UnavailableForMatching = unavailableForMatching; + } + + /// Initializes a new instance of AcsRouterJobReceivedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Received Job Status. + /// Router Job Classification Policy Id. + /// Router Job Priority. + /// Router Job Received Requested Worker Selectors. + /// Router Job Received Scheduled Time in UTC. + /// Unavailable For Matching for Router Job Received. + internal AcsRouterJobReceivedEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterJobStatus? jobStatus, string classificationPolicyId, int? priority, IReadOnlyList requestedWorkerSelectors, DateTimeOffset? scheduledOn, bool unavailableForMatching) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + JobStatus = jobStatus; + ClassificationPolicyId = classificationPolicyId; + Priority = priority; + RequestedWorkerSelectors = requestedWorkerSelectors; + ScheduledOn = scheduledOn; + UnavailableForMatching = unavailableForMatching; + } + + /// Router Job Received Job Status. + public AcsRouterJobStatus? JobStatus { get; } + /// Router Job Classification Policy Id. + public string ClassificationPolicyId { get; } + /// Router Job Priority. + public int? Priority { get; } + /// Router Job Received Requested Worker Selectors. + public IReadOnlyList RequestedWorkerSelectors { get; } + /// Router Job Received Scheduled Time in UTC. + public DateTimeOffset? ScheduledOn { get; } + /// Unavailable For Matching for Router Job Received. + public bool UnavailableForMatching { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs new file mode 100644 index 0000000000000..9556c5d7ec6ef --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobSchedulingFailedEventDataConverter))] + public partial class AcsRouterJobSchedulingFailedEventData + { + internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSchedulingFailedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional priority = default; + Optional> expiredAttachedWorkerSelectors = default; + Optional> expiredRequestedWorkerSelectors = default; + Optional scheduledOn = default; + Optional failureReason = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("expiredAttachedWorkerSelectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterWorkerSelector.DeserializeAcsRouterWorkerSelector(item)); + } + expiredAttachedWorkerSelectors = array; + continue; + } + if (property.NameEquals("expiredRequestedWorkerSelectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterWorkerSelector.DeserializeAcsRouterWorkerSelector(item)); + } + expiredRequestedWorkerSelectors = array; + continue; + } + if (property.NameEquals("scheduledOn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("failureReason"u8)) + { + failureReason = property.Value.GetString(); + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobSchedulingFailedEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), Optional.ToNullable(priority), Optional.ToList(expiredAttachedWorkerSelectors), Optional.ToList(expiredRequestedWorkerSelectors), Optional.ToNullable(scheduledOn), failureReason.Value); + } + + internal partial class AcsRouterJobSchedulingFailedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobSchedulingFailedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobSchedulingFailedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobSchedulingFailedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs new file mode 100644 index 0000000000000..05099f19c2c5d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobSchedulingFailed event. + public partial class AcsRouterJobSchedulingFailedEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobSchedulingFailedEventData. + internal AcsRouterJobSchedulingFailedEventData() + { + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); + } + + /// Initializes a new instance of AcsRouterJobSchedulingFailedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Priority. + /// Router Job Scheduling Failed Attached Worker Selector Expired. + /// Router Job Scheduling Failed Requested Worker Selector Expired. + /// Router Job Scheduling Failed Scheduled Time in UTC. + /// Router Job Scheduling Failed Reason. + internal AcsRouterJobSchedulingFailedEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, int? priority, IReadOnlyList expiredAttachedWorkerSelectors, IReadOnlyList expiredRequestedWorkerSelectors, DateTimeOffset? scheduledOn, string failureReason) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + Priority = priority; + ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors; + ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors; + ScheduledOn = scheduledOn; + FailureReason = failureReason; + } + + /// Router Job Priority. + public int? Priority { get; } + /// Router Job Scheduling Failed Attached Worker Selector Expired. + public IReadOnlyList ExpiredAttachedWorkerSelectors { get; } + /// Router Job Scheduling Failed Requested Worker Selector Expired. + public IReadOnlyList ExpiredRequestedWorkerSelectors { get; } + /// Router Job Scheduling Failed Scheduled Time in UTC. + public DateTimeOffset? ScheduledOn { get; } + /// Router Job Scheduling Failed Reason. + public string FailureReason { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobStatus.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobStatus.cs new file mode 100644 index 0000000000000..4e4178b97f90c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobStatus.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.Models +{ + /// Router Job Received Job Status. + public readonly partial struct AcsRouterJobStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsRouterJobStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingClassificationValue = "PendingClassification"; + private const string QueuedValue = "Queued"; + private const string AssignedValue = "Assigned"; + private const string CompletedValue = "Completed"; + private const string ClosedValue = "Closed"; + private const string CancelledValue = "Cancelled"; + private const string ClassificationFailedValue = "ClassificationFailed"; + private const string CreatedValue = "Created"; + private const string PendingScheduleValue = "PendingSchedule"; + private const string ScheduledValue = "Scheduled"; + private const string ScheduleFailedValue = "ScheduleFailed"; + private const string WaitingForActivationValue = "WaitingForActivation"; + + /// PendingClassification. + public static AcsRouterJobStatus PendingClassification { get; } = new AcsRouterJobStatus(PendingClassificationValue); + /// Queued. + public static AcsRouterJobStatus Queued { get; } = new AcsRouterJobStatus(QueuedValue); + /// Assigned. + public static AcsRouterJobStatus Assigned { get; } = new AcsRouterJobStatus(AssignedValue); + /// Completed. + public static AcsRouterJobStatus Completed { get; } = new AcsRouterJobStatus(CompletedValue); + /// Closed. + public static AcsRouterJobStatus Closed { get; } = new AcsRouterJobStatus(ClosedValue); + /// Cancelled. + public static AcsRouterJobStatus Cancelled { get; } = new AcsRouterJobStatus(CancelledValue); + /// ClassificationFailed. + public static AcsRouterJobStatus ClassificationFailed { get; } = new AcsRouterJobStatus(ClassificationFailedValue); + /// Created. + public static AcsRouterJobStatus Created { get; } = new AcsRouterJobStatus(CreatedValue); + /// PendingSchedule. + public static AcsRouterJobStatus PendingSchedule { get; } = new AcsRouterJobStatus(PendingScheduleValue); + /// Scheduled. + public static AcsRouterJobStatus Scheduled { get; } = new AcsRouterJobStatus(ScheduledValue); + /// ScheduleFailed. + public static AcsRouterJobStatus ScheduleFailed { get; } = new AcsRouterJobStatus(ScheduleFailedValue); + /// WaitingForActivation. + public static AcsRouterJobStatus WaitingForActivation { get; } = new AcsRouterJobStatus(WaitingForActivationValue); + /// Determines if two values are the same. + public static bool operator ==(AcsRouterJobStatus left, AcsRouterJobStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsRouterJobStatus left, AcsRouterJobStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AcsRouterJobStatus(string value) => new AcsRouterJobStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsRouterJobStatus other && Equals(other); + /// + public bool Equals(AcsRouterJobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs new file mode 100644 index 0000000000000..434758b1ba2ad --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobUnassignedEventDataConverter))] + public partial class AcsRouterJobUnassignedEventData + { + internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassignedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional assignmentId = default; + Optional workerId = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignmentId"u8)) + { + assignmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobUnassignedEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), assignmentId.Value, workerId.Value); + } + + internal partial class AcsRouterJobUnassignedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobUnassignedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobUnassignedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobUnassignedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs new file mode 100644 index 0000000000000..6292ccda401ba --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobUnassigned event. + public partial class AcsRouterJobUnassignedEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobUnassignedEventData. + internal AcsRouterJobUnassignedEventData() + { + } + + /// Initializes a new instance of AcsRouterJobUnassignedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Unassigned Assignment Id. + /// Router Job Unassigned Worker Id. + internal AcsRouterJobUnassignedEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, string assignmentId, string workerId) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + AssignmentId = assignmentId; + WorkerId = workerId; + } + + /// Router Job Unassigned Assignment Id. + public string AssignmentId { get; } + /// Router Job Unassigned Worker Id. + public string WorkerId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs new file mode 100644 index 0000000000000..637bc552a60be --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobWaitingForActivationEventDataConverter))] + public partial class AcsRouterJobWaitingForActivationEventData + { + internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJobWaitingForActivationEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional priority = default; + Optional> expiredAttachedWorkerSelectors = default; + Optional> expiredRequestedWorkerSelectors = default; + Optional scheduledOn = default; + bool unavailableForMatching = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("expiredAttachedWorkerSelectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterWorkerSelector.DeserializeAcsRouterWorkerSelector(item)); + } + expiredAttachedWorkerSelectors = array; + continue; + } + if (property.NameEquals("expiredRequestedWorkerSelectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterWorkerSelector.DeserializeAcsRouterWorkerSelector(item)); + } + expiredRequestedWorkerSelectors = array; + continue; + } + if (property.NameEquals("scheduledOn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("unavailableForMatching"u8)) + { + unavailableForMatching = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobWaitingForActivationEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), Optional.ToNullable(priority), Optional.ToList(expiredAttachedWorkerSelectors), Optional.ToList(expiredRequestedWorkerSelectors), Optional.ToNullable(scheduledOn), unavailableForMatching); + } + + internal partial class AcsRouterJobWaitingForActivationEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobWaitingForActivationEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobWaitingForActivationEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobWaitingForActivationEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs new file mode 100644 index 0000000000000..464e97430c378 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobWaitingForActivation event. + public partial class AcsRouterJobWaitingForActivationEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobWaitingForActivationEventData. + /// Router Job Waiting For Activation Unavailable For Matching. + internal AcsRouterJobWaitingForActivationEventData(bool unavailableForMatching) + { + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); + UnavailableForMatching = unavailableForMatching; + } + + /// Initializes a new instance of AcsRouterJobWaitingForActivationEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Waiting For Activation Priority. + /// Router Job Waiting For Activation Worker Selector Expired. + /// Router Job Waiting For Activation Requested Worker Selector Expired. + /// Router Job Waiting For Activation Scheduled Time in UTC. + /// Router Job Waiting For Activation Unavailable For Matching. + internal AcsRouterJobWaitingForActivationEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, int? priority, IReadOnlyList expiredAttachedWorkerSelectors, IReadOnlyList expiredRequestedWorkerSelectors, DateTimeOffset? scheduledOn, bool unavailableForMatching) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + Priority = priority; + ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors; + ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors; + ScheduledOn = scheduledOn; + UnavailableForMatching = unavailableForMatching; + } + + /// Router Job Waiting For Activation Priority. + public int? Priority { get; } + /// Router Job Waiting For Activation Worker Selector Expired. + public IReadOnlyList ExpiredAttachedWorkerSelectors { get; } + /// Router Job Waiting For Activation Requested Worker Selector Expired. + public IReadOnlyList ExpiredRequestedWorkerSelectors { get; } + /// Router Job Waiting For Activation Scheduled Time in UTC. + public DateTimeOffset? ScheduledOn { get; } + /// Router Job Waiting For Activation Unavailable For Matching. + public bool UnavailableForMatching { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs new file mode 100644 index 0000000000000..26847debd40e7 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterJobWorkerSelectorsExpiredEventDataConverter))] + public partial class AcsRouterJobWorkerSelectorsExpiredEventData + { + internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouterJobWorkerSelectorsExpiredEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> expiredRequestedWorkerSelectors = default; + Optional> expiredAttachedWorkerSelectors = default; + Optional queueId = default; + Optional> labels = default; + Optional> tags = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredRequestedWorkerSelectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterWorkerSelector.DeserializeAcsRouterWorkerSelector(item)); + } + expiredRequestedWorkerSelectors = array; + continue; + } + if (property.NameEquals("expiredAttachedWorkerSelectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterWorkerSelector.DeserializeAcsRouterWorkerSelector(item)); + } + expiredAttachedWorkerSelectors = array; + continue; + } + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterJobWorkerSelectorsExpiredEventData(jobId.Value, channelReference.Value, channelId.Value, queueId.Value, Optional.ToDictionary(labels), Optional.ToDictionary(tags), Optional.ToList(expiredRequestedWorkerSelectors), Optional.ToList(expiredAttachedWorkerSelectors)); + } + + internal partial class AcsRouterJobWorkerSelectorsExpiredEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterJobWorkerSelectorsExpiredEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterJobWorkerSelectorsExpiredEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterJobWorkerSelectorsExpiredEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs new file mode 100644 index 0000000000000..bf81aac43af28 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobWorkerSelectorsExpired event. + public partial class AcsRouterJobWorkerSelectorsExpiredEventData : AcsRouterJobEventData + { + /// Initializes a new instance of AcsRouterJobWorkerSelectorsExpiredEventData. + internal AcsRouterJobWorkerSelectorsExpiredEventData() + { + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + } + + /// Initializes a new instance of AcsRouterJobWorkerSelectorsExpiredEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Job events Queue Id. + /// Router Job events Labels. + /// Router Jobs events Tags. + /// Router Job Worker Selectors Expired Requested Worker Selectors. + /// Router Job Worker Selectors Expired Attached Worker Selectors. + internal AcsRouterJobWorkerSelectorsExpiredEventData(string jobId, string channelReference, string channelId, string queueId, IReadOnlyDictionary labels, IReadOnlyDictionary tags, IReadOnlyList expiredRequestedWorkerSelectors, IReadOnlyList expiredAttachedWorkerSelectors) : base(jobId, channelReference, channelId, queueId, labels, tags) + { + ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors; + ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors; + } + + /// Router Job Worker Selectors Expired Requested Worker Selectors. + public IReadOnlyList ExpiredRequestedWorkerSelectors { get; } + /// Router Job Worker Selectors Expired Attached Worker Selectors. + public IReadOnlyList ExpiredAttachedWorkerSelectors { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterLabelOperator.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterLabelOperator.cs new file mode 100644 index 0000000000000..d96162d8dd625 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterLabelOperator.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.Models +{ + /// Router Job Worker Selector Label Operator. + public readonly partial struct AcsRouterLabelOperator : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsRouterLabelOperator(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EqualValue = "Equal"; + private const string NotEqualValue = "NotEqual"; + private const string GreaterValue = "Greater"; + private const string LessValue = "Less"; + private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; + private const string LessThanOrEqualValue = "LessThanOrEqual"; + + /// =. + public static AcsRouterLabelOperator Equal { get; } = new AcsRouterLabelOperator(EqualValue); + /// !=. + public static AcsRouterLabelOperator NotEqual { get; } = new AcsRouterLabelOperator(NotEqualValue); + /// >. + public static AcsRouterLabelOperator Greater { get; } = new AcsRouterLabelOperator(GreaterValue); + /// <. + public static AcsRouterLabelOperator Less { get; } = new AcsRouterLabelOperator(LessValue); + /// >=. + public static AcsRouterLabelOperator GreaterThanOrEqual { get; } = new AcsRouterLabelOperator(GreaterThanOrEqualValue); + /// <=. + public static AcsRouterLabelOperator LessThanOrEqual { get; } = new AcsRouterLabelOperator(LessThanOrEqualValue); + /// Determines if two values are the same. + public static bool operator ==(AcsRouterLabelOperator left, AcsRouterLabelOperator right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsRouterLabelOperator left, AcsRouterLabelOperator right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AcsRouterLabelOperator(string value) => new AcsRouterLabelOperator(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsRouterLabelOperator other && Equals(other); + /// + public bool Equals(AcsRouterLabelOperator other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterQueueDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterQueueDetails.Serialization.cs new file mode 100644 index 0000000000000..1abce516a03a2 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterQueueDetails.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsRouterQueueDetails + { + internal static AcsRouterQueueDetails DeserializeAcsRouterQueueDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + Optional name = default; + Optional> labels = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + } + return new AcsRouterQueueDetails(id.Value, name.Value, Optional.ToDictionary(labels)); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterQueueDetails.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterQueueDetails.cs new file mode 100644 index 0000000000000..9c4f3ed83a028 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterQueueDetails.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Router Queue Details. + public partial class AcsRouterQueueDetails + { + /// Initializes a new instance of AcsRouterQueueDetails. + internal AcsRouterQueueDetails() + { + Labels = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of AcsRouterQueueDetails. + /// Router Queue Id. + /// Router Queue Name. + /// Router Queue Labels. + internal AcsRouterQueueDetails(string id, string name, IReadOnlyDictionary labels) + { + Id = id; + Name = name; + Labels = labels; + } + + /// Router Queue Id. + public string Id { get; } + /// Router Queue Name. + public string Name { get; } + /// Router Queue Labels. + public IReadOnlyDictionary Labels { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeletedEventData.Serialization.cs new file mode 100644 index 0000000000000..c8652cc7a95f9 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeletedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterWorkerDeletedEventDataConverter))] + public partial class AcsRouterWorkerDeletedEventData + { + internal static AcsRouterWorkerDeletedEventData DeserializeAcsRouterWorkerDeletedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional workerId = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterWorkerDeletedEventData(jobId.Value, channelReference.Value, channelId.Value, workerId.Value); + } + + internal partial class AcsRouterWorkerDeletedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterWorkerDeletedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterWorkerDeletedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterWorkerDeletedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeletedEventData.cs new file mode 100644 index 0000000000000..58a370b4c45ae --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeletedEventData.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerDeleted event. + public partial class AcsRouterWorkerDeletedEventData : AcsRouterWorkerEventData + { + /// Initializes a new instance of AcsRouterWorkerDeletedEventData. + internal AcsRouterWorkerDeletedEventData() + { + } + + /// Initializes a new instance of AcsRouterWorkerDeletedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + internal AcsRouterWorkerDeletedEventData(string jobId, string channelReference, string channelId, string workerId) : base(jobId, channelReference, channelId, workerId) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeregisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeregisteredEventData.Serialization.cs new file mode 100644 index 0000000000000..9b63f3dfb1e43 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeregisteredEventData.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterWorkerDeregisteredEventDataConverter))] + public partial class AcsRouterWorkerDeregisteredEventData + { + internal static AcsRouterWorkerDeregisteredEventData DeserializeAcsRouterWorkerDeregisteredEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional workerId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + } + return new AcsRouterWorkerDeregisteredEventData(workerId.Value); + } + + internal partial class AcsRouterWorkerDeregisteredEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterWorkerDeregisteredEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterWorkerDeregisteredEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterWorkerDeregisteredEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeregisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeregisteredEventData.cs new file mode 100644 index 0000000000000..9db283f9bf673 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerDeregisteredEventData.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerDeregistered event. + public partial class AcsRouterWorkerDeregisteredEventData + { + /// Initializes a new instance of AcsRouterWorkerDeregisteredEventData. + internal AcsRouterWorkerDeregisteredEventData() + { + } + + /// Initializes a new instance of AcsRouterWorkerDeregisteredEventData. + /// Router Worker Deregistered Worker Id. + internal AcsRouterWorkerDeregisteredEventData(string workerId) + { + WorkerId = workerId; + } + + /// Router Worker Deregistered Worker Id. + public string WorkerId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerEventData.Serialization.cs new file mode 100644 index 0000000000000..5f8f9d3e28013 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterWorkerEventDataConverter))] + public partial class AcsRouterWorkerEventData + { + internal static AcsRouterWorkerEventData DeserializeAcsRouterWorkerEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional workerId = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterWorkerEventData(jobId.Value, channelReference.Value, channelId.Value, workerId.Value); + } + + internal partial class AcsRouterWorkerEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterWorkerEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterWorkerEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterWorkerEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerEventData.cs new file mode 100644 index 0000000000000..c1f87ca9ab02c --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerEventData.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of all Router Worker events. + public partial class AcsRouterWorkerEventData : AcsRouterEventData + { + /// Initializes a new instance of AcsRouterWorkerEventData. + internal AcsRouterWorkerEventData() + { + } + + /// Initializes a new instance of AcsRouterWorkerEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + internal AcsRouterWorkerEventData(string jobId, string channelReference, string channelId, string workerId) : base(jobId, channelReference, channelId) + { + WorkerId = workerId; + } + + /// Router Worker events Worker Id. + public string WorkerId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs new file mode 100644 index 0000000000000..0824739781f6a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterWorkerOfferAcceptedEventDataConverter))] + public partial class AcsRouterWorkerOfferAcceptedEventData + { + internal static AcsRouterWorkerOfferAcceptedEventData DeserializeAcsRouterWorkerOfferAcceptedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional queueId = default; + Optional offerId = default; + Optional assignmentId = default; + Optional jobPriority = default; + Optional> workerLabels = default; + Optional> workerTags = default; + Optional> jobLabels = default; + Optional> jobTags = default; + Optional workerId = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("offerId"u8)) + { + offerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("assignmentId"u8)) + { + assignmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobPriority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobPriority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("workerLabels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + workerLabels = dictionary; + continue; + } + if (property.NameEquals("workerTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + workerTags = dictionary; + continue; + } + if (property.NameEquals("jobLabels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + jobLabels = dictionary; + continue; + } + if (property.NameEquals("jobTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + jobTags = dictionary; + continue; + } + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterWorkerOfferAcceptedEventData(jobId.Value, channelReference.Value, channelId.Value, workerId.Value, queueId.Value, offerId.Value, assignmentId.Value, Optional.ToNullable(jobPriority), Optional.ToDictionary(workerLabels), Optional.ToDictionary(workerTags), Optional.ToDictionary(jobLabels), Optional.ToDictionary(jobTags)); + } + + internal partial class AcsRouterWorkerOfferAcceptedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterWorkerOfferAcceptedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterWorkerOfferAcceptedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterWorkerOfferAcceptedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferAcceptedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferAcceptedEventData.cs new file mode 100644 index 0000000000000..d702d1264512b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferAcceptedEventData.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferAccepted event. + public partial class AcsRouterWorkerOfferAcceptedEventData : AcsRouterWorkerEventData + { + /// Initializes a new instance of AcsRouterWorkerOfferAcceptedEventData. + internal AcsRouterWorkerOfferAcceptedEventData() + { + WorkerLabels = new ChangeTrackingDictionary(); + WorkerTags = new ChangeTrackingDictionary(); + JobLabels = new ChangeTrackingDictionary(); + JobTags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of AcsRouterWorkerOfferAcceptedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// Router Worker Offer Accepted Queue Id. + /// Router Worker Offer Accepted Offer Id. + /// Router Worker Offer Accepted Assignment Id. + /// Router Worker Offer Accepted Job Priority. + /// Router Worker Offer Accepted Worker Labels. + /// Router Worker Offer Accepted Worker Tags. + /// Router Worker Offer Accepted Job Labels. + /// Router Worker Offer Accepted Job Tags. + internal AcsRouterWorkerOfferAcceptedEventData(string jobId, string channelReference, string channelId, string workerId, string queueId, string offerId, string assignmentId, int? jobPriority, IReadOnlyDictionary workerLabels, IReadOnlyDictionary workerTags, IReadOnlyDictionary jobLabels, IReadOnlyDictionary jobTags) : base(jobId, channelReference, channelId, workerId) + { + QueueId = queueId; + OfferId = offerId; + AssignmentId = assignmentId; + JobPriority = jobPriority; + WorkerLabels = workerLabels; + WorkerTags = workerTags; + JobLabels = jobLabels; + JobTags = jobTags; + } + + /// Router Worker Offer Accepted Queue Id. + public string QueueId { get; } + /// Router Worker Offer Accepted Offer Id. + public string OfferId { get; } + /// Router Worker Offer Accepted Assignment Id. + public string AssignmentId { get; } + /// Router Worker Offer Accepted Job Priority. + public int? JobPriority { get; } + /// Router Worker Offer Accepted Worker Labels. + public IReadOnlyDictionary WorkerLabels { get; } + /// Router Worker Offer Accepted Worker Tags. + public IReadOnlyDictionary WorkerTags { get; } + /// Router Worker Offer Accepted Job Labels. + public IReadOnlyDictionary JobLabels { get; } + /// Router Worker Offer Accepted Job Tags. + public IReadOnlyDictionary JobTags { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs new file mode 100644 index 0000000000000..8af5dd7d02635 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterWorkerOfferDeclinedEventDataConverter))] + public partial class AcsRouterWorkerOfferDeclinedEventData + { + internal static AcsRouterWorkerOfferDeclinedEventData DeserializeAcsRouterWorkerOfferDeclinedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional queueId = default; + Optional offerId = default; + Optional workerId = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("offerId"u8)) + { + offerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterWorkerOfferDeclinedEventData(jobId.Value, channelReference.Value, channelId.Value, workerId.Value, queueId.Value, offerId.Value); + } + + internal partial class AcsRouterWorkerOfferDeclinedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterWorkerOfferDeclinedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterWorkerOfferDeclinedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterWorkerOfferDeclinedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferDeclinedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferDeclinedEventData.cs new file mode 100644 index 0000000000000..d8f3ac9e2a28a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferDeclinedEventData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferDeclined event. + public partial class AcsRouterWorkerOfferDeclinedEventData : AcsRouterWorkerEventData + { + /// Initializes a new instance of AcsRouterWorkerOfferDeclinedEventData. + internal AcsRouterWorkerOfferDeclinedEventData() + { + } + + /// Initializes a new instance of AcsRouterWorkerOfferDeclinedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// Router Worker Offer Declined Queue Id. + /// Router Worker Offer Declined Offer Id. + internal AcsRouterWorkerOfferDeclinedEventData(string jobId, string channelReference, string channelId, string workerId, string queueId, string offerId) : base(jobId, channelReference, channelId, workerId) + { + QueueId = queueId; + OfferId = offerId; + } + + /// Router Worker Offer Declined Queue Id. + public string QueueId { get; } + /// Router Worker Offer Declined Offer Id. + public string OfferId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferExpiredEventData.Serialization.cs new file mode 100644 index 0000000000000..8b34dfefcf547 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferExpiredEventData.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterWorkerOfferExpiredEventDataConverter))] + public partial class AcsRouterWorkerOfferExpiredEventData + { + internal static AcsRouterWorkerOfferExpiredEventData DeserializeAcsRouterWorkerOfferExpiredEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional queueId = default; + Optional offerId = default; + Optional workerId = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("offerId"u8)) + { + offerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterWorkerOfferExpiredEventData(jobId.Value, channelReference.Value, channelId.Value, workerId.Value, queueId.Value, offerId.Value); + } + + internal partial class AcsRouterWorkerOfferExpiredEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterWorkerOfferExpiredEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterWorkerOfferExpiredEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterWorkerOfferExpiredEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferExpiredEventData.cs new file mode 100644 index 0000000000000..ac66b6d370967 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferExpiredEventData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferExpired event. + public partial class AcsRouterWorkerOfferExpiredEventData : AcsRouterWorkerEventData + { + /// Initializes a new instance of AcsRouterWorkerOfferExpiredEventData. + internal AcsRouterWorkerOfferExpiredEventData() + { + } + + /// Initializes a new instance of AcsRouterWorkerOfferExpiredEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// Router Worker Offer Expired Queue Id. + /// Router Worker Offer Expired Offer Id. + internal AcsRouterWorkerOfferExpiredEventData(string jobId, string channelReference, string channelId, string workerId, string queueId, string offerId) : base(jobId, channelReference, channelId, workerId) + { + QueueId = queueId; + OfferId = offerId; + } + + /// Router Worker Offer Expired Queue Id. + public string QueueId { get; } + /// Router Worker Offer Expired Offer Id. + public string OfferId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferIssuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferIssuedEventData.Serialization.cs new file mode 100644 index 0000000000000..16db995bb9d90 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferIssuedEventData.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterWorkerOfferIssuedEventDataConverter))] + public partial class AcsRouterWorkerOfferIssuedEventData + { + internal static AcsRouterWorkerOfferIssuedEventData DeserializeAcsRouterWorkerOfferIssuedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional queueId = default; + Optional offerId = default; + Optional jobPriority = default; + Optional> workerLabels = default; + Optional offeredOn = default; + Optional expiresOn = default; + Optional> workerTags = default; + Optional> jobLabels = default; + Optional> jobTags = default; + Optional workerId = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("offerId"u8)) + { + offerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobPriority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobPriority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("workerLabels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + workerLabels = dictionary; + continue; + } + if (property.NameEquals("offeredOn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + offeredOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("expiresOn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiresOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("workerTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + workerTags = dictionary; + continue; + } + if (property.NameEquals("jobLabels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + jobLabels = dictionary; + continue; + } + if (property.NameEquals("jobTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + jobTags = dictionary; + continue; + } + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterWorkerOfferIssuedEventData(jobId.Value, channelReference.Value, channelId.Value, workerId.Value, queueId.Value, offerId.Value, Optional.ToNullable(jobPriority), Optional.ToDictionary(workerLabels), Optional.ToNullable(offeredOn), Optional.ToNullable(expiresOn), Optional.ToDictionary(workerTags), Optional.ToDictionary(jobLabels), Optional.ToDictionary(jobTags)); + } + + internal partial class AcsRouterWorkerOfferIssuedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterWorkerOfferIssuedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterWorkerOfferIssuedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterWorkerOfferIssuedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferIssuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferIssuedEventData.cs new file mode 100644 index 0000000000000..80870a608e5cf --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferIssuedEventData.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferIssued event. + public partial class AcsRouterWorkerOfferIssuedEventData : AcsRouterWorkerEventData + { + /// Initializes a new instance of AcsRouterWorkerOfferIssuedEventData. + internal AcsRouterWorkerOfferIssuedEventData() + { + WorkerLabels = new ChangeTrackingDictionary(); + WorkerTags = new ChangeTrackingDictionary(); + JobLabels = new ChangeTrackingDictionary(); + JobTags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of AcsRouterWorkerOfferIssuedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// Router Worker Offer Issued Queue Id. + /// Router Worker Offer Issued Offer Id. + /// Router Worker Offer Issued Job Priority. + /// Router Worker Offer Issued Worker Labels. + /// Router Worker Offer Issued Time in UTC. + /// Router Worker Offer Issued Expiration Time in UTC. + /// Router Worker Offer Issued Worker Tags. + /// Router Worker Offer Issued Job Labels. + /// Router Worker Offer Issued Job Tags. + internal AcsRouterWorkerOfferIssuedEventData(string jobId, string channelReference, string channelId, string workerId, string queueId, string offerId, int? jobPriority, IReadOnlyDictionary workerLabels, DateTimeOffset? offeredOn, DateTimeOffset? expiresOn, IReadOnlyDictionary workerTags, IReadOnlyDictionary jobLabels, IReadOnlyDictionary jobTags) : base(jobId, channelReference, channelId, workerId) + { + QueueId = queueId; + OfferId = offerId; + JobPriority = jobPriority; + WorkerLabels = workerLabels; + OfferedOn = offeredOn; + ExpiresOn = expiresOn; + WorkerTags = workerTags; + JobLabels = jobLabels; + JobTags = jobTags; + } + + /// Router Worker Offer Issued Queue Id. + public string QueueId { get; } + /// Router Worker Offer Issued Offer Id. + public string OfferId { get; } + /// Router Worker Offer Issued Job Priority. + public int? JobPriority { get; } + /// Router Worker Offer Issued Worker Labels. + public IReadOnlyDictionary WorkerLabels { get; } + /// Router Worker Offer Issued Time in UTC. + public DateTimeOffset? OfferedOn { get; } + /// Router Worker Offer Issued Expiration Time in UTC. + public DateTimeOffset? ExpiresOn { get; } + /// Router Worker Offer Issued Worker Tags. + public IReadOnlyDictionary WorkerTags { get; } + /// Router Worker Offer Issued Job Labels. + public IReadOnlyDictionary JobLabels { get; } + /// Router Worker Offer Issued Job Tags. + public IReadOnlyDictionary JobTags { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferRevokedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferRevokedEventData.Serialization.cs new file mode 100644 index 0000000000000..50dcd0ca4bc0e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferRevokedEventData.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterWorkerOfferRevokedEventDataConverter))] + public partial class AcsRouterWorkerOfferRevokedEventData + { + internal static AcsRouterWorkerOfferRevokedEventData DeserializeAcsRouterWorkerOfferRevokedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional queueId = default; + Optional offerId = default; + Optional workerId = default; + Optional jobId = default; + Optional channelReference = default; + Optional channelId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("queueId"u8)) + { + queueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("offerId"u8)) + { + offerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelReference"u8)) + { + channelReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelId"u8)) + { + channelId = property.Value.GetString(); + continue; + } + } + return new AcsRouterWorkerOfferRevokedEventData(jobId.Value, channelReference.Value, channelId.Value, workerId.Value, queueId.Value, offerId.Value); + } + + internal partial class AcsRouterWorkerOfferRevokedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterWorkerOfferRevokedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterWorkerOfferRevokedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterWorkerOfferRevokedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferRevokedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferRevokedEventData.cs new file mode 100644 index 0000000000000..12bde5d2a6ef3 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerOfferRevokedEventData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferRevoked event. + public partial class AcsRouterWorkerOfferRevokedEventData : AcsRouterWorkerEventData + { + /// Initializes a new instance of AcsRouterWorkerOfferRevokedEventData. + internal AcsRouterWorkerOfferRevokedEventData() + { + } + + /// Initializes a new instance of AcsRouterWorkerOfferRevokedEventData. + /// Router Event Job ID. + /// Router Event Channel Reference. + /// Router Event Channel ID. + /// Router Worker events Worker Id. + /// Router Worker Offer Revoked Queue Id. + /// Router Worker Offer Revoked Offer Id. + internal AcsRouterWorkerOfferRevokedEventData(string jobId, string channelReference, string channelId, string workerId, string queueId, string offerId) : base(jobId, channelReference, channelId, workerId) + { + QueueId = queueId; + OfferId = offerId; + } + + /// Router Worker Offer Revoked Queue Id. + public string QueueId { get; } + /// Router Worker Offer Revoked Offer Id. + public string OfferId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerRegisteredEventData.Serialization.cs new file mode 100644 index 0000000000000..030a4a63d0447 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerRegisteredEventData.Serialization.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsRouterWorkerRegisteredEventDataConverter))] + public partial class AcsRouterWorkerRegisteredEventData + { + internal static AcsRouterWorkerRegisteredEventData DeserializeAcsRouterWorkerRegisteredEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional workerId = default; + Optional> queueAssignments = default; + Optional> channelConfigurations = default; + Optional totalCapacity = default; + Optional> labels = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("workerId"u8)) + { + workerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("queueAssignments"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterQueueDetails.DeserializeAcsRouterQueueDetails(item)); + } + queueAssignments = array; + continue; + } + if (property.NameEquals("channelConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AcsRouterChannelConfiguration.DeserializeAcsRouterChannelConfiguration(item)); + } + channelConfigurations = array; + continue; + } + if (property.NameEquals("totalCapacity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalCapacity = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + labels = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new AcsRouterWorkerRegisteredEventData(workerId.Value, Optional.ToList(queueAssignments), Optional.ToList(channelConfigurations), Optional.ToNullable(totalCapacity), Optional.ToDictionary(labels), Optional.ToDictionary(tags)); + } + + internal partial class AcsRouterWorkerRegisteredEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsRouterWorkerRegisteredEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override AcsRouterWorkerRegisteredEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsRouterWorkerRegisteredEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerRegisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerRegisteredEventData.cs new file mode 100644 index 0000000000000..138eea6592014 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerRegisteredEventData.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerRegistered event. + public partial class AcsRouterWorkerRegisteredEventData + { + /// Initializes a new instance of AcsRouterWorkerRegisteredEventData. + internal AcsRouterWorkerRegisteredEventData() + { + QueueAssignments = new ChangeTrackingList(); + ChannelConfigurations = new ChangeTrackingList(); + Labels = new ChangeTrackingDictionary(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of AcsRouterWorkerRegisteredEventData. + /// Router Worker Registered Worker Id. + /// Router Worker Registered Queue Info. + /// Router Worker Registered Channel Configuration. + /// Router Worker Register Total Capacity. + /// Router Worker Registered Labels. + /// Router Worker Registered Tags. + internal AcsRouterWorkerRegisteredEventData(string workerId, IReadOnlyList queueAssignments, IReadOnlyList channelConfigurations, int? totalCapacity, IReadOnlyDictionary labels, IReadOnlyDictionary tags) + { + WorkerId = workerId; + QueueAssignments = queueAssignments; + ChannelConfigurations = channelConfigurations; + TotalCapacity = totalCapacity; + Labels = labels; + Tags = tags; + } + + /// Router Worker Registered Worker Id. + public string WorkerId { get; } + /// Router Worker Registered Queue Info. + public IReadOnlyList QueueAssignments { get; } + /// Router Worker Registered Channel Configuration. + public IReadOnlyList ChannelConfigurations { get; } + /// Router Worker Register Total Capacity. + public int? TotalCapacity { get; } + /// Router Worker Registered Labels. + public IReadOnlyDictionary Labels { get; } + /// Router Worker Registered Tags. + public IReadOnlyDictionary Tags { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerSelector.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerSelector.Serialization.cs new file mode 100644 index 0000000000000..e34099632404b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerSelector.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsRouterWorkerSelector + { + internal static AcsRouterWorkerSelector DeserializeAcsRouterWorkerSelector(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional key = default; + Optional labelOperator = default; + Optional labelValue = default; + Optional ttlSeconds = default; + Optional state = default; + Optional expirationTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key"u8)) + { + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("labelOperator"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + labelOperator = new AcsRouterLabelOperator(property.Value.GetString()); + continue; + } + if (property.NameEquals("labelValue"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + labelValue = property.Value.GetObject(); + continue; + } + if (property.NameEquals("ttlSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ttlSeconds = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new AcsRouterWorkerSelectorState(property.Value.GetString()); + continue; + } + if (property.NameEquals("expirationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new AcsRouterWorkerSelector(key.Value, Optional.ToNullable(labelOperator), labelValue.Value, Optional.ToNullable(ttlSeconds), Optional.ToNullable(state), Optional.ToNullable(expirationTime)); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerSelector.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerSelector.cs new file mode 100644 index 0000000000000..463205d1f9c3a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerSelector.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Router Job Worker Selector. + public partial class AcsRouterWorkerSelector + { + /// Initializes a new instance of AcsRouterWorkerSelector. + internal AcsRouterWorkerSelector() + { + } + + /// Initializes a new instance of AcsRouterWorkerSelector. + /// Router Job Worker Selector Key. + /// Router Job Worker Selector Label Operator. + /// Router Job Worker Selector Value. + /// Router Job Worker Selector Time to Live in Seconds. + /// Router Job Worker Selector State. + /// Router Job Worker Selector Expiration Time. + internal AcsRouterWorkerSelector(string key, AcsRouterLabelOperator? labelOperator, object labelValue, float? ttlSeconds, AcsRouterWorkerSelectorState? state, DateTimeOffset? expirationTime) + { + Key = key; + LabelOperator = labelOperator; + LabelValue = labelValue; + TtlSeconds = ttlSeconds; + State = state; + ExpirationTime = expirationTime; + } + + /// Router Job Worker Selector Key. + public string Key { get; } + /// Router Job Worker Selector Label Operator. + public AcsRouterLabelOperator? LabelOperator { get; } + /// Router Job Worker Selector Value. + public object LabelValue { get; } + /// Router Job Worker Selector State. + public AcsRouterWorkerSelectorState? State { get; } + /// Router Job Worker Selector Expiration Time. + public DateTimeOffset? ExpirationTime { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerSelectorState.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerSelectorState.cs new file mode 100644 index 0000000000000..31d73348c3390 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterWorkerSelectorState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.Models +{ + /// Router Job Worker Selector State. + public readonly partial struct AcsRouterWorkerSelectorState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsRouterWorkerSelectorState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "active"; + private const string ExpiredValue = "expired"; + + /// Router Job Worker Selector is Active. + public static AcsRouterWorkerSelectorState Active { get; } = new AcsRouterWorkerSelectorState(ActiveValue); + /// Router Job Worker Selector has Expire. + public static AcsRouterWorkerSelectorState Expired { get; } = new AcsRouterWorkerSelectorState(ExpiredValue); + /// Determines if two values are the same. + public static bool operator ==(AcsRouterWorkerSelectorState left, AcsRouterWorkerSelectorState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsRouterWorkerSelectorState left, AcsRouterWorkerSelectorState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AcsRouterWorkerSelectorState(string value) => new AcsRouterWorkerSelectorState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsRouterWorkerSelectorState other && Equals(other); + /// + public bool Equals(AcsRouterWorkerSelectorState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs new file mode 100644 index 0000000000000..913413a370f42 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ResourceNotificationsHealthResourcesAnnotatedEventDataConverter))] + public partial class ResourceNotificationsHealthResourcesAnnotatedEventData + { + internal static ResourceNotificationsHealthResourcesAnnotatedEventData DeserializeResourceNotificationsHealthResourcesAnnotatedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional resourceInfo = default; + Optional operationalInfo = default; + Optional apiVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceInfo = ResourceNotificationsResourceUpdatedDetails.DeserializeResourceNotificationsResourceUpdatedDetails(property.Value); + continue; + } + if (property.NameEquals("operationalInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationalInfo = ResourceNotificationsOperationalDetails.DeserializeResourceNotificationsOperationalDetails(property.Value); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + } + return new ResourceNotificationsHealthResourcesAnnotatedEventData(resourceInfo.Value, operationalInfo.Value, apiVersion.Value); + } + + internal partial class ResourceNotificationsHealthResourcesAnnotatedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ResourceNotificationsHealthResourcesAnnotatedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override ResourceNotificationsHealthResourcesAnnotatedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceNotificationsHealthResourcesAnnotatedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAnnotatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAnnotatedEventData.cs new file mode 100644 index 0000000000000..764ee4c4923d5 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAnnotatedEventData.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated event. + public partial class ResourceNotificationsHealthResourcesAnnotatedEventData : ResourceNotificationsResourceUpdatedEventData + { + /// Initializes a new instance of ResourceNotificationsHealthResourcesAnnotatedEventData. + internal ResourceNotificationsHealthResourcesAnnotatedEventData() + { + } + + /// Initializes a new instance of ResourceNotificationsHealthResourcesAnnotatedEventData. + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + internal ResourceNotificationsHealthResourcesAnnotatedEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails, ResourceNotificationsOperationalDetails operationalDetails, string apiVersion) : base(resourceDetails, operationalDetails, apiVersion) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs new file mode 100644 index 0000000000000..10306793903e1 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventDataConverter))] + public partial class ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData + { + internal static ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData DeserializeResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional resourceInfo = default; + Optional operationalInfo = default; + Optional apiVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceInfo = ResourceNotificationsResourceUpdatedDetails.DeserializeResourceNotificationsResourceUpdatedDetails(property.Value); + continue; + } + if (property.NameEquals("operationalInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationalInfo = ResourceNotificationsOperationalDetails.DeserializeResourceNotificationsOperationalDetails(property.Value); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + } + return new ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData(resourceInfo.Value, operationalInfo.Value, apiVersion.Value); + } + + internal partial class ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.cs new file mode 100644 index 0000000000000..d1625882da631 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged event. + public partial class ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData : ResourceNotificationsResourceUpdatedEventData + { + /// Initializes a new instance of ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData. + internal ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData() + { + } + + /// Initializes a new instance of ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData. + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + internal ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails, ResourceNotificationsOperationalDetails operationalDetails, string apiVersion) : base(resourceDetails, operationalDetails, apiVersion) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsOperationalDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsOperationalDetails.Serialization.cs new file mode 100644 index 0000000000000..839ccc0fdfe8f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsOperationalDetails.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ResourceNotificationsOperationalDetails + { + internal static ResourceNotificationsOperationalDetails DeserializeResourceNotificationsOperationalDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional resourceEventTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceEventTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceEventTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ResourceNotificationsOperationalDetails(Optional.ToNullable(resourceEventTime)); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsOperationalDetails.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsOperationalDetails.cs new file mode 100644 index 0000000000000..097cfac13bfab --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsOperationalDetails.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// details of operational info. + public partial class ResourceNotificationsOperationalDetails + { + /// Initializes a new instance of ResourceNotificationsOperationalDetails. + internal ResourceNotificationsOperationalDetails() + { + } + + /// Initializes a new instance of ResourceNotificationsOperationalDetails. + /// Date and Time when resource was updated. + internal ResourceNotificationsOperationalDetails(DateTimeOffset? resourceEventTime) + { + ResourceEventTime = resourceEventTime; + } + + /// Date and Time when resource was updated. + public DateTimeOffset? ResourceEventTime { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedDetails.Serialization.cs new file mode 100644 index 0000000000000..dbb22f1a2a785 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedDetails.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ResourceNotificationsResourceUpdatedDetails + { + internal static ResourceNotificationsResourceUpdatedDetails DeserializeResourceNotificationsResourceUpdatedDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + Optional name = default; + Optional type = default; + Optional location = default; + Optional tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) + { + tags = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new ResourceNotificationsResourceUpdatedDetails(id.Value, name.Value, type.Value, location.Value, tags.Value, Optional.ToDictionary(properties)); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedDetails.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedDetails.cs new file mode 100644 index 0000000000000..fb5f2be7f951a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedDetails.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Describes the schema of the properties under resource info which are common across all ARN system topic events. + public partial class ResourceNotificationsResourceUpdatedDetails + { + /// Initializes a new instance of ResourceNotificationsResourceUpdatedDetails. + internal ResourceNotificationsResourceUpdatedDetails() + { + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ResourceNotificationsResourceUpdatedDetails. + /// id of the resource for which the event is being emitted. + /// name of the resource for which the event is being emitted. + /// the type of the resource for which the event is being emitted. + /// the location of the resource for which the event is being emitted. + /// the tags on the resource for which the event is being emitted. + /// properties in the payload of the resource for which the event is being emitted. + internal ResourceNotificationsResourceUpdatedDetails(string id, string name, string type, string location, string tags, IReadOnlyDictionary properties) + { + Id = id; + Name = name; + Type = type; + Location = location; + Tags = tags; + Properties = properties; + } + + /// id of the resource for which the event is being emitted. + public string Id { get; } + /// name of the resource for which the event is being emitted. + public string Name { get; } + /// the type of the resource for which the event is being emitted. + public string Type { get; } + /// the location of the resource for which the event is being emitted. + public string Location { get; } + /// the tags on the resource for which the event is being emitted. + public string Tags { get; } + /// properties in the payload of the resource for which the event is being emitted. + public IReadOnlyDictionary Properties { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedEventData.Serialization.cs new file mode 100644 index 0000000000000..70a72e8e8d5e6 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedEventData.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ResourceNotificationsResourceUpdatedEventDataConverter))] + public partial class ResourceNotificationsResourceUpdatedEventData + { + internal static ResourceNotificationsResourceUpdatedEventData DeserializeResourceNotificationsResourceUpdatedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional resourceInfo = default; + Optional operationalInfo = default; + Optional apiVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceInfo = ResourceNotificationsResourceUpdatedDetails.DeserializeResourceNotificationsResourceUpdatedDetails(property.Value); + continue; + } + if (property.NameEquals("operationalInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationalInfo = ResourceNotificationsOperationalDetails.DeserializeResourceNotificationsOperationalDetails(property.Value); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + } + return new ResourceNotificationsResourceUpdatedEventData(resourceInfo.Value, operationalInfo.Value, apiVersion.Value); + } + + internal partial class ResourceNotificationsResourceUpdatedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ResourceNotificationsResourceUpdatedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override ResourceNotificationsResourceUpdatedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceNotificationsResourceUpdatedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedEventData.cs new file mode 100644 index 0000000000000..eb1694603fc04 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ResourceNotificationsResourceUpdatedEventData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Describes the schema of the common properties across all ARN system topic events. + public partial class ResourceNotificationsResourceUpdatedEventData + { + /// Initializes a new instance of ResourceNotificationsResourceUpdatedEventData. + internal ResourceNotificationsResourceUpdatedEventData() + { + } + + /// Initializes a new instance of ResourceNotificationsResourceUpdatedEventData. + /// resourceInfo details for update event. + /// details about operational info. + /// api version of the resource properties bag. + internal ResourceNotificationsResourceUpdatedEventData(ResourceNotificationsResourceUpdatedDetails resourceDetails, ResourceNotificationsOperationalDetails operationalDetails, string apiVersion) + { + ResourceDetails = resourceDetails; + OperationalDetails = operationalDetails; + ApiVersion = apiVersion; + } + + /// resourceInfo details for update event. + public ResourceNotificationsResourceUpdatedDetails ResourceDetails { get; } + /// details about operational info. + public ResourceNotificationsOperationalDetails OperationalDetails { get; } + /// api version of the resource properties bag. + public string ApiVersion { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index d6cfbef814292..2677c9d90707d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: EventGridClient -require: https://github.com/Azure/azure-rest-api-specs/blob/20312e2b31df58f0ea7560e87062d62aa92f0a14/specification/eventgrid/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/3b6ae2ea162efb468a1de6742615e6c655c06e87/specification/eventgrid/data-plane/readme.md generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs index 99319c4deed5b..55499ea160186 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs @@ -3766,6 +3766,116 @@ public void ConsumeCloudEventAcsIncomingCallEvent() Assert.AreEqual("{incoming-call-contextValue}", incomingCallEvent.IncomingCallContext); Assert.AreEqual("correlationId", incomingCallEvent.CorrelationId); } + + [Test] + public void ConsumeCloudEventAcsRouterJobClassificationFailedEvent() + { + string requestContent = @"{ + ""id"": ""e80026e7-e298-46ba-bc42-dab0eda92581"", + ""source"": ""/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}"", + ""subject"": ""job/{job-id}/channel/{channel-id}/classificationpolicy/{classificationpolicy-id}"", + ""data"": { + ""errors"": [ + { + ""code"": ""Failure"", + ""message"": ""Classification failed due to "", + ""target"": null, + ""innererror"": { + ""code"": ""InnerFailure"", + ""message"": ""Classification failed due to "", + ""target"": null}, + ""details"": null + } + ], + ""jobId"": ""7f1df17b-570b-4ae5-9cf5-fe6ff64cc712"", + ""channelReference"": ""test-abc"", + ""channelId"": ""FooVoiceChannelId"", + ""classificationPolicyId"": ""test-policy"", + ""labels"": { + ""Locale"": ""en-us"", + ""Segment"": ""Enterprise"", + ""Token"": ""FooToken"" + }, + ""tags"": { + ""Locale"": ""en-us"", + ""Segment"": ""Enterprise"", + ""Token"": ""FooToken"" + } + }, + ""type"": ""Microsoft.Communication.RouterJobClassificationFailed"", + ""specversion"": ""1.0"", + ""time"": ""2022-02-17T00:55:25.1736293Z"" + }"; + + CloudEvent[] events = CloudEvent.ParseMany(new BinaryData(requestContent)); + + Assert.NotNull(events); + events[0].TryGetSystemEventData(out object eventData); + var routerJobClassificationFailedEvent = eventData as AcsRouterJobClassificationFailedEventData; + Assert.IsNotNull(routerJobClassificationFailedEvent); + var errors = routerJobClassificationFailedEvent.Errors; + Assert.AreEqual(1, errors.Count); + Assert.AreEqual("Failure", errors[0].Code); + Assert.AreEqual("Classification failed due to ", errors[0].Message); + StringAssert.Contains("Inner Errors:", errors[0].ToString()); + } + + [Test] + public void ConsumeCloudEventAcsRouterJobQueuedEvent() + { + string requestContent = @"{ + ""id"": ""b6d8687a-5a1a-42ae-b8b5-ff7ec338c872"", + ""source"": ""/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}"", + ""subject"": ""job/{job-id}/channel/{channel-id}/queue/{queue-id}"", + ""data"": { + ""jobId"": ""7f1df17b-570b-4ae5-9cf5-fe6ff64cc712"", + ""channelReference"": ""test-abc"", + ""channelId"": ""FooVoiceChannelId"", + ""queueId"": ""625fec06-ab81-4e60-b780-f364ed96ade1"", + ""priority"": 1, + ""labels"": { + ""Locale"": ""en-us"", + ""Segment"": ""Enterprise"", + ""Token"": ""FooToken"" + }, + ""tags"": { + ""Locale"": ""en-us"", + ""Segment"": ""Enterprise"", + ""Token"": ""FooToken"" + }, + ""requestedWorkerSelectors"": [ + { + ""key"": ""string"", + ""labelOperator"": ""equal"", + ""value"": 5, + ""ttlSeconds"": 1000 + } + ], + ""attachedWorkerSelectors"": [ + { + ""key"": ""string"", + ""labelOperator"": ""equal"", + ""value"": 5, + ""ttlSeconds"": 1000 + } + ] + }, + ""type"": ""Microsoft.Communication.RouterJobQueued"", + ""specversion"": ""1.0"", + ""time"": ""2022-02-17T00:55:25.1736293Z"" + }"; + + CloudEvent[] events = CloudEvent.ParseMany(new BinaryData(requestContent)); + + Assert.NotNull(events); + events[0].TryGetSystemEventData(out object eventData); + var routerJobQueuedEventData = eventData as AcsRouterJobQueuedEventData; + Assert.IsNotNull(routerJobQueuedEventData); + var selectors = routerJobQueuedEventData.AttachedWorkerSelectors; + Assert.AreEqual(1, selectors.Count); + Assert.AreEqual(TimeSpan.FromSeconds(1000), selectors[0].TimeToLive); + Assert.AreEqual(AcsRouterLabelOperator.Equal, selectors[0].LabelOperator); + } #endregion #region Health Data Services events @@ -4120,6 +4230,45 @@ public void ConsumeCloudEventDataBoxOrderCompleted() Assert.AreEqual(DateTimeOffset.Parse("2022-10-12T19:38:08.0218897Z"), dataBoxEvent.StageTime); } #endregion + #region Resource Notifications + + [Test] public void ConsumeCloudEventHealthResourcesAvailiabilityStatusChangedEvent() + { + string requestContent = @"{ + ""id"": ""1fb6fa94-d965-4306-abeq-4810f0774e97"", + ""source"": ""/subscriptions/{subscription-id}"", + ""subject"": ""/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}"", + ""data"": { + ""resourceInfo"": { + ""id"": ""/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}/providers/Microsoft.ResourceHealth/availabilityStatuses/{event-id}"", + ""name"": ""{event-id}"", + ""type"": ""Microsoft.ResourceHealth/availabilityStatuses"", + ""properties"": { + ""targetResourceId"": ""/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}"", + ""targetResourceType"": ""Microsoft.Compute/virtualMachines"", + ""occurredTime"": ""2023-07-24T19:20:37.9245071Z"", + ""previousAvailabilityState"": ""Unavailable"", + ""availabilityState"": ""Available"" + } + }, + ""operationalInfo"": { + ""resourceEventTime"": ""2023-07-24T19:20:37.9245071Z"" + }, + ""apiVersion"": ""2023-12-01"" + }, + ""type"": ""Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged"", + ""specversion"": ""1.0"", + ""time"": ""2023-07-24T19:20:37.9245071Z"" + }"; + CloudEvent[] events = CloudEvent.ParseMany(new BinaryData(requestContent)); + + Assert.NotNull(events); + Assert.True(events[0].TryGetSystemEventData(out object eventData)); + var availabilityStatusChangedEventData = eventData as ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData; + Assert.IsNotNull(availabilityStatusChangedEventData); + Assert.AreEqual("{event-id}", availabilityStatusChangedEventData.ResourceDetails.Name); + } + #endregion #endregion } } diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/CHANGELOG.md b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/CHANGELOG.md index 876cef7563000..5732edd539b85 100644 --- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/CHANGELOG.md +++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/CHANGELOG.md @@ -10,6 +10,12 @@ ### Other Changes +## 6.0.1 (2023-10-10) + +### Bugs Fixed + +- Added support for the legacy checkpoint format when making scaling decisions. + ## 6.0.0 (2023-09-12) ### Breaking Changes diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Microsoft.Azure.WebJobs.Extensions.EventHubs.csproj b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Microsoft.Azure.WebJobs.Extensions.EventHubs.csproj index cf70369b84a35..892cf1e2362c6 100644 --- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Microsoft.Azure.WebJobs.Extensions.EventHubs.csproj +++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Microsoft.Azure.WebJobs.Extensions.EventHubs.csproj @@ -5,7 +5,7 @@ Microsoft Azure WebJobs SDK EventHubs Extension 6.1.0-beta.1 - 6.0.0 + 6.0.1 $(NoWarn);AZC0001;CS1591;SA1636 sign.snk true diff --git a/sdk/eventhub/README.md b/sdk/eventhub/README.md index 7f667ecbcbcc7..fd68f6544c162 100644 --- a/sdk/eventhub/README.md +++ b/sdk/eventhub/README.md @@ -25,8 +25,8 @@ Use the following legacy packages to publish and consume events from Event Hubs: | Nuget Package | Reference | Samples | |--------------------------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------| -| [Microsoft.Azure.EventHubs](https://www.nuget.org/packages/Microsoft.Azure.EventHubs) | [API Reference for Microsoft.Azure.EventHubs](https://docs.microsoft.com/dotnet/api/overview/azure/eventhubs/v4?view=azure-dotnet) | [Samples for Azure.Messaging.EventHubs](https://github.com/Azure/azure-event-hubs/tree/master/samples/DotNet/) | -| [Microsoft.Azure.EventHubs.Processor](https://www.nuget.org/packages/Microsoft.Azure.EventHubs.Processor) | [API Reference for Microsoft.Azure.EventHubs.Processor](https://docs.microsoft.com/dotnet/api/microsoft.azure.eventhubs.processor?view=azure-dotnet) | [Samples for Azure.Messaging.EventHubs.Processor](https://github.com/Azure/azure-event-hubs/tree/master/samples/DotNet/) | +| [Microsoft.Azure.EventHubs](https://www.nuget.org/packages/Microsoft.Azure.EventHubs) | [API Reference for Microsoft.Azure.EventHubs](https://learn.microsoft.com/dotnet/api/microsoft.azure.eventhubs?view=azure-dotnet-legacy) | [Samples for Azure.Messaging.EventHubs](https://github.com/Azure/azure-event-hubs/tree/master/samples/DotNet/) | +| [Microsoft.Azure.EventHubs.Processor](https://www.nuget.org/packages/Microsoft.Azure.EventHubs.Processor) | [API Reference for Microsoft.Azure.EventHubs.Processor](https://docs.microsoft.com/dotnet/api/microsoft.azure.eventhubs.processor?view=azure-dotnet) | [Samples for Azure.Messaging.EventHubs.Processor](https://github.com/Azure/azure-event-hubs/tree/master/samples/DotNet/) | ## Libraries for resource management diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/Azure.ResourceManager.ContainerServiceFleet.sln similarity index 89% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/Azure.ResourceManager.ContainerServiceFleet.sln index fecd2294f9aa3..1562769c99b38 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/Azure.ResourceManager.ContainerServiceFleet.sln @@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30309.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.DatabaseFleetManager", "src\Azure.ResourceManager.DatabaseFleetManager.csproj", "{848F28F3-DA60-4234-A348-872B4D46BDF2}" +Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.ContainerServiceFleet", "src\Azure.ResourceManager.ContainerServiceFleet.csproj", "{848F28F3-DA60-4234-A348-872B4D46BDF2}" EndProject -Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.DatabaseFleetManager.Tests", "tests\Azure.ResourceManager.DatabaseFleetManager.Tests.csproj", "{BAFD4CFA-48E6-4408-8054-0C62C3B2196D}" +Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.ContainerServiceFleet.Tests", "tests\Azure.ResourceManager.ContainerServiceFleet.Tests.csproj", "{BAFD4CFA-48E6-4408-8054-0C62C3B2196D}" EndProject -Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.DatabaseFleetManager.Samples", "samples\Azure.ResourceManager.DatabaseFleetManager.Samples.csproj", "{AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}" +Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.ContainerServiceFleet.Samples", "samples\Azure.ResourceManager.ContainerServiceFleet.Samples.csproj", "{AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}" EndProject Global GlobalSection(SolutionProperties) = preSolution diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md similarity index 97% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md index f440f89957b54..e41769b3da214 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md @@ -10,7 +10,7 @@ ### Other Changes -## 1.0.0-beta.1 (2023-09-26) +## 1.0.0-beta.1 (2023-10-05) ### General New Features diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Directory.Build.props b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/Directory.Build.props similarity index 100% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Directory.Build.props rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/Directory.Build.props diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/README.md b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/README.md similarity index 88% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/README.md rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/README.md index 36589e5302a9d..18ed163b9b9f0 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/README.md +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/README.md @@ -1,6 +1,6 @@ # Microsoft Azure Database Fleet Manager management client library for .NET -Azure Database Fleet Manager empowers Azure SQL customers who have adopted database scale-out to achieve more by simplifying implementation and operation. +Microsoft Azure Kubernetes Fleet Manager (Fleet) enables multi-cluster and at-scale scenarios for Azure Kubernetes Service (AKS) clusters. A Fleet resource creates a cluster that can be used to manage other member clusters. This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: @@ -14,10 +14,10 @@ This library follows the [new Azure SDK guidelines](https://azure.github.io/azur ### Install the package -Install the Microsoft Azure Fleet management library for .NET with [NuGet](https://www.nuget.org/): +Install the Microsoft Azure Kubernetes Fleet Manager management library for .NET with [NuGet](https://www.nuget.org/): ```dotnetcli -dotnet add package Azure.ResourceManager.DatabaseFleetManager --prerelease +dotnet add package Azure.ResourceManager.ContainerServiceFleet --prerelease ``` ### Prerequisites diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs new file mode 100644 index 0000000000000..2dd376155d1ff --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs @@ -0,0 +1,403 @@ +namespace Azure.ResourceManager.ContainerServiceFleet +{ + public partial class ContainerServiceFleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerServiceFleetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ContainerServiceFleetData : Azure.ResourceManager.Models.TrackedResourceData + { + public ContainerServiceFleetData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.FleetHubProfile HubProfile { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState? ProvisioningState { get { throw null; } } + } + public static partial class ContainerServiceFleetExtensions + { + public static Azure.Response GetContainerServiceFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetContainerServiceFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberResource GetContainerServiceFleetMemberResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetResource GetContainerServiceFleetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetCollection GetContainerServiceFleets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetContainerServiceFleets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetContainerServiceFleetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunResource GetContainerServiceFleetUpdateRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class ContainerServiceFleetMemberCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerServiceFleetMemberCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ContainerServiceFleetMemberData : Azure.ResourceManager.Models.ResourceData + { + public ContainerServiceFleetMemberData() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } set { } } + public Azure.ETag? ETag { get { throw null; } } + public string Group { get { throw null; } set { } } + public Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class ContainerServiceFleetMemberResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerServiceFleetMemberResource() { } + public virtual Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ContainerServiceFleetResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerServiceFleetResource() { } + public virtual Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetContainerServiceFleetMember(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetContainerServiceFleetMemberAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberCollection GetContainerServiceFleetMembers() { throw null; } + public virtual Azure.Response GetContainerServiceFleetUpdateRun(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetContainerServiceFleetUpdateRunAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunCollection GetContainerServiceFleetUpdateRuns() { throw null; } + public virtual Azure.Response GetCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ContainerServiceFleetUpdateRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerServiceFleetUpdateRunCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ContainerServiceFleetUpdateRunData : Azure.ResourceManager.Models.ResourceData + { + public ContainerServiceFleetUpdateRunData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpdate ManagedClusterUpdate { get { throw null; } set { } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunStatus Status { get { throw null; } } + public System.Collections.Generic.IList StrategyStages { get { throw null; } set { } } + } + public partial class ContainerServiceFleetUpdateRunResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerServiceFleetUpdateRunResource() { } + public virtual Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + public static partial class ArmContainerServiceFleetModelFactory + { + public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetData ContainerServiceFleetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState?), Azure.ResourceManager.ContainerServiceFleet.Models.FleetHubProfile hubProfile = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetMemberData ContainerServiceFleetMemberData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.Core.ResourceIdentifier clusterResourceId = null, string group = null, Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateGroupStatus ContainerServiceFleetUpdateGroupStatus(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable members = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetUpdateRunData ContainerServiceFleetUpdateRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState?), System.Collections.Generic.IEnumerable strategyStages = null, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpdate managedClusterUpdate = null, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunStatus status = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunStatus ContainerServiceFleetUpdateRunStatus(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus status = null, System.Collections.Generic.IEnumerable stages = null, System.Collections.Generic.IEnumerable selectedNodeImageVersions = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStageStatus ContainerServiceFleetUpdateStageStatus(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus status = null, string name = null, System.Collections.Generic.IEnumerable groups = null, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetWaitStatus afterStageWaitStatus = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus ContainerServiceFleetUpdateStatus(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState? state = default(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState?), Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetWaitStatus ContainerServiceFleetWaitStatus(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus status = null, int? waitDurationInSeconds = default(int?)) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetCredentialResult FleetCredentialResult(string name = null, byte[] value = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetCredentialResults FleetCredentialResults(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetHubProfile FleetHubProfile(string dnsPrefix = null, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetAPIServerAccessProfile apiServerAccessProfile = null, Azure.Core.ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.MemberUpdateStatus MemberUpdateStatus(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus status = null, string name = null, Azure.Core.ResourceIdentifier clusterResourceId = null, string operationId = null, string message = null) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageVersion NodeImageVersion(string version = null) { throw null; } + } + public partial class ContainerServiceFleetAPIServerAccessProfile + { + public ContainerServiceFleetAPIServerAccessProfile() { } + public bool? EnablePrivateCluster { get { throw null; } set { } } + public bool? EnableVnetIntegration { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + } + public partial class ContainerServiceFleetManagedClusterUpdate + { + public ContainerServiceFleetManagedClusterUpdate(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeSpec upgrade) { } + public Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType? SelectionType { get { throw null; } set { } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeSpec Upgrade { get { throw null; } set { } } + } + public partial class ContainerServiceFleetManagedClusterUpgradeSpec + { + public ContainerServiceFleetManagedClusterUpgradeSpec(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType upgradeType) { } + public string KubernetesVersion { get { throw null; } set { } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType UpgradeType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerServiceFleetManagedClusterUpgradeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerServiceFleetManagedClusterUpgradeType(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType Full { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType NodeImageOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetManagedClusterUpgradeType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ContainerServiceFleetMemberPatch + { + public ContainerServiceFleetMemberPatch() { } + public string Group { get { throw null; } set { } } + } + public partial class ContainerServiceFleetPatch + { + public ContainerServiceFleetPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class ContainerServiceFleetUpdateGroup + { + public ContainerServiceFleetUpdateGroup(string name) { } + public string Name { get { throw null; } set { } } + } + public partial class ContainerServiceFleetUpdateGroupStatus + { + internal ContainerServiceFleetUpdateGroupStatus() { } + public System.Collections.Generic.IReadOnlyList Members { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerServiceFleetUpdateRunProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerServiceFleetUpdateRunProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateRunProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ContainerServiceFleetUpdateRunStatus + { + internal ContainerServiceFleetUpdateRunStatus() { } + public System.Collections.Generic.IReadOnlyList SelectedNodeImageVersions { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Stages { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus Status { get { throw null; } } + } + public partial class ContainerServiceFleetUpdateStage + { + public ContainerServiceFleetUpdateStage(string name) { } + public int? AfterStageWaitInSeconds { get { throw null; } set { } } + public System.Collections.Generic.IList Groups { get { throw null; } } + public string Name { get { throw null; } set { } } + } + public partial class ContainerServiceFleetUpdateStageStatus + { + internal ContainerServiceFleetUpdateStageStatus() { } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetWaitStatus AfterStageWaitStatus { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerServiceFleetUpdateState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerServiceFleetUpdateState(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState Completed { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState Failed { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState NotStarted { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState Running { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState Skipped { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState Stopped { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState Stopping { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ContainerServiceFleetUpdateStatus + { + internal ContainerServiceFleetUpdateStatus() { } + public System.DateTimeOffset? CompletedOn { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateState? State { get { throw null; } } + } + public partial class ContainerServiceFleetWaitStatus + { + internal ContainerServiceFleetWaitStatus() { } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus Status { get { throw null; } } + public int? WaitDurationInSeconds { get { throw null; } } + } + public partial class FleetCredentialResult + { + internal FleetCredentialResult() { } + public string Name { get { throw null; } } + public byte[] Value { get { throw null; } } + } + public partial class FleetCredentialResults + { + internal FleetCredentialResults() { } + public System.Collections.Generic.IReadOnlyList Kubeconfigs { get { throw null; } } + } + public partial class FleetHubProfile + { + public FleetHubProfile() { } + public Azure.Core.ResourceIdentifier AgentSubnetId { get { throw null; } set { } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetAPIServerAccessProfile ApiServerAccessProfile { get { throw null; } set { } } + public string DnsPrefix { get { throw null; } set { } } + public string Fqdn { get { throw null; } } + public string KubernetesVersion { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FleetMemberProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FleetMemberProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState Joining { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState Leaving { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState left, Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState left, Azure.ResourceManager.ContainerServiceFleet.Models.FleetMemberProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FleetProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FleetProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState left, Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState left, Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MemberUpdateStatus + { + internal MemberUpdateStatus() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } + public string Message { get { throw null; } } + public string Name { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpdateStatus Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NodeImageSelectionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NodeImageSelectionType(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType Consistent { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType Latest { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType left, Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType left, Azure.ResourceManager.ContainerServiceFleet.Models.NodeImageSelectionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NodeImageVersion + { + internal NodeImageVersion() { } + public string Version { get { throw null; } } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/assets.json b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/assets.json similarity index 52% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/assets.json rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/assets.json index bdd6dca027d41..943fd086290bb 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/assets.json +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/assets.json @@ -1,6 +1,6 @@ { "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", - "TagPrefix": "net//Azure.ResourceManager.DatabaseFleetManager", + "TagPrefix": "net//Azure.ResourceManager.ContainerServiceFleet", "Tag": "" } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Azure.ResourceManager.ContainerServiceFleet.Samples.csproj similarity index 72% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Azure.ResourceManager.ContainerServiceFleet.Samples.csproj index fcd626b89d429..f35265e5d2471 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Azure.ResourceManager.ContainerServiceFleet.Samples.csproj @@ -5,6 +5,6 @@ - + \ No newline at end of file diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetCollection.cs similarity index 82% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetCollection.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetCollection.cs index a8b25c48a370d..9e7cde4b58307 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetCollection.cs @@ -11,13 +11,13 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.DatabaseFleetManager; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet; +using Azure.ResourceManager.ContainerServiceFleet.Models; using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.DatabaseFleetManager.Samples +namespace Azure.ResourceManager.ContainerServiceFleet.Samples { - public partial class Sample_DatabaseFleetCollection + public partial class Sample_ContainerServiceFleetCollection { // Lists the Fleet resources in a resource group. [NUnit.Framework.Test] @@ -39,15 +39,15 @@ public async Task GetAll_ListsTheFleetResourcesInAResourceGroup() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this DatabaseFleetResource - DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets(); + // get the collection of this ContainerServiceFleetResource + ContainerServiceFleetCollection collection = resourceGroupResource.GetContainerServiceFleets(); // invoke the operation and iterate over the result - await foreach (DatabaseFleetResource item in collection.GetAllAsync()) + await foreach (ContainerServiceFleetResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetData resourceData = item.Data; + ContainerServiceFleetData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -75,16 +75,16 @@ public async Task Get_GetsAFleetResource() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this DatabaseFleetResource - DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets(); + // get the collection of this ContainerServiceFleetResource + ContainerServiceFleetCollection collection = resourceGroupResource.GetContainerServiceFleets(); // invoke the operation string fleetName = "fleet1"; - DatabaseFleetResource result = await collection.GetAsync(fleetName); + ContainerServiceFleetResource result = await collection.GetAsync(fleetName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetData resourceData = result.Data; + ContainerServiceFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -109,8 +109,8 @@ public async Task Exists_GetsAFleetResource() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this DatabaseFleetResource - DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets(); + // get the collection of this ContainerServiceFleetResource + ContainerServiceFleetCollection collection = resourceGroupResource.GetContainerServiceFleets(); // invoke the operation string fleetName = "fleet1"; @@ -139,13 +139,13 @@ public async Task GetIfExists_GetsAFleetResource() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this DatabaseFleetResource - DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets(); + // get the collection of this ContainerServiceFleetResource + ContainerServiceFleetCollection collection = resourceGroupResource.GetContainerServiceFleets(); // invoke the operation string fleetName = "fleet1"; - NullableResponse response = await collection.GetIfExistsAsync(fleetName); - DatabaseFleetResource result = response.HasValue ? response.Value : null; + NullableResponse response = await collection.GetIfExistsAsync(fleetName); + ContainerServiceFleetResource result = response.HasValue ? response.Value : null; if (result == null) { @@ -155,7 +155,7 @@ public async Task GetIfExists_GetsAFleetResource() { // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetData resourceData = result.Data; + ContainerServiceFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -181,12 +181,12 @@ public async Task CreateOrUpdate_CreatesAFleetResourceWithALongRunningOperation( ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this DatabaseFleetResource - DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets(); + // get the collection of this ContainerServiceFleetResource + ContainerServiceFleetCollection collection = resourceGroupResource.GetContainerServiceFleets(); // invoke the operation string fleetName = "fleet1"; - DatabaseFleetData data = new DatabaseFleetData(new AzureLocation("East US")) + ContainerServiceFleetData data = new ContainerServiceFleetData(new AzureLocation("East US")) { HubProfile = new FleetHubProfile() { @@ -198,12 +198,12 @@ public async Task CreateOrUpdate_CreatesAFleetResourceWithALongRunningOperation( ["tier"] = "production", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetName, data); - DatabaseFleetResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetName, data); + ContainerServiceFleetResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetData resourceData = result.Data; + ContainerServiceFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberCollection.cs similarity index 61% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberCollection.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberCollection.cs index 969d9d7ac6732..bbe091175fc63 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberCollection.cs @@ -11,11 +11,11 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.ContainerServiceFleet; -namespace Azure.ResourceManager.DatabaseFleetManager.Samples +namespace Azure.ResourceManager.ContainerServiceFleet.Samples { - public partial class Sample_DatabaseFleetMemberCollection + public partial class Sample_ContainerServiceFleetMemberCollection { // Lists the members of a Fleet. [NUnit.Framework.Test] @@ -30,23 +30,23 @@ public async Task GetAll_ListsTheMembersOfAFleet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); - // get the collection of this DatabaseFleetMemberResource - DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers(); + // get the collection of this ContainerServiceFleetMemberResource + ContainerServiceFleetMemberCollection collection = containerServiceFleet.GetContainerServiceFleetMembers(); // invoke the operation and iterate over the result - await foreach (DatabaseFleetMemberResource item in collection.GetAllAsync()) + await foreach (ContainerServiceFleetMemberResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetMemberData resourceData = item.Data; + ContainerServiceFleetMemberData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -67,24 +67,24 @@ public async Task Get_GetsAFleetMemberResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); - // get the collection of this DatabaseFleetMemberResource - DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers(); + // get the collection of this ContainerServiceFleetMemberResource + ContainerServiceFleetMemberCollection collection = containerServiceFleet.GetContainerServiceFleetMembers(); // invoke the operation string fleetMemberName = "member-1"; - DatabaseFleetMemberResource result = await collection.GetAsync(fleetMemberName); + ContainerServiceFleetMemberResource result = await collection.GetAsync(fleetMemberName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetMemberData resourceData = result.Data; + ContainerServiceFleetMemberData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -102,16 +102,16 @@ public async Task Exists_GetsAFleetMemberResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); - // get the collection of this DatabaseFleetMemberResource - DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers(); + // get the collection of this ContainerServiceFleetMemberResource + ContainerServiceFleetMemberCollection collection = containerServiceFleet.GetContainerServiceFleetMembers(); // invoke the operation string fleetMemberName = "member-1"; @@ -133,21 +133,21 @@ public async Task GetIfExists_GetsAFleetMemberResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); - // get the collection of this DatabaseFleetMemberResource - DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers(); + // get the collection of this ContainerServiceFleetMemberResource + ContainerServiceFleetMemberCollection collection = containerServiceFleet.GetContainerServiceFleetMembers(); // invoke the operation string fleetMemberName = "member-1"; - NullableResponse response = await collection.GetIfExistsAsync(fleetMemberName); - DatabaseFleetMemberResource result = response.HasValue ? response.Value : null; + NullableResponse response = await collection.GetIfExistsAsync(fleetMemberName); + ContainerServiceFleetMemberResource result = response.HasValue ? response.Value : null; if (result == null) { @@ -157,7 +157,7 @@ public async Task GetIfExists_GetsAFleetMemberResource() { // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetMemberData resourceData = result.Data; + ContainerServiceFleetMemberData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -176,29 +176,29 @@ public async Task CreateOrUpdate_CreatesAFleetMemberResourceWithALongRunningOper // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); - // get the collection of this DatabaseFleetMemberResource - DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers(); + // get the collection of this ContainerServiceFleetMemberResource + ContainerServiceFleetMemberCollection collection = containerServiceFleet.GetContainerServiceFleetMembers(); // invoke the operation string fleetMemberName = "member-1"; - DatabaseFleetMemberData data = new DatabaseFleetMemberData() + ContainerServiceFleetMemberData data = new ContainerServiceFleetMemberData() { ClusterResourceId = new ResourceIdentifier("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"), }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetMemberName, data); - DatabaseFleetMemberResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetMemberName, data); + ContainerServiceFleetMemberResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetMemberData resourceData = result.Data; + ContainerServiceFleetMemberData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberResource.cs similarity index 62% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberResource.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberResource.cs index ba2d23068ac14..3e0968830928a 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetMemberResource.cs @@ -11,12 +11,12 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.DatabaseFleetManager; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet; +using Azure.ResourceManager.ContainerServiceFleet.Models; -namespace Azure.ResourceManager.DatabaseFleetManager.Samples +namespace Azure.ResourceManager.ContainerServiceFleet.Samples { - public partial class Sample_DatabaseFleetMemberResource + public partial class Sample_ContainerServiceFleetMemberResource { // Gets a FleetMember resource. [NUnit.Framework.Test] @@ -31,21 +31,21 @@ public async Task Get_GetsAFleetMemberResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetMemberResource created on azure - // for more information of creating DatabaseFleetMemberResource, please refer to the document of DatabaseFleetMemberResource + // this example assumes you already have this ContainerServiceFleetMemberResource created on azure + // for more information of creating ContainerServiceFleetMemberResource, please refer to the document of ContainerServiceFleetMemberResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string fleetMemberName = "member-1"; - ResourceIdentifier databaseFleetMemberResourceId = DatabaseFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); - DatabaseFleetMemberResource databaseFleetMember = client.GetDatabaseFleetMemberResource(databaseFleetMemberResourceId); + ResourceIdentifier containerServiceFleetMemberResourceId = ContainerServiceFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + ContainerServiceFleetMemberResource containerServiceFleetMember = client.GetContainerServiceFleetMemberResource(containerServiceFleetMemberResourceId); // invoke the operation - DatabaseFleetMemberResource result = await databaseFleetMember.GetAsync(); + ContainerServiceFleetMemberResource result = await containerServiceFleetMember.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetMemberData resourceData = result.Data; + ContainerServiceFleetMemberData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -63,26 +63,26 @@ public async Task Update_UpdatesAFleetMemberResourceSynchronously() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetMemberResource created on azure - // for more information of creating DatabaseFleetMemberResource, please refer to the document of DatabaseFleetMemberResource + // this example assumes you already have this ContainerServiceFleetMemberResource created on azure + // for more information of creating ContainerServiceFleetMemberResource, please refer to the document of ContainerServiceFleetMemberResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string fleetMemberName = "member-1"; - ResourceIdentifier databaseFleetMemberResourceId = DatabaseFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); - DatabaseFleetMemberResource databaseFleetMember = client.GetDatabaseFleetMemberResource(databaseFleetMemberResourceId); + ResourceIdentifier containerServiceFleetMemberResourceId = ContainerServiceFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + ContainerServiceFleetMemberResource containerServiceFleetMember = client.GetContainerServiceFleetMemberResource(containerServiceFleetMemberResourceId); // invoke the operation - DatabaseFleetMemberPatch patch = new DatabaseFleetMemberPatch() + ContainerServiceFleetMemberPatch patch = new ContainerServiceFleetMemberPatch() { Group = "staging", }; - ArmOperation lro = await databaseFleetMember.UpdateAsync(WaitUntil.Completed, patch); - DatabaseFleetMemberResource result = lro.Value; + ArmOperation lro = await containerServiceFleetMember.UpdateAsync(WaitUntil.Completed, patch); + ContainerServiceFleetMemberResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetMemberData resourceData = result.Data; + ContainerServiceFleetMemberData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -100,17 +100,17 @@ public async Task Delete_DeletesAFleetMemberResourceAsynchronouslyWithALongRunni // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetMemberResource created on azure - // for more information of creating DatabaseFleetMemberResource, please refer to the document of DatabaseFleetMemberResource + // this example assumes you already have this ContainerServiceFleetMemberResource created on azure + // for more information of creating ContainerServiceFleetMemberResource, please refer to the document of ContainerServiceFleetMemberResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string fleetMemberName = "member-1"; - ResourceIdentifier databaseFleetMemberResourceId = DatabaseFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); - DatabaseFleetMemberResource databaseFleetMember = client.GetDatabaseFleetMemberResource(databaseFleetMemberResourceId); + ResourceIdentifier containerServiceFleetMemberResourceId = ContainerServiceFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName); + ContainerServiceFleetMemberResource containerServiceFleetMember = client.GetContainerServiceFleetMemberResource(containerServiceFleetMemberResourceId); // invoke the operation - await databaseFleetMember.DeleteAsync(WaitUntil.Completed); + await containerServiceFleetMember.DeleteAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetResource.cs similarity index 68% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetResource.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetResource.cs index e1fb1cf53f648..b6ebe86224cd6 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetResource.cs @@ -11,18 +11,18 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.DatabaseFleetManager; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet; +using Azure.ResourceManager.ContainerServiceFleet.Models; using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.DatabaseFleetManager.Samples +namespace Azure.ResourceManager.ContainerServiceFleet.Samples { - public partial class Sample_DatabaseFleetResource + public partial class Sample_ContainerServiceFleetResource { // Lists the Fleet resources in a subscription. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetDatabaseFleets_ListsTheFleetResourcesInASubscription() + public async Task GetContainerServiceFleets_ListsTheFleetResourcesInASubscription() { // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListBySub.json // this example is just showing the usage of "Fleets_ListBySubscription" operation, for the dependent resources, they will have to be created separately. @@ -39,11 +39,11 @@ public async Task GetDatabaseFleets_ListsTheFleetResourcesInASubscription() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (DatabaseFleetResource item in subscriptionResource.GetDatabaseFleetsAsync()) + await foreach (ContainerServiceFleetResource item in subscriptionResource.GetContainerServiceFleetsAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetData resourceData = item.Data; + ContainerServiceFleetData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -64,20 +64,20 @@ public async Task Get_GetsAFleetResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); // invoke the operation - DatabaseFleetResource result = await databaseFleet.GetAsync(); + ContainerServiceFleetResource result = await containerServiceFleet.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetData resourceData = result.Data; + ContainerServiceFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -95,16 +95,16 @@ public async Task Update_UpdateAFleet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); // invoke the operation - DatabaseFleetPatch patch = new DatabaseFleetPatch() + ContainerServiceFleetPatch patch = new ContainerServiceFleetPatch() { Tags = { @@ -113,12 +113,12 @@ public async Task Update_UpdateAFleet() }, }; string ifMatch = "dfjkwelr7384"; - ArmOperation lro = await databaseFleet.UpdateAsync(WaitUntil.Completed, patch, ifMatch: ifMatch); - DatabaseFleetResource result = lro.Value; + ArmOperation lro = await containerServiceFleet.UpdateAsync(WaitUntil.Completed, patch, ifMatch: ifMatch); + ContainerServiceFleetResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetData resourceData = result.Data; + ContainerServiceFleetData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -136,16 +136,16 @@ public async Task Delete_DeletesAFleetResourceAsynchronouslyWithALongRunningOper // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); // invoke the operation - await databaseFleet.DeleteAsync(WaitUntil.Completed); + await containerServiceFleet.DeleteAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded"); } @@ -163,16 +163,16 @@ public async Task GetCredentials_ListsTheUserCredentialsOfAFleet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); // invoke the operation - FleetCredentialResults result = await databaseFleet.GetCredentialsAsync(); + FleetCredentialResults result = await containerServiceFleet.GetCredentialsAsync(); Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunCollection.cs similarity index 60% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunCollection.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunCollection.cs index ccd8df59dd7ba..2980d398ed974 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunCollection.cs @@ -11,12 +11,12 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.DatabaseFleetManager; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet; +using Azure.ResourceManager.ContainerServiceFleet.Models; -namespace Azure.ResourceManager.DatabaseFleetManager.Samples +namespace Azure.ResourceManager.ContainerServiceFleet.Samples { - public partial class Sample_DatabaseFleetUpdateRunCollection + public partial class Sample_ContainerServiceFleetUpdateRunCollection { // Lists the UpdateRun resources by fleet. [NUnit.Framework.Test] @@ -31,23 +31,23 @@ public async Task GetAll_ListsTheUpdateRunResourcesByFleet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); - // get the collection of this DatabaseFleetUpdateRunResource - DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns(); + // get the collection of this ContainerServiceFleetUpdateRunResource + ContainerServiceFleetUpdateRunCollection collection = containerServiceFleet.GetContainerServiceFleetUpdateRuns(); // invoke the operation and iterate over the result - await foreach (DatabaseFleetUpdateRunResource item in collection.GetAllAsync()) + await foreach (ContainerServiceFleetUpdateRunResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetUpdateRunData resourceData = item.Data; + ContainerServiceFleetUpdateRunData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -68,24 +68,24 @@ public async Task Get_GetsAnUpdateRunResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); - // get the collection of this DatabaseFleetUpdateRunResource - DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns(); + // get the collection of this ContainerServiceFleetUpdateRunResource + ContainerServiceFleetUpdateRunCollection collection = containerServiceFleet.GetContainerServiceFleetUpdateRuns(); // invoke the operation string updateRunName = "run1"; - DatabaseFleetUpdateRunResource result = await collection.GetAsync(updateRunName); + ContainerServiceFleetUpdateRunResource result = await collection.GetAsync(updateRunName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetUpdateRunData resourceData = result.Data; + ContainerServiceFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -103,16 +103,16 @@ public async Task Exists_GetsAnUpdateRunResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); - // get the collection of this DatabaseFleetUpdateRunResource - DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns(); + // get the collection of this ContainerServiceFleetUpdateRunResource + ContainerServiceFleetUpdateRunCollection collection = containerServiceFleet.GetContainerServiceFleetUpdateRuns(); // invoke the operation string updateRunName = "run1"; @@ -134,21 +134,21 @@ public async Task GetIfExists_GetsAnUpdateRunResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); - // get the collection of this DatabaseFleetUpdateRunResource - DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns(); + // get the collection of this ContainerServiceFleetUpdateRunResource + ContainerServiceFleetUpdateRunCollection collection = containerServiceFleet.GetContainerServiceFleetUpdateRuns(); // invoke the operation string updateRunName = "run1"; - NullableResponse response = await collection.GetIfExistsAsync(updateRunName); - DatabaseFleetUpdateRunResource result = response.HasValue ? response.Value : null; + NullableResponse response = await collection.GetIfExistsAsync(updateRunName); + ContainerServiceFleetUpdateRunResource result = response.HasValue ? response.Value : null; if (result == null) { @@ -158,7 +158,7 @@ public async Task GetIfExists_GetsAnUpdateRunResource() { // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetUpdateRunData resourceData = result.Data; + ContainerServiceFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -177,33 +177,33 @@ public async Task CreateOrUpdate_CreateAnUpdateRun() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetResource created on azure - // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource + // this example assumes you already have this ContainerServiceFleetResource created on azure + // for more information of creating ContainerServiceFleetResource, please refer to the document of ContainerServiceFleetResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; - ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); - DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId); + ResourceIdentifier containerServiceFleetResourceId = ContainerServiceFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + ContainerServiceFleetResource containerServiceFleet = client.GetContainerServiceFleetResource(containerServiceFleetResourceId); - // get the collection of this DatabaseFleetUpdateRunResource - DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns(); + // get the collection of this ContainerServiceFleetUpdateRunResource + ContainerServiceFleetUpdateRunCollection collection = containerServiceFleet.GetContainerServiceFleetUpdateRuns(); // invoke the operation string updateRunName = "run1"; - DatabaseFleetUpdateRunData data = new DatabaseFleetUpdateRunData() + ContainerServiceFleetUpdateRunData data = new ContainerServiceFleetUpdateRunData() { StrategyStages = { -new FleetUpdateStage("stage1") +new ContainerServiceFleetUpdateStage("stage1") { Groups = { -new FleetUpdateGroup("group-a") +new ContainerServiceFleetUpdateGroup("group-a") }, AfterStageWaitInSeconds = 3600, } }, - ManagedClusterUpdate = new FleetManagedClusterUpdate(new FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType.Full) + ManagedClusterUpdate = new ContainerServiceFleetManagedClusterUpdate(new ContainerServiceFleetManagedClusterUpgradeSpec(ContainerServiceFleetManagedClusterUpgradeType.Full) { KubernetesVersion = "1.26.1", }) @@ -211,12 +211,12 @@ public async Task CreateOrUpdate_CreateAnUpdateRun() SelectionType = NodeImageSelectionType.Latest, }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, updateRunName, data); - DatabaseFleetUpdateRunResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, updateRunName, data); + ContainerServiceFleetUpdateRunResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetUpdateRunData resourceData = result.Data; + ContainerServiceFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs similarity index 60% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunResource.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs index bbbad88a501a6..798502c128aa3 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs @@ -11,12 +11,12 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager; -using Azure.ResourceManager.DatabaseFleetManager; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet; +using Azure.ResourceManager.ContainerServiceFleet.Models; -namespace Azure.ResourceManager.DatabaseFleetManager.Samples +namespace Azure.ResourceManager.ContainerServiceFleet.Samples { - public partial class Sample_DatabaseFleetUpdateRunResource + public partial class Sample_ContainerServiceFleetUpdateRunResource { // Gets an UpdateRun resource. [NUnit.Framework.Test] @@ -31,21 +31,21 @@ public async Task Get_GetsAnUpdateRunResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure - // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource + // this example assumes you already have this ContainerServiceFleetUpdateRunResource created on azure + // for more information of creating ContainerServiceFleetUpdateRunResource, please refer to the document of ContainerServiceFleetUpdateRunResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string updateRunName = "run1"; - ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); - DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId); + ResourceIdentifier containerServiceFleetUpdateRunResourceId = ContainerServiceFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + ContainerServiceFleetUpdateRunResource containerServiceFleetUpdateRun = client.GetContainerServiceFleetUpdateRunResource(containerServiceFleetUpdateRunResourceId); // invoke the operation - DatabaseFleetUpdateRunResource result = await databaseFleetUpdateRun.GetAsync(); + ContainerServiceFleetUpdateRunResource result = await containerServiceFleetUpdateRun.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetUpdateRunData resourceData = result.Data; + ContainerServiceFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -63,30 +63,30 @@ public async Task Update_CreateAnUpdateRun() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure - // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource + // this example assumes you already have this ContainerServiceFleetUpdateRunResource created on azure + // for more information of creating ContainerServiceFleetUpdateRunResource, please refer to the document of ContainerServiceFleetUpdateRunResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string updateRunName = "run1"; - ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); - DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId); + ResourceIdentifier containerServiceFleetUpdateRunResourceId = ContainerServiceFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + ContainerServiceFleetUpdateRunResource containerServiceFleetUpdateRun = client.GetContainerServiceFleetUpdateRunResource(containerServiceFleetUpdateRunResourceId); // invoke the operation - DatabaseFleetUpdateRunData data = new DatabaseFleetUpdateRunData() + ContainerServiceFleetUpdateRunData data = new ContainerServiceFleetUpdateRunData() { StrategyStages = { -new FleetUpdateStage("stage1") +new ContainerServiceFleetUpdateStage("stage1") { Groups = { -new FleetUpdateGroup("group-a") +new ContainerServiceFleetUpdateGroup("group-a") }, AfterStageWaitInSeconds = 3600, } }, - ManagedClusterUpdate = new FleetManagedClusterUpdate(new FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType.Full) + ManagedClusterUpdate = new ContainerServiceFleetManagedClusterUpdate(new ContainerServiceFleetManagedClusterUpgradeSpec(ContainerServiceFleetManagedClusterUpgradeType.Full) { KubernetesVersion = "1.26.1", }) @@ -94,12 +94,12 @@ public async Task Update_CreateAnUpdateRun() SelectionType = NodeImageSelectionType.Latest, }, }; - ArmOperation lro = await databaseFleetUpdateRun.UpdateAsync(WaitUntil.Completed, data); - DatabaseFleetUpdateRunResource result = lro.Value; + ArmOperation lro = await containerServiceFleetUpdateRun.UpdateAsync(WaitUntil.Completed, data); + ContainerServiceFleetUpdateRunResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetUpdateRunData resourceData = result.Data; + ContainerServiceFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -117,17 +117,17 @@ public async Task Delete_DeleteAnUpdateRunResource() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure - // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource + // this example assumes you already have this ContainerServiceFleetUpdateRunResource created on azure + // for more information of creating ContainerServiceFleetUpdateRunResource, please refer to the document of ContainerServiceFleetUpdateRunResource string subscriptionId = "subid1"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string updateRunName = "run1"; - ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); - DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId); + ResourceIdentifier containerServiceFleetUpdateRunResourceId = ContainerServiceFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + ContainerServiceFleetUpdateRunResource containerServiceFleetUpdateRun = client.GetContainerServiceFleetUpdateRunResource(containerServiceFleetUpdateRunResourceId); // invoke the operation - await databaseFleetUpdateRun.DeleteAsync(WaitUntil.Completed); + await containerServiceFleetUpdateRun.DeleteAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded"); } @@ -145,22 +145,22 @@ public async Task Start_StartsAnUpdateRun() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure - // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource + // this example assumes you already have this ContainerServiceFleetUpdateRunResource created on azure + // for more information of creating ContainerServiceFleetUpdateRunResource, please refer to the document of ContainerServiceFleetUpdateRunResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string updateRunName = "run1"; - ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); - DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId); + ResourceIdentifier containerServiceFleetUpdateRunResourceId = ContainerServiceFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + ContainerServiceFleetUpdateRunResource containerServiceFleetUpdateRun = client.GetContainerServiceFleetUpdateRunResource(containerServiceFleetUpdateRunResourceId); // invoke the operation - ArmOperation lro = await databaseFleetUpdateRun.StartAsync(WaitUntil.Completed); - DatabaseFleetUpdateRunResource result = lro.Value; + ArmOperation lro = await containerServiceFleetUpdateRun.StartAsync(WaitUntil.Completed); + ContainerServiceFleetUpdateRunResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetUpdateRunData resourceData = result.Data; + ContainerServiceFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -178,22 +178,22 @@ public async Task Stop_StopsAnUpdateRun() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure - // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource + // this example assumes you already have this ContainerServiceFleetUpdateRunResource created on azure + // for more information of creating ContainerServiceFleetUpdateRunResource, please refer to the document of ContainerServiceFleetUpdateRunResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rg1"; string fleetName = "fleet1"; string updateRunName = "run1"; - ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); - DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId); + ResourceIdentifier containerServiceFleetUpdateRunResourceId = ContainerServiceFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName); + ContainerServiceFleetUpdateRunResource containerServiceFleetUpdateRun = client.GetContainerServiceFleetUpdateRunResource(containerServiceFleetUpdateRunResourceId); // invoke the operation - ArmOperation lro = await databaseFleetUpdateRun.StopAsync(WaitUntil.Completed); - DatabaseFleetUpdateRunResource result = lro.Value; + ArmOperation lro = await containerServiceFleetUpdateRun.StopAsync(WaitUntil.Completed); + ContainerServiceFleetUpdateRunResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatabaseFleetUpdateRunData resourceData = result.Data; + ContainerServiceFleetUpdateRunData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Azure.ResourceManager.ContainerServiceFleet.csproj similarity index 67% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Azure.ResourceManager.ContainerServiceFleet.csproj index f6667ceaeac5f..fc7351fdf7d72 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Azure.ResourceManager.ContainerServiceFleet.csproj @@ -1,8 +1,8 @@ 1.0.0-beta.2 - Azure.ResourceManager.DatabaseFleetManager - Azure Resource Manager client SDK for Azure resource provider Database Fleet Manager. + Azure.ResourceManager.ContainerServiceFleet + Azure Resource Manager client SDK for Azure resource provider Container Service Fleet. azure;management;arm;resource manager;fleet diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs similarity index 58% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs index ddff9724c1a7c..14a60b4ceba9d 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs @@ -10,15 +10,15 @@ using System.Linq; using Azure; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.ContainerServiceFleet; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// Model factory for models. - public static partial class ArmDatabaseFleetManagerModelFactory + public static partial class ArmContainerServiceFleetModelFactory { - /// Initializes a new instance of DatabaseFleetData. + /// Initializes a new instance of ContainerServiceFleetData. /// The id. /// The name. /// The resourceType. @@ -29,12 +29,12 @@ public static partial class ArmDatabaseFleetManagerModelFactory /// Managed identity. /// The status of the last operation. /// The FleetHubProfile configures the Fleet's hub. - /// A new instance for mocking. - public static DatabaseFleetData DatabaseFleetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? eTag = null, ManagedServiceIdentity identity = null, FleetProvisioningState? provisioningState = null, FleetHubProfile hubProfile = null) + /// A new instance for mocking. + public static ContainerServiceFleetData ContainerServiceFleetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? eTag = null, ManagedServiceIdentity identity = null, FleetProvisioningState? provisioningState = null, FleetHubProfile hubProfile = null) { tags ??= new Dictionary(); - return new DatabaseFleetData(id, name, resourceType, systemData, tags, location, eTag, identity, provisioningState, hubProfile); + return new ContainerServiceFleetData(id, name, resourceType, systemData, tags, location, eTag, identity, provisioningState, hubProfile); } /// Initializes a new instance of FleetHubProfile. @@ -44,9 +44,9 @@ public static DatabaseFleetData DatabaseFleetData(ResourceIdentifier id = null, /// The FQDN of the Fleet hub. /// The Kubernetes version of the Fleet hub. /// A new instance for mocking. - public static FleetHubProfile FleetHubProfile(string dnsPrefix = null, FleetApiServerAccessProfile apiServerAccessProfile = null, ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) + public static FleetHubProfile FleetHubProfile(string dnsPrefix = null, ContainerServiceFleetAPIServerAccessProfile apiServerAccessProfile = null, ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) { - return new FleetHubProfile(dnsPrefix, apiServerAccessProfile, agentSubnetId != null ? new FleetAgentProfile(agentSubnetId) : null, fqdn, kubernetesVersion); + return new FleetHubProfile(dnsPrefix, apiServerAccessProfile, agentSubnetId != null ? new ContainerServiceFleetAgentProfile(agentSubnetId) : null, fqdn, kubernetesVersion); } /// Initializes a new instance of FleetCredentialResults. @@ -68,7 +68,7 @@ public static FleetCredentialResult FleetCredentialResult(string name = null, by return new FleetCredentialResult(name, value); } - /// Initializes a new instance of DatabaseFleetMemberData. + /// Initializes a new instance of ContainerServiceFleetMemberData. /// The id. /// The name. /// The resourceType. @@ -77,13 +77,13 @@ public static FleetCredentialResult FleetCredentialResult(string name = null, by /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. /// The group this member belongs to for multi-cluster update management. /// The status of the last operation. - /// A new instance for mocking. - public static DatabaseFleetMemberData DatabaseFleetMemberData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, ResourceIdentifier clusterResourceId = null, string group = null, FleetMemberProvisioningState? provisioningState = null) + /// A new instance for mocking. + public static ContainerServiceFleetMemberData ContainerServiceFleetMemberData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, ResourceIdentifier clusterResourceId = null, string group = null, FleetMemberProvisioningState? provisioningState = null) { - return new DatabaseFleetMemberData(id, name, resourceType, systemData, eTag, clusterResourceId, group, provisioningState); + return new ContainerServiceFleetMemberData(id, name, resourceType, systemData, eTag, clusterResourceId, group, provisioningState); } - /// Initializes a new instance of DatabaseFleetUpdateRunData. + /// Initializes a new instance of ContainerServiceFleetUpdateRunData. /// The id. /// The name. /// The resourceType. @@ -97,61 +97,61 @@ public static DatabaseFleetMemberData DatabaseFleetMemberData(ResourceIdentifier /// /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. /// The status of the UpdateRun. - /// A new instance for mocking. - public static DatabaseFleetUpdateRunData DatabaseFleetUpdateRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, FleetUpdateRunProvisioningState? provisioningState = null, IEnumerable strategyStages = null, FleetManagedClusterUpdate managedClusterUpdate = null, FleetUpdateRunStatus status = null) + /// A new instance for mocking. + public static ContainerServiceFleetUpdateRunData ContainerServiceFleetUpdateRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, ContainerServiceFleetUpdateRunProvisioningState? provisioningState = null, IEnumerable strategyStages = null, ContainerServiceFleetManagedClusterUpdate managedClusterUpdate = null, ContainerServiceFleetUpdateRunStatus status = null) { - strategyStages ??= new List(); + strategyStages ??= new List(); - return new DatabaseFleetUpdateRunData(id, name, resourceType, systemData, eTag, provisioningState, strategyStages != null ? new FleetUpdateRunStrategy(strategyStages?.ToList()) : null, managedClusterUpdate, status); + return new ContainerServiceFleetUpdateRunData(id, name, resourceType, systemData, eTag, provisioningState, strategyStages != null ? new ContainerServiceFleetUpdateRunStrategy(strategyStages?.ToList()) : null, managedClusterUpdate, status); } - /// Initializes a new instance of FleetUpdateRunStatus. + /// Initializes a new instance of ContainerServiceFleetUpdateRunStatus. /// The status of the UpdateRun. /// The stages composing an update run. Stages are run sequentially withing an UpdateRun. /// The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is `Consistent`. - /// A new instance for mocking. - public static FleetUpdateRunStatus FleetUpdateRunStatus(FleetUpdateOperationStatus status = null, IEnumerable stages = null, IEnumerable selectedNodeImageVersions = null) + /// A new instance for mocking. + public static ContainerServiceFleetUpdateRunStatus ContainerServiceFleetUpdateRunStatus(ContainerServiceFleetUpdateStatus status = null, IEnumerable stages = null, IEnumerable selectedNodeImageVersions = null) { - stages ??= new List(); + stages ??= new List(); selectedNodeImageVersions ??= new List(); - return new FleetUpdateRunStatus(status, stages?.ToList(), selectedNodeImageVersions != null ? new NodeImageSelectionStatus(selectedNodeImageVersions?.ToList()) : null); + return new ContainerServiceFleetUpdateRunStatus(status, stages?.ToList(), selectedNodeImageVersions != null ? new NodeImageSelectionStatus(selectedNodeImageVersions?.ToList()) : null); } - /// Initializes a new instance of FleetUpdateOperationStatus. + /// Initializes a new instance of ContainerServiceFleetUpdateStatus. /// The time the operation or group was started. /// The time the operation or group was completed. /// The State of the operation or group. /// The error details when a failure is encountered. - /// A new instance for mocking. - public static FleetUpdateOperationStatus FleetUpdateOperationStatus(DateTimeOffset? startOn = null, DateTimeOffset? completedOn = null, FleetUpdateState? state = null, ResponseError error = null) + /// A new instance for mocking. + public static ContainerServiceFleetUpdateStatus ContainerServiceFleetUpdateStatus(DateTimeOffset? startOn = null, DateTimeOffset? completedOn = null, ContainerServiceFleetUpdateState? state = null, ResponseError error = null) { - return new FleetUpdateOperationStatus(startOn, completedOn, state, error); + return new ContainerServiceFleetUpdateStatus(startOn, completedOn, state, error); } - /// Initializes a new instance of FleetUpdateStageStatus. + /// Initializes a new instance of ContainerServiceFleetUpdateStageStatus. /// The status of the UpdateStage. /// The name of the UpdateStage. /// The list of groups to be updated as part of this UpdateStage. /// The status of the wait period configured on the UpdateStage. - /// A new instance for mocking. - public static FleetUpdateStageStatus FleetUpdateStageStatus(FleetUpdateOperationStatus status = null, string name = null, IEnumerable groups = null, FleetWaitStatus afterStageWaitStatus = null) + /// A new instance for mocking. + public static ContainerServiceFleetUpdateStageStatus ContainerServiceFleetUpdateStageStatus(ContainerServiceFleetUpdateStatus status = null, string name = null, IEnumerable groups = null, ContainerServiceFleetWaitStatus afterStageWaitStatus = null) { - groups ??= new List(); + groups ??= new List(); - return new FleetUpdateStageStatus(status, name, groups?.ToList(), afterStageWaitStatus); + return new ContainerServiceFleetUpdateStageStatus(status, name, groups?.ToList(), afterStageWaitStatus); } - /// Initializes a new instance of FleetUpdateGroupStatus. + /// Initializes a new instance of ContainerServiceFleetUpdateGroupStatus. /// The status of the UpdateGroup. /// The name of the UpdateGroup. /// The list of member this UpdateGroup updates. - /// A new instance for mocking. - public static FleetUpdateGroupStatus FleetUpdateGroupStatus(FleetUpdateOperationStatus status = null, string name = null, IEnumerable members = null) + /// A new instance for mocking. + public static ContainerServiceFleetUpdateGroupStatus ContainerServiceFleetUpdateGroupStatus(ContainerServiceFleetUpdateStatus status = null, string name = null, IEnumerable members = null) { members ??= new List(); - return new FleetUpdateGroupStatus(status, name, members?.ToList()); + return new ContainerServiceFleetUpdateGroupStatus(status, name, members?.ToList()); } /// Initializes a new instance of MemberUpdateStatus. @@ -161,18 +161,18 @@ public static FleetUpdateGroupStatus FleetUpdateGroupStatus(FleetUpdateOperation /// The operation resource id of the latest attempt to perform the operation. /// The status message after processing the member update operation. /// A new instance for mocking. - public static MemberUpdateStatus MemberUpdateStatus(FleetUpdateOperationStatus status = null, string name = null, ResourceIdentifier clusterResourceId = null, string operationId = null, string message = null) + public static MemberUpdateStatus MemberUpdateStatus(ContainerServiceFleetUpdateStatus status = null, string name = null, ResourceIdentifier clusterResourceId = null, string operationId = null, string message = null) { return new MemberUpdateStatus(status, name, clusterResourceId, operationId, message); } - /// Initializes a new instance of FleetWaitStatus. + /// Initializes a new instance of ContainerServiceFleetWaitStatus. /// The status of the wait duration. /// The wait duration configured in seconds. - /// A new instance for mocking. - public static FleetWaitStatus FleetWaitStatus(FleetUpdateOperationStatus status = null, int? waitDurationInSeconds = null) + /// A new instance for mocking. + public static ContainerServiceFleetWaitStatus ContainerServiceFleetWaitStatus(ContainerServiceFleetUpdateStatus status = null, int? waitDurationInSeconds = null) { - return new FleetWaitStatus(status, waitDurationInSeconds); + return new ContainerServiceFleetWaitStatus(status, waitDurationInSeconds); } /// Initializes a new instance of NodeImageVersion. diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetCollection.cs similarity index 64% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetCollection.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetCollection.cs index c768823488c51..47465e33c6e66 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetCollection.cs @@ -18,31 +18,31 @@ using Azure.ResourceManager; using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDatabaseFleets method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetContainerServiceFleets method from an instance of . /// - public partial class DatabaseFleetCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class ContainerServiceFleetCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _databaseFleetFleetsClientDiagnostics; - private readonly FleetsRestOperations _databaseFleetFleetsRestClient; + private readonly ClientDiagnostics _containerServiceFleetFleetsClientDiagnostics; + private readonly FleetsRestOperations _containerServiceFleetFleetsRestClient; - /// Initializes a new instance of the class for mocking. - protected DatabaseFleetCollection() + /// Initializes a new instance of the class for mocking. + protected ContainerServiceFleetCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal DatabaseFleetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal ContainerServiceFleetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _databaseFleetFleetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DatabaseFleetResource.ResourceType, out string databaseFleetFleetsApiVersion); - _databaseFleetFleetsRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetFleetsApiVersion); + _containerServiceFleetFleetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerServiceFleet", ContainerServiceFleetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerServiceFleetResource.ResourceType, out string containerServiceFleetFleetsApiVersion); + _containerServiceFleetFleetsRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerServiceFleetFleetsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -75,17 +75,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fleetName, DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fleetName, ContainerServiceFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.CreateOrUpdate"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _databaseFleetFleetsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _containerServiceFleetFleetsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -118,17 +118,17 @@ public virtual async Task> CreateOrUpdateAsy /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fleetName, DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fleetName, ContainerServiceFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.CreateOrUpdate"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetCollection.CreateOrUpdate"); scope.Start(); try { - var response = _databaseFleetFleetsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _containerServiceFleetFleetsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -157,18 +157,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string fleetName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Get"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetCollection.Get"); scope.Start(); try { - var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -194,18 +194,18 @@ public virtual async Task> GetAsync(string fleet /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string fleetName, CancellationToken cancellationToken = default) + public virtual Response Get(string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Get"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetCollection.Get"); scope.Start(); try { - var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken); + var response = _containerServiceFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -228,12 +228,12 @@ public virtual Response Get(string fleetName, Cancellatio /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetFleetsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetFleetsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), _databaseFleetFleetsClientDiagnostics, Pipeline, "DatabaseFleetCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerServiceFleetFleetsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerServiceFleetFleetsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerServiceFleetResource(Client, ContainerServiceFleetData.DeserializeContainerServiceFleetData(e)), _containerServiceFleetFleetsClientDiagnostics, Pipeline, "ContainerServiceFleetCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -250,12 +250,12 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetFleetsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetFleetsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), _databaseFleetFleetsClientDiagnostics, Pipeline, "DatabaseFleetCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerServiceFleetFleetsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerServiceFleetFleetsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerServiceFleetResource(Client, ContainerServiceFleetData.DeserializeContainerServiceFleetData(e)), _containerServiceFleetFleetsClientDiagnostics, Pipeline, "ContainerServiceFleetCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -279,11 +279,11 @@ public virtual async Task> ExistsAsync(string fleetName, Cancella { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Exists"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetCollection.Exists"); scope.Start(); try { - var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -314,11 +314,11 @@ public virtual Response Exists(string fleetName, CancellationToken cancell { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Exists"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetCollection.Exists"); scope.Start(); try { - var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); + var response = _containerServiceFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -345,18 +345,18 @@ public virtual Response Exists(string fleetName, CancellationToken cancell /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string fleetName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.GetIfExists"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetCollection.GetIfExists"); scope.Start(); try { - var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -382,18 +382,18 @@ public virtual async Task> GetIfExistsAs /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string fleetName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.GetIfExists"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetCollection.GetIfExists"); scope.Start(); try { - var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); + var response = _containerServiceFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -402,7 +402,7 @@ public virtual NullableResponse GetIfExists(string fleetN } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -412,7 +412,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetData.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.cs similarity index 72% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetData.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.cs index cebab4756eebb..f00fc6b90fac9 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetData.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetData.cs @@ -8,24 +8,24 @@ using System.Collections.Generic; using Azure; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// - /// A class representing the DatabaseFleet data model. + /// A class representing the ContainerServiceFleet data model. /// The Fleet resource. /// - public partial class DatabaseFleetData : TrackedResourceData + public partial class ContainerServiceFleetData : TrackedResourceData { - /// Initializes a new instance of DatabaseFleetData. + /// Initializes a new instance of ContainerServiceFleetData. /// The location. - public DatabaseFleetData(AzureLocation location) : base(location) + public ContainerServiceFleetData(AzureLocation location) : base(location) { } - /// Initializes a new instance of DatabaseFleetData. + /// Initializes a new instance of ContainerServiceFleetData. /// The id. /// The name. /// The resourceType. @@ -36,7 +36,7 @@ public DatabaseFleetData(AzureLocation location) : base(location) /// Managed identity. /// The status of the last operation. /// The FleetHubProfile configures the Fleet's hub. - internal DatabaseFleetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? eTag, ManagedServiceIdentity identity, FleetProvisioningState? provisioningState, FleetHubProfile hubProfile) : base(id, name, resourceType, systemData, tags, location) + internal ContainerServiceFleetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? eTag, ManagedServiceIdentity identity, FleetProvisioningState? provisioningState, FleetHubProfile hubProfile) : base(id, name, resourceType, systemData, tags, location) { ETag = eTag; Identity = identity; diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberCollection.cs similarity index 62% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberCollection.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberCollection.cs index d764da53c978b..97575951d96fd 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberCollection.cs @@ -17,31 +17,31 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDatabaseFleetMembers method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetContainerServiceFleetMembers method from an instance of . /// - public partial class DatabaseFleetMemberCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class ContainerServiceFleetMemberCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _databaseFleetMemberFleetMembersClientDiagnostics; - private readonly FleetMembersRestOperations _databaseFleetMemberFleetMembersRestClient; + private readonly ClientDiagnostics _containerServiceFleetMemberFleetMembersClientDiagnostics; + private readonly FleetMembersRestOperations _containerServiceFleetMemberFleetMembersRestClient; - /// Initializes a new instance of the class for mocking. - protected DatabaseFleetMemberCollection() + /// Initializes a new instance of the class for mocking. + protected ContainerServiceFleetMemberCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal DatabaseFleetMemberCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal ContainerServiceFleetMemberCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _databaseFleetMemberFleetMembersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetMemberResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DatabaseFleetMemberResource.ResourceType, out string databaseFleetMemberFleetMembersApiVersion); - _databaseFleetMemberFleetMembersRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetMemberFleetMembersApiVersion); + _containerServiceFleetMemberFleetMembersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerServiceFleet", ContainerServiceFleetMemberResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerServiceFleetMemberResource.ResourceType, out string containerServiceFleetMemberFleetMembersApiVersion); + _containerServiceFleetMemberFleetMembersRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerServiceFleetMemberFleetMembersApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal DatabaseFleetMemberCollection(ArmClient client, ResourceIdentifier id) internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != DatabaseFleetResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DatabaseFleetResource.ResourceType), nameof(id)); + if (id.ResourceType != ContainerServiceFleetResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerServiceFleetResource.ResourceType), nameof(id)); } /// @@ -74,17 +74,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fleetMemberName, DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fleetMemberName, ContainerServiceFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.CreateOrUpdate"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _databaseFleetMemberFleetMembersRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _containerServiceFleetMemberFleetMembersRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -117,17 +117,17 @@ public virtual async Task> CreateOrUpd /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fleetMemberName, DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fleetMemberName, ContainerServiceFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.CreateOrUpdate"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberCollection.CreateOrUpdate"); scope.Start(); try { - var response = _databaseFleetMemberFleetMembersRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _containerServiceFleetMemberFleetMembersRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -156,18 +156,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Get"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberCollection.Get"); scope.Start(); try { - var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -193,18 +193,18 @@ public virtual async Task> GetAsync(string /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual Response Get(string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Get"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberCollection.Get"); scope.Start(); try { - var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken); + var response = _containerServiceFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -227,12 +227,12 @@ public virtual Response Get(string fleetMemberName, /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetMemberResource(Client, DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(e)), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, "DatabaseFleetMemberCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerServiceFleetMemberFleetMembersRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerServiceFleetMemberFleetMembersRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerServiceFleetMemberResource(Client, ContainerServiceFleetMemberData.DeserializeContainerServiceFleetMemberData(e)), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, "ContainerServiceFleetMemberCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -249,12 +249,12 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetMemberResource(Client, DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(e)), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, "DatabaseFleetMemberCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerServiceFleetMemberFleetMembersRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerServiceFleetMemberFleetMembersRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerServiceFleetMemberResource(Client, ContainerServiceFleetMemberData.DeserializeContainerServiceFleetMemberData(e)), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, "ContainerServiceFleetMemberCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -278,11 +278,11 @@ public virtual async Task> ExistsAsync(string fleetMemberName, Ca { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Exists"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberCollection.Exists"); scope.Start(); try { - var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -313,11 +313,11 @@ public virtual Response Exists(string fleetMemberName, CancellationToken c { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Exists"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberCollection.Exists"); scope.Start(); try { - var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken); + var response = _containerServiceFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -344,18 +344,18 @@ public virtual Response Exists(string fleetMemberName, CancellationToken c /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.GetIfExists"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberCollection.GetIfExists"); scope.Start(); try { - var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -381,18 +381,18 @@ public virtual async Task> GetIfEx /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName)); - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.GetIfExists"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberCollection.GetIfExists"); scope.Start(); try { - var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken); + var response = _containerServiceFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -401,7 +401,7 @@ public virtual NullableResponse GetIfExists(string } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -411,7 +411,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberData.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberData.cs similarity index 77% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberData.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberData.cs index 61ac559f56c59..47cf9b7c2620b 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberData.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberData.cs @@ -7,23 +7,23 @@ using Azure; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// - /// A class representing the DatabaseFleetMember data model. + /// A class representing the ContainerServiceFleetMember data model. /// A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. /// - public partial class DatabaseFleetMemberData : ResourceData + public partial class ContainerServiceFleetMemberData : ResourceData { - /// Initializes a new instance of DatabaseFleetMemberData. - public DatabaseFleetMemberData() + /// Initializes a new instance of ContainerServiceFleetMemberData. + public ContainerServiceFleetMemberData() { } - /// Initializes a new instance of DatabaseFleetMemberData. + /// Initializes a new instance of ContainerServiceFleetMemberData. /// The id. /// The name. /// The resourceType. @@ -32,7 +32,7 @@ public DatabaseFleetMemberData() /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. /// The group this member belongs to for multi-cluster update management. /// The status of the last operation. - internal DatabaseFleetMemberData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, ResourceIdentifier clusterResourceId, string group, FleetMemberProvisioningState? provisioningState) : base(id, name, resourceType, systemData) + internal ContainerServiceFleetMemberData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, ResourceIdentifier clusterResourceId, string group, FleetMemberProvisioningState? provisioningState) : base(id, name, resourceType, systemData) { ETag = eTag; ClusterResourceId = clusterResourceId; diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.cs similarity index 64% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberResource.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.cs index 219d517b229e7..3139f44c15619 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.cs @@ -13,51 +13,51 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// - /// A Class representing a DatabaseFleetMember along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDatabaseFleetMemberResource method. - /// Otherwise you can get one from its parent resource using the GetDatabaseFleetMember method. + /// A Class representing a ContainerServiceFleetMember along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetContainerServiceFleetMemberResource method. + /// Otherwise you can get one from its parent resource using the GetContainerServiceFleetMember method. /// - public partial class DatabaseFleetMemberResource : ArmResource + public partial class ContainerServiceFleetMemberResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _databaseFleetMemberFleetMembersClientDiagnostics; - private readonly FleetMembersRestOperations _databaseFleetMemberFleetMembersRestClient; - private readonly DatabaseFleetMemberData _data; + private readonly ClientDiagnostics _containerServiceFleetMemberFleetMembersClientDiagnostics; + private readonly FleetMembersRestOperations _containerServiceFleetMemberFleetMembersRestClient; + private readonly ContainerServiceFleetMemberData _data; - /// Initializes a new instance of the class for mocking. - protected DatabaseFleetMemberResource() + /// Initializes a new instance of the class for mocking. + protected ContainerServiceFleetMemberResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DatabaseFleetMemberResource(ArmClient client, DatabaseFleetMemberData data) : this(client, data.Id) + internal ContainerServiceFleetMemberResource(ArmClient client, ContainerServiceFleetMemberData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal DatabaseFleetMemberResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal ContainerServiceFleetMemberResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _databaseFleetMemberFleetMembersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string databaseFleetMemberFleetMembersApiVersion); - _databaseFleetMemberFleetMembersRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetMemberFleetMembersApiVersion); + _containerServiceFleetMemberFleetMembersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerServiceFleet", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string containerServiceFleetMemberFleetMembersApiVersion); + _containerServiceFleetMemberFleetMembersRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerServiceFleetMemberFleetMembersApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -71,7 +71,7 @@ internal DatabaseFleetMemberResource(ArmClient client, ResourceIdentifier id) : /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DatabaseFleetMemberData Data + public virtual ContainerServiceFleetMemberData Data { get { @@ -101,16 +101,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Get"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberResource.Get"); scope.Start(); try { - var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -133,16 +133,16 @@ public virtual async Task> GetAsync(Cancel /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Get"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberResource.Get"); scope.Start(); try { - var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _containerServiceFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetMemberResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -169,12 +169,12 @@ public virtual Response Get(CancellationToken cance /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Delete"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberResource.Delete"); scope.Start(); try { - var response = await _databaseFleetMemberFleetMembersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(_databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _containerServiceFleetMemberFleetMembersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -204,12 +204,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Delete"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberResource.Delete"); scope.Start(); try { - var response = _databaseFleetMemberFleetMembersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(_databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _containerServiceFleetMemberFleetMembersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -239,16 +239,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatabaseFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerServiceFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Update"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberResource.Update"); scope.Start(); try { - var response = await _databaseFleetMemberFleetMembersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _containerServiceFleetMemberFleetMembersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -278,16 +278,16 @@ public virtual async Task> UpdateAsync /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DatabaseFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, ContainerServiceFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Update"); + using var scope = _containerServiceFleetMemberFleetMembersClientDiagnostics.CreateScope("ContainerServiceFleetMemberResource.Update"); scope.Start(); try { - var response = _databaseFleetMemberFleetMembersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _containerServiceFleetMemberFleetMembersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetMemberOperationSource(Client), _containerServiceFleetMemberFleetMembersClientDiagnostics, Pipeline, _containerServiceFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.cs similarity index 70% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetResource.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.cs index fdd9eccaed673..dae8e4cf2c3f7 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.cs @@ -14,52 +14,52 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// - /// A Class representing a DatabaseFleet along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDatabaseFleetResource method. - /// Otherwise you can get one from its parent resource using the GetDatabaseFleet method. + /// A Class representing a ContainerServiceFleet along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetContainerServiceFleetResource method. + /// Otherwise you can get one from its parent resource using the GetContainerServiceFleet method. /// - public partial class DatabaseFleetResource : ArmResource + public partial class ContainerServiceFleetResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _databaseFleetFleetsClientDiagnostics; - private readonly FleetsRestOperations _databaseFleetFleetsRestClient; - private readonly DatabaseFleetData _data; + private readonly ClientDiagnostics _containerServiceFleetFleetsClientDiagnostics; + private readonly FleetsRestOperations _containerServiceFleetFleetsRestClient; + private readonly ContainerServiceFleetData _data; - /// Initializes a new instance of the class for mocking. - protected DatabaseFleetResource() + /// Initializes a new instance of the class for mocking. + protected ContainerServiceFleetResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DatabaseFleetResource(ArmClient client, DatabaseFleetData data) : this(client, data.Id) + internal ContainerServiceFleetResource(ArmClient client, ContainerServiceFleetData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal DatabaseFleetResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal ContainerServiceFleetResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _databaseFleetFleetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string databaseFleetFleetsApiVersion); - _databaseFleetFleetsRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetFleetsApiVersion); + _containerServiceFleetFleetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerServiceFleet", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string containerServiceFleetFleetsApiVersion); + _containerServiceFleetFleetsRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerServiceFleetFleetsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -73,7 +73,7 @@ internal DatabaseFleetResource(ArmClient client, ResourceIdentifier id) : base(c /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DatabaseFleetData Data + public virtual ContainerServiceFleetData Data { get { @@ -89,11 +89,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of DatabaseFleetMemberResources in the DatabaseFleet. - /// An object representing collection of DatabaseFleetMemberResources and their operations over a DatabaseFleetMemberResource. - public virtual DatabaseFleetMemberCollection GetDatabaseFleetMembers() + /// Gets a collection of ContainerServiceFleetMemberResources in the ContainerServiceFleet. + /// An object representing collection of ContainerServiceFleetMemberResources and their operations over a ContainerServiceFleetMemberResource. + public virtual ContainerServiceFleetMemberCollection GetContainerServiceFleetMembers() { - return GetCachedClient(Client => new DatabaseFleetMemberCollection(Client, Id)); + return GetCachedClient(Client => new ContainerServiceFleetMemberCollection(Client, Id)); } /// @@ -114,9 +114,9 @@ public virtual DatabaseFleetMemberCollection GetDatabaseFleetMembers() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetDatabaseFleetMemberAsync(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual async Task> GetContainerServiceFleetMemberAsync(string fleetMemberName, CancellationToken cancellationToken = default) { - return await GetDatabaseFleetMembers().GetAsync(fleetMemberName, cancellationToken).ConfigureAwait(false); + return await GetContainerServiceFleetMembers().GetAsync(fleetMemberName, cancellationToken).ConfigureAwait(false); } /// @@ -137,16 +137,16 @@ public virtual async Task> GetDatabaseFlee /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetDatabaseFleetMember(string fleetMemberName, CancellationToken cancellationToken = default) + public virtual Response GetContainerServiceFleetMember(string fleetMemberName, CancellationToken cancellationToken = default) { - return GetDatabaseFleetMembers().Get(fleetMemberName, cancellationToken); + return GetContainerServiceFleetMembers().Get(fleetMemberName, cancellationToken); } - /// Gets a collection of DatabaseFleetUpdateRunResources in the DatabaseFleet. - /// An object representing collection of DatabaseFleetUpdateRunResources and their operations over a DatabaseFleetUpdateRunResource. - public virtual DatabaseFleetUpdateRunCollection GetDatabaseFleetUpdateRuns() + /// Gets a collection of ContainerServiceFleetUpdateRunResources in the ContainerServiceFleet. + /// An object representing collection of ContainerServiceFleetUpdateRunResources and their operations over a ContainerServiceFleetUpdateRunResource. + public virtual ContainerServiceFleetUpdateRunCollection GetContainerServiceFleetUpdateRuns() { - return GetCachedClient(Client => new DatabaseFleetUpdateRunCollection(Client, Id)); + return GetCachedClient(Client => new ContainerServiceFleetUpdateRunCollection(Client, Id)); } /// @@ -167,9 +167,9 @@ public virtual DatabaseFleetUpdateRunCollection GetDatabaseFleetUpdateRuns() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetDatabaseFleetUpdateRunAsync(string updateRunName, CancellationToken cancellationToken = default) + public virtual async Task> GetContainerServiceFleetUpdateRunAsync(string updateRunName, CancellationToken cancellationToken = default) { - return await GetDatabaseFleetUpdateRuns().GetAsync(updateRunName, cancellationToken).ConfigureAwait(false); + return await GetContainerServiceFleetUpdateRuns().GetAsync(updateRunName, cancellationToken).ConfigureAwait(false); } /// @@ -190,9 +190,9 @@ public virtual async Task> GetDatabaseF /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetDatabaseFleetUpdateRun(string updateRunName, CancellationToken cancellationToken = default) + public virtual Response GetContainerServiceFleetUpdateRun(string updateRunName, CancellationToken cancellationToken = default) { - return GetDatabaseFleetUpdateRuns().Get(updateRunName, cancellationToken); + return GetContainerServiceFleetUpdateRuns().Get(updateRunName, cancellationToken); } /// @@ -209,16 +209,16 @@ public virtual Response GetDatabaseFleetUpdateRu /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Get"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.Get"); scope.Start(); try { - var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -241,16 +241,16 @@ public virtual async Task> GetAsync(Cancellation /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Get"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.Get"); scope.Start(); try { - var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _containerServiceFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -277,12 +277,12 @@ public virtual Response Get(CancellationToken cancellatio /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Delete"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.Delete"); scope.Start(); try { - var response = await _databaseFleetFleetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(_databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _containerServiceFleetFleetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,12 +312,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Delete"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.Delete"); scope.Start(); try { - var response = _databaseFleetFleetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(_databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _containerServiceFleetFleetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -347,16 +347,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatabaseFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerServiceFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Update"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.Update"); scope.Start(); try { - var response = await _databaseFleetFleetsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _containerServiceFleetFleetsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -386,16 +386,16 @@ public virtual async Task> UpdateAsync(WaitU /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DatabaseFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, ContainerServiceFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Update"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.Update"); scope.Start(); try { - var response = _databaseFleetFleetsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _containerServiceFleetFleetsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetOperationSource(Client), _containerServiceFleetFleetsClientDiagnostics, Pipeline, _containerServiceFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -423,11 +423,11 @@ public virtual ArmOperation Update(WaitUntil waitUntil, D /// The cancellation token to use. public virtual async Task> GetCredentialsAsync(CancellationToken cancellationToken = default) { - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.GetCredentials"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.GetCredentials"); scope.Start(); try { - var response = await _databaseFleetFleetsRestClient.ListCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetFleetsRestClient.ListCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -453,11 +453,11 @@ public virtual async Task> GetCredentialsAsync( /// The cancellation token to use. public virtual Response GetCredentials(CancellationToken cancellationToken = default) { - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.GetCredentials"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.GetCredentials"); scope.Start(); try { - var response = _databaseFleetFleetsRestClient.ListCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _containerServiceFleetFleetsRestClient.ListCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -484,12 +484,12 @@ public virtual Response GetCredentials(CancellationToken /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.AddTag"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.AddTag"); scope.Start(); try { @@ -498,13 +498,13 @@ public virtual async Task> AddTagAsync(string ke var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _containerServiceFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerServiceFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DatabaseFleetPatch(); + var patch = new ContainerServiceFleetPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -538,12 +538,12 @@ public virtual async Task> AddTagAsync(string ke /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.AddTag"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.AddTag"); scope.Start(); try { @@ -552,13 +552,13 @@ public virtual Response AddTag(string key, string value, var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _containerServiceFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ContainerServiceFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DatabaseFleetPatch(); + var patch = new ContainerServiceFleetPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -591,11 +591,11 @@ public virtual Response AddTag(string key, string value, /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.SetTags"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.SetTags"); scope.Start(); try { @@ -605,13 +605,13 @@ public virtual async Task> SetTagsAsync(IDiction var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _containerServiceFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerServiceFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DatabaseFleetPatch(); + var patch = new ContainerServiceFleetPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -640,11 +640,11 @@ public virtual async Task> SetTagsAsync(IDiction /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.SetTags"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.SetTags"); scope.Start(); try { @@ -654,13 +654,13 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.RemoveTag"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.RemoveTag"); scope.Start(); try { @@ -702,13 +702,13 @@ public virtual async Task> RemoveTagAsync(string var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _containerServiceFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerServiceFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DatabaseFleetPatch(); + var patch = new ContainerServiceFleetPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -741,11 +741,11 @@ public virtual async Task> RemoveTagAsync(string /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.RemoveTag"); + using var scope = _containerServiceFleetFleetsClientDiagnostics.CreateScope("ContainerServiceFleetResource.RemoveTag"); scope.Start(); try { @@ -754,13 +754,13 @@ public virtual Response RemoveTag(string key, Cancellatio var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _containerServiceFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ContainerServiceFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DatabaseFleetPatch(); + var patch = new ContainerServiceFleetPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunCollection.cs similarity index 61% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunCollection.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunCollection.cs index 7ab5e958d5993..d644c4b44e075 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunCollection.cs @@ -17,31 +17,31 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDatabaseFleetUpdateRuns method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetContainerServiceFleetUpdateRuns method from an instance of . /// - public partial class DatabaseFleetUpdateRunCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class ContainerServiceFleetUpdateRunCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _databaseFleetUpdateRunUpdateRunsClientDiagnostics; - private readonly UpdateRunsRestOperations _databaseFleetUpdateRunUpdateRunsRestClient; + private readonly ClientDiagnostics _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics; + private readonly UpdateRunsRestOperations _containerServiceFleetUpdateRunUpdateRunsRestClient; - /// Initializes a new instance of the class for mocking. - protected DatabaseFleetUpdateRunCollection() + /// Initializes a new instance of the class for mocking. + protected ContainerServiceFleetUpdateRunCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal DatabaseFleetUpdateRunCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal ContainerServiceFleetUpdateRunCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _databaseFleetUpdateRunUpdateRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetUpdateRunResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DatabaseFleetUpdateRunResource.ResourceType, out string databaseFleetUpdateRunUpdateRunsApiVersion); - _databaseFleetUpdateRunUpdateRunsRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetUpdateRunUpdateRunsApiVersion); + _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerServiceFleet", ContainerServiceFleetUpdateRunResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerServiceFleetUpdateRunResource.ResourceType, out string containerServiceFleetUpdateRunUpdateRunsApiVersion); + _containerServiceFleetUpdateRunUpdateRunsRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerServiceFleetUpdateRunUpdateRunsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal DatabaseFleetUpdateRunCollection(ArmClient client, ResourceIdentifier i internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != DatabaseFleetResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DatabaseFleetResource.ResourceType), nameof(id)); + if (id.ResourceType != ContainerServiceFleetResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerServiceFleetResource.ResourceType), nameof(id)); } /// @@ -74,17 +74,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string updateRunName, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string updateRunName, ContainerServiceFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.CreateOrUpdate"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -117,17 +117,17 @@ public virtual async Task> CreateOr /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string updateRunName, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string updateRunName, ContainerServiceFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.CreateOrUpdate"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunCollection.CreateOrUpdate"); scope.Start(); try { - var response = _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -156,18 +156,18 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string updateRunName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Get"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunCollection.Get"); scope.Start(); try { - var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -193,18 +193,18 @@ public virtual async Task> GetAsync(str /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string updateRunName, CancellationToken cancellationToken = default) + public virtual Response Get(string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Get"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunCollection.Get"); scope.Start(); try { - var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken); + var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -227,12 +227,12 @@ public virtual Response Get(string updateRunName /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetUpdateRunResource(Client, DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(e)), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, "DatabaseFleetUpdateRunCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerServiceFleetUpdateRunResource(Client, ContainerServiceFleetUpdateRunData.DeserializeContainerServiceFleetUpdateRunData(e)), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, "ContainerServiceFleetUpdateRunCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -249,12 +249,12 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetUpdateRunResource(Client, DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(e)), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, "DatabaseFleetUpdateRunCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerServiceFleetUpdateRunResource(Client, ContainerServiceFleetUpdateRunData.DeserializeContainerServiceFleetUpdateRunData(e)), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, "ContainerServiceFleetUpdateRunCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -278,11 +278,11 @@ public virtual async Task> ExistsAsync(string updateRunName, Canc { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Exists"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunCollection.Exists"); scope.Start(); try { - var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -313,11 +313,11 @@ public virtual Response Exists(string updateRunName, CancellationToken can { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Exists"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunCollection.Exists"); scope.Start(); try { - var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken); + var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -344,18 +344,18 @@ public virtual Response Exists(string updateRunName, CancellationToken can /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string updateRunName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.GetIfExists"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunCollection.GetIfExists"); scope.Start(); try { - var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -381,18 +381,18 @@ public virtual async Task> GetI /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string updateRunName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName)); - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.GetIfExists"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunCollection.GetIfExists"); scope.Start(); try { - var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken); + var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -401,7 +401,7 @@ public virtual NullableResponse GetIfExists(stri } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -411,7 +411,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunData.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunData.cs similarity index 69% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunData.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunData.cs index 772fc6730a748..b4d5cee77962b 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunData.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunData.cs @@ -8,23 +8,23 @@ using System.Collections.Generic; using Azure; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// - /// A class representing the DatabaseFleetUpdateRun data model. + /// A class representing the ContainerServiceFleetUpdateRun data model. /// An UpdateRun is a multi-stage process to perform update operations across members of a Fleet. /// - public partial class DatabaseFleetUpdateRunData : ResourceData + public partial class ContainerServiceFleetUpdateRunData : ResourceData { - /// Initializes a new instance of DatabaseFleetUpdateRunData. - public DatabaseFleetUpdateRunData() + /// Initializes a new instance of ContainerServiceFleetUpdateRunData. + public ContainerServiceFleetUpdateRunData() { } - /// Initializes a new instance of DatabaseFleetUpdateRunData. + /// Initializes a new instance of ContainerServiceFleetUpdateRunData. /// The id. /// The name. /// The resourceType. @@ -38,7 +38,7 @@ public DatabaseFleetUpdateRunData() /// /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. /// The status of the UpdateRun. - internal DatabaseFleetUpdateRunData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, FleetUpdateRunProvisioningState? provisioningState, FleetUpdateRunStrategy strategy, FleetManagedClusterUpdate managedClusterUpdate, FleetUpdateRunStatus status) : base(id, name, resourceType, systemData) + internal ContainerServiceFleetUpdateRunData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, ContainerServiceFleetUpdateRunProvisioningState? provisioningState, ContainerServiceFleetUpdateRunStrategy strategy, ContainerServiceFleetManagedClusterUpdate managedClusterUpdate, ContainerServiceFleetUpdateRunStatus status) : base(id, name, resourceType, systemData) { ETag = eTag; ProvisioningState = provisioningState; @@ -50,23 +50,23 @@ internal DatabaseFleetUpdateRunData(ResourceIdentifier id, string name, Resource /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. public ETag? ETag { get; } /// The provisioning state of the UpdateRun resource. - public FleetUpdateRunProvisioningState? ProvisioningState { get; } + public ContainerServiceFleetUpdateRunProvisioningState? ProvisioningState { get; } /// /// The strategy defines the order in which the clusters will be updated. /// If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members. /// The strategy of the UpdateRun can be modified until the run is started. /// - internal FleetUpdateRunStrategy Strategy { get; set; } + internal ContainerServiceFleetUpdateRunStrategy Strategy { get; set; } /// The list of stages that compose this update run. - public IList StrategyStages + public IList StrategyStages { get => Strategy is null ? default : Strategy.Stages; - set => Strategy = new FleetUpdateRunStrategy(value); + set => Strategy = new ContainerServiceFleetUpdateRunStrategy(value); } /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started. - public FleetManagedClusterUpdate ManagedClusterUpdate { get; set; } + public ContainerServiceFleetManagedClusterUpdate ManagedClusterUpdate { get; set; } /// The status of the UpdateRun. - public FleetUpdateRunStatus Status { get; } + public ContainerServiceFleetUpdateRunStatus Status { get; } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs similarity index 64% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunResource.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs index 43a9373811061..e2b2a7afcb8fe 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs @@ -14,49 +14,49 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// - /// A Class representing a DatabaseFleetUpdateRun along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDatabaseFleetUpdateRunResource method. - /// Otherwise you can get one from its parent resource using the GetDatabaseFleetUpdateRun method. + /// A Class representing a ContainerServiceFleetUpdateRun along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetContainerServiceFleetUpdateRunResource method. + /// Otherwise you can get one from its parent resource using the GetContainerServiceFleetUpdateRun method. /// - public partial class DatabaseFleetUpdateRunResource : ArmResource + public partial class ContainerServiceFleetUpdateRunResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _databaseFleetUpdateRunUpdateRunsClientDiagnostics; - private readonly UpdateRunsRestOperations _databaseFleetUpdateRunUpdateRunsRestClient; - private readonly DatabaseFleetUpdateRunData _data; + private readonly ClientDiagnostics _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics; + private readonly UpdateRunsRestOperations _containerServiceFleetUpdateRunUpdateRunsRestClient; + private readonly ContainerServiceFleetUpdateRunData _data; - /// Initializes a new instance of the class for mocking. - protected DatabaseFleetUpdateRunResource() + /// Initializes a new instance of the class for mocking. + protected ContainerServiceFleetUpdateRunResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DatabaseFleetUpdateRunResource(ArmClient client, DatabaseFleetUpdateRunData data) : this(client, data.Id) + internal ContainerServiceFleetUpdateRunResource(ArmClient client, ContainerServiceFleetUpdateRunData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal DatabaseFleetUpdateRunResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal ContainerServiceFleetUpdateRunResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _databaseFleetUpdateRunUpdateRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string databaseFleetUpdateRunUpdateRunsApiVersion); - _databaseFleetUpdateRunUpdateRunsRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetUpdateRunUpdateRunsApiVersion); + _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerServiceFleet", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string containerServiceFleetUpdateRunUpdateRunsApiVersion); + _containerServiceFleetUpdateRunUpdateRunsRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerServiceFleetUpdateRunUpdateRunsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -70,7 +70,7 @@ internal DatabaseFleetUpdateRunResource(ArmClient client, ResourceIdentifier id) /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DatabaseFleetUpdateRunData Data + public virtual ContainerServiceFleetUpdateRunData Data { get { @@ -100,16 +100,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Get"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Get"); scope.Start(); try { - var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -132,16 +132,16 @@ public virtual async Task> GetAsync(Can /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Get"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Get"); scope.Start(); try { - var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new ContainerServiceFleetUpdateRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -168,12 +168,12 @@ public virtual Response Get(CancellationToken ca /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Delete"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Delete"); scope.Start(); try { - var response = await _databaseFleetUpdateRunUpdateRunsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(_databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -203,12 +203,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Delete"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Delete"); scope.Start(); try { - var response = _databaseFleetUpdateRunUpdateRunsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(_databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(_containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -239,16 +239,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// The request should only proceed if no entity matches this string. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerServiceFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Update"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Update"); scope.Start(); try { - var response = await _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -279,16 +279,16 @@ public virtual async Task> UpdateAs /// The request should only proceed if no entity matches this string. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, ContainerServiceFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Update"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Update"); scope.Start(); try { - var response = _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -316,14 +316,14 @@ public virtual ArmOperation Update(WaitUntil wai /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request should only proceed if an entity matches this string. /// The cancellation token to use. - public virtual async Task> StartAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> StartAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Start"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Start"); scope.Start(); try { - var response = await _databaseFleetUpdateRunUpdateRunsRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -351,14 +351,14 @@ public virtual async Task> StartAsy /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request should only proceed if an entity matches this string. /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Start"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Start"); scope.Start(); try { - var response = _databaseFleetUpdateRunUpdateRunsRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -386,14 +386,14 @@ public virtual ArmOperation Start(WaitUntil wait /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request should only proceed if an entity matches this string. /// The cancellation token to use. - public virtual async Task> StopAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> StopAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Stop"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Stop"); scope.Start(); try { - var response = await _databaseFleetUpdateRunUpdateRunsRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _containerServiceFleetUpdateRunUpdateRunsRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -421,14 +421,14 @@ public virtual async Task> StopAsyn /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request should only proceed if an entity matches this string. /// The cancellation token to use. - public virtual ArmOperation Stop(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Stop(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default) { - using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Stop"); + using var scope = _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("ContainerServiceFleetUpdateRunResource.Stop"); scope.Start(); try { - var response = _databaseFleetUpdateRunUpdateRunsRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); - var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _containerServiceFleetUpdateRunUpdateRunsRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ContainerServiceFleetArmOperation(new ContainerServiceFleetUpdateRunOperationSource(Client), _containerServiceFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _containerServiceFleetUpdateRunUpdateRunsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/ContainerServiceFleetExtensions.cs similarity index 59% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/ContainerServiceFleetExtensions.cs index 0ed163b3dbe31..1b4e9719c8f5d 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/ContainerServiceFleetExtensions.cs @@ -13,10 +13,10 @@ using Azure.ResourceManager; using Azure.ResourceManager.Resources; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { - /// A class to add extension methods to Azure.ResourceManager.DatabaseFleetManager. - public static partial class DatabaseFleetManagerExtensions + /// A class to add extension methods to Azure.ResourceManager.ContainerServiceFleet. + public static partial class ContainerServiceFleetExtensions { private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmResource resource) { @@ -49,69 +49,69 @@ private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtens return new SubscriptionResourceExtensionClient(client, scope); }); } - #region DatabaseFleetResource + #region ContainerServiceFleetResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DatabaseFleetResource GetDatabaseFleetResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerServiceFleetResource GetContainerServiceFleetResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DatabaseFleetResource.ValidateResourceId(id); - return new DatabaseFleetResource(client, id); + ContainerServiceFleetResource.ValidateResourceId(id); + return new ContainerServiceFleetResource(client, id); } ); } #endregion - #region DatabaseFleetMemberResource + #region ContainerServiceFleetMemberResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DatabaseFleetMemberResource GetDatabaseFleetMemberResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerServiceFleetMemberResource GetContainerServiceFleetMemberResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DatabaseFleetMemberResource.ValidateResourceId(id); - return new DatabaseFleetMemberResource(client, id); + ContainerServiceFleetMemberResource.ValidateResourceId(id); + return new ContainerServiceFleetMemberResource(client, id); } ); } #endregion - #region DatabaseFleetUpdateRunResource + #region ContainerServiceFleetUpdateRunResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DatabaseFleetUpdateRunResource GetDatabaseFleetUpdateRunResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerServiceFleetUpdateRunResource GetContainerServiceFleetUpdateRunResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DatabaseFleetUpdateRunResource.ValidateResourceId(id); - return new DatabaseFleetUpdateRunResource(client, id); + ContainerServiceFleetUpdateRunResource.ValidateResourceId(id); + return new ContainerServiceFleetUpdateRunResource(client, id); } ); } #endregion - /// Gets a collection of DatabaseFleetResources in the ResourceGroupResource. + /// Gets a collection of ContainerServiceFleetResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of DatabaseFleetResources and their operations over a DatabaseFleetResource. - public static DatabaseFleetCollection GetDatabaseFleets(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of ContainerServiceFleetResources and their operations over a ContainerServiceFleetResource. + public static ContainerServiceFleetCollection GetContainerServiceFleets(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetDatabaseFleets(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetContainerServiceFleets(); } /// @@ -133,9 +133,9 @@ public static DatabaseFleetCollection GetDatabaseFleets(this ResourceGroupResour /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetDatabaseFleetAsync(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) + public static async Task> GetContainerServiceFleetAsync(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetDatabaseFleets().GetAsync(fleetName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetContainerServiceFleets().GetAsync(fleetName, cancellationToken).ConfigureAwait(false); } /// @@ -157,9 +157,9 @@ public static async Task> GetDatabaseFleetAsync( /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetDatabaseFleet(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) + public static Response GetContainerServiceFleet(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetDatabaseFleets().Get(fleetName, cancellationToken); + return resourceGroupResource.GetContainerServiceFleets().Get(fleetName, cancellationToken); } /// @@ -177,10 +177,10 @@ public static Response GetDatabaseFleet(this ResourceGrou /// /// The instance the method will execute against. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDatabaseFleetsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetContainerServiceFleetsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDatabaseFleetsAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetContainerServiceFleetsAsync(cancellationToken); } /// @@ -198,10 +198,10 @@ public static AsyncPageable GetDatabaseFleetsAsync(this S /// /// The instance the method will execute against. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDatabaseFleets(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetContainerServiceFleets(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDatabaseFleets(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetContainerServiceFleets(cancellationToken); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs similarity index 71% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 0e28b7080602e..69e7e4226b64c 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -8,7 +8,7 @@ using Azure.Core; using Azure.ResourceManager; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// A class to add extension methods to ResourceGroupResource. internal partial class ResourceGroupResourceExtensionClient : ArmResource @@ -31,11 +31,11 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of DatabaseFleetResources in the ResourceGroupResource. - /// An object representing collection of DatabaseFleetResources and their operations over a DatabaseFleetResource. - public virtual DatabaseFleetCollection GetDatabaseFleets() + /// Gets a collection of ContainerServiceFleetResources in the ResourceGroupResource. + /// An object representing collection of ContainerServiceFleetResources and their operations over a ContainerServiceFleetResource. + public virtual ContainerServiceFleetCollection GetContainerServiceFleets() { - return GetCachedClient(Client => new DatabaseFleetCollection(Client, Id)); + return GetCachedClient(Client => new ContainerServiceFleetCollection(Client, Id)); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs similarity index 52% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index e19ae88235b0c..895769b4d08d9 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -12,13 +12,13 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { - private ClientDiagnostics _databaseFleetFleetsClientDiagnostics; - private FleetsRestOperations _databaseFleetFleetsRestClient; + private ClientDiagnostics _containerServiceFleetFleetsClientDiagnostics; + private FleetsRestOperations _containerServiceFleetFleetsRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -32,8 +32,8 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics DatabaseFleetFleetsClientDiagnostics => _databaseFleetFleetsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetResource.ResourceType.Namespace, Diagnostics); - private FleetsRestOperations DatabaseFleetFleetsRestClient => _databaseFleetFleetsRestClient ??= new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DatabaseFleetResource.ResourceType)); + private ClientDiagnostics ContainerServiceFleetFleetsClientDiagnostics => _containerServiceFleetFleetsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ContainerServiceFleet", ContainerServiceFleetResource.ResourceType.Namespace, Diagnostics); + private FleetsRestOperations ContainerServiceFleetFleetsRestClient => _containerServiceFleetFleetsRestClient ??= new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ContainerServiceFleetResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -55,12 +55,12 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDatabaseFleetsAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetContainerServiceFleetsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), DatabaseFleetFleetsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDatabaseFleets", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ContainerServiceFleetFleetsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ContainerServiceFleetFleetsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerServiceFleetResource(Client, ContainerServiceFleetData.DeserializeContainerServiceFleetData(e)), ContainerServiceFleetFleetsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetContainerServiceFleets", "value", "nextLink", cancellationToken); } /// @@ -77,12 +77,12 @@ public virtual AsyncPageable GetDatabaseFleetsAsync(Cance /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDatabaseFleets(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetContainerServiceFleets(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), DatabaseFleetFleetsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDatabaseFleets", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ContainerServiceFleetFleetsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ContainerServiceFleetFleetsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerServiceFleetResource(Client, ContainerServiceFleetData.DeserializeContainerServiceFleetData(e)), ContainerServiceFleetFleetsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetContainerServiceFleets", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetArmOperation.cs similarity index 78% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetArmOperation.cs index 919c363d8a1c0..bf347fe221086 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetArmOperation.cs @@ -13,28 +13,28 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { #pragma warning disable SA1649 // File name should match first type name - internal class DatabaseFleetManagerArmOperation : ArmOperation + internal class ContainerServiceFleetArmOperation : ArmOperation #pragma warning restore SA1649 // File name should match first type name { private readonly OperationInternal _operation; - /// Initializes a new instance of DatabaseFleetManagerArmOperation for mocking. - protected DatabaseFleetManagerArmOperation() + /// Initializes a new instance of ContainerServiceFleetArmOperation for mocking. + protected ContainerServiceFleetArmOperation() { } - internal DatabaseFleetManagerArmOperation(Response response) + internal ContainerServiceFleetArmOperation(Response response) { _operation = OperationInternal.Succeeded(response); } - internal DatabaseFleetManagerArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + internal ContainerServiceFleetArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DatabaseFleetManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "ContainerServiceFleetArmOperation", fallbackStrategy: new SequentialDelayStrategy()); } /// diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetArmOperationOfT.cs similarity index 78% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetArmOperationOfT.cs index ce6524018cef9..390d5a2d09084 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetArmOperationOfT.cs @@ -13,28 +13,28 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { #pragma warning disable SA1649 // File name should match first type name - internal class DatabaseFleetManagerArmOperation : ArmOperation + internal class ContainerServiceFleetArmOperation : ArmOperation #pragma warning restore SA1649 // File name should match first type name { private readonly OperationInternal _operation; - /// Initializes a new instance of DatabaseFleetManagerArmOperation for mocking. - protected DatabaseFleetManagerArmOperation() + /// Initializes a new instance of ContainerServiceFleetArmOperation for mocking. + protected ContainerServiceFleetArmOperation() { } - internal DatabaseFleetManagerArmOperation(Response response) + internal ContainerServiceFleetArmOperation(Response response) { _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); } - internal DatabaseFleetManagerArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + internal ContainerServiceFleetArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { var nextLinkOperation = NextLinkOperationImplementation.Create(source, pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DatabaseFleetManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "ContainerServiceFleetArmOperation", fallbackStrategy: new SequentialDelayStrategy()); } /// diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetMemberOperationSource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetMemberOperationSource.cs new file mode 100644 index 0000000000000..a267a8b80cf83 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetMemberOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ContainerServiceFleet +{ + internal class ContainerServiceFleetMemberOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ContainerServiceFleetMemberOperationSource(ArmClient client) + { + _client = client; + } + + ContainerServiceFleetMemberResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ContainerServiceFleetMemberData.DeserializeContainerServiceFleetMemberData(document.RootElement); + return new ContainerServiceFleetMemberResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ContainerServiceFleetMemberData.DeserializeContainerServiceFleetMemberData(document.RootElement); + return new ContainerServiceFleetMemberResource(_client, data); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetOperationSource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetOperationSource.cs new file mode 100644 index 0000000000000..29ac2d4b1963b --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ContainerServiceFleet +{ + internal class ContainerServiceFleetOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ContainerServiceFleetOperationSource(ArmClient client) + { + _client = client; + } + + ContainerServiceFleetResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ContainerServiceFleetData.DeserializeContainerServiceFleetData(document.RootElement); + return new ContainerServiceFleetResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ContainerServiceFleetData.DeserializeContainerServiceFleetData(document.RootElement); + return new ContainerServiceFleetResource(_client, data); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetUpdateRunOperationSource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetUpdateRunOperationSource.cs new file mode 100644 index 0000000000000..eeeb985ab756e --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/LongRunningOperation/ContainerServiceFleetUpdateRunOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ContainerServiceFleet +{ + internal class ContainerServiceFleetUpdateRunOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ContainerServiceFleetUpdateRunOperationSource(ArmClient client) + { + _client = client; + } + + ContainerServiceFleetUpdateRunResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ContainerServiceFleetUpdateRunData.DeserializeContainerServiceFleetUpdateRunData(document.RootElement); + return new ContainerServiceFleetUpdateRunResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ContainerServiceFleetUpdateRunData.DeserializeContainerServiceFleetUpdateRunData(document.RootElement); + return new ContainerServiceFleetUpdateRunResource(_client, data); + } + } +} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.Serialization.cs similarity index 83% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.Serialization.cs index 66d71c70d6890..b1e443d2cf7e4 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.Serialization.cs @@ -8,9 +8,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class FleetApiServerAccessProfile : IUtf8JsonSerializable + public partial class ContainerServiceFleetAPIServerAccessProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -33,7 +33,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FleetApiServerAccessProfile DeserializeFleetApiServerAccessProfile(JsonElement element) + internal static ContainerServiceFleetAPIServerAccessProfile DeserializeContainerServiceFleetAPIServerAccessProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -72,7 +72,7 @@ internal static FleetApiServerAccessProfile DeserializeFleetApiServerAccessProfi continue; } } - return new FleetApiServerAccessProfile(Optional.ToNullable(enablePrivateCluster), Optional.ToNullable(enableVnetIntegration), subnetId.Value); + return new ContainerServiceFleetAPIServerAccessProfile(Optional.ToNullable(enablePrivateCluster), Optional.ToNullable(enableVnetIntegration), subnetId.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.cs similarity index 71% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.cs index c6a49dcdc710c..969213df9bab8 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetApiServerAccessProfile.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAPIServerAccessProfile.cs @@ -7,21 +7,21 @@ using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// Access profile for the Fleet hub API server. - public partial class FleetApiServerAccessProfile + public partial class ContainerServiceFleetAPIServerAccessProfile { - /// Initializes a new instance of FleetApiServerAccessProfile. - public FleetApiServerAccessProfile() + /// Initializes a new instance of ContainerServiceFleetAPIServerAccessProfile. + public ContainerServiceFleetAPIServerAccessProfile() { } - /// Initializes a new instance of FleetApiServerAccessProfile. + /// Initializes a new instance of ContainerServiceFleetAPIServerAccessProfile. /// Whether to create the Fleet hub as a private cluster or not. /// Whether to enable apiserver vnet integration for the Fleet hub or not. /// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with BYO vnet. - internal FleetApiServerAccessProfile(bool? enablePrivateCluster, bool? enableVnetIntegration, ResourceIdentifier subnetId) + internal ContainerServiceFleetAPIServerAccessProfile(bool? enablePrivateCluster, bool? enableVnetIntegration, ResourceIdentifier subnetId) { EnablePrivateCluster = enablePrivateCluster; EnableVnetIntegration = enableVnetIntegration; diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.Serialization.cs similarity index 77% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.Serialization.cs index 47979ab8ba4ff..be37ac11227de 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.Serialization.cs @@ -8,9 +8,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - internal partial class FleetAgentProfile : IUtf8JsonSerializable + internal partial class ContainerServiceFleetAgentProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -23,7 +23,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FleetAgentProfile DeserializeFleetAgentProfile(JsonElement element) + internal static ContainerServiceFleetAgentProfile DeserializeContainerServiceFleetAgentProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -42,7 +42,7 @@ internal static FleetAgentProfile DeserializeFleetAgentProfile(JsonElement eleme continue; } } - return new FleetAgentProfile(subnetId.Value); + return new ContainerServiceFleetAgentProfile(subnetId.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.cs similarity index 61% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.cs index a7561af971090..fd6b988cacb61 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetAgentProfile.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetAgentProfile.cs @@ -7,19 +7,19 @@ using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// Agent profile for the Fleet hub. - internal partial class FleetAgentProfile + internal partial class ContainerServiceFleetAgentProfile { - /// Initializes a new instance of FleetAgentProfile. - public FleetAgentProfile() + /// Initializes a new instance of ContainerServiceFleetAgentProfile. + public ContainerServiceFleetAgentProfile() { } - /// Initializes a new instance of FleetAgentProfile. + /// Initializes a new instance of ContainerServiceFleetAgentProfile. /// The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used. - internal FleetAgentProfile(ResourceIdentifier subnetId) + internal ContainerServiceFleetAgentProfile(ResourceIdentifier subnetId) { SubnetId = subnetId; } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetData.Serialization.cs similarity index 92% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetData.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetData.Serialization.cs index 0e112257e018e..96348fb0a67bc 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetData.Serialization.cs @@ -9,12 +9,12 @@ using System.Text.Json; using Azure; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { - public partial class DatabaseFleetData : IUtf8JsonSerializable + public partial class ContainerServiceFleetData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -48,7 +48,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static DatabaseFleetData DeserializeDatabaseFleetData(JsonElement element) + internal static ContainerServiceFleetData DeserializeContainerServiceFleetData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -158,7 +158,7 @@ internal static DatabaseFleetData DeserializeDatabaseFleetData(JsonElement eleme continue; } } - return new DatabaseFleetData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(eTag), identity, Optional.ToNullable(provisioningState), hubProfile.Value); + return new ContainerServiceFleetData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(eTag), identity, Optional.ToNullable(provisioningState), hubProfile.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetListResult.Serialization.cs similarity index 63% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetListResult.Serialization.cs index fb5b785d54bc9..1d9fa56e6361c 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetListResult.Serialization.cs @@ -9,28 +9,28 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.ContainerServiceFleet; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - internal partial class DatabaseFleetListResult + internal partial class ContainerServiceFleetListResult { - internal static DatabaseFleetListResult DeserializeDatabaseFleetListResult(JsonElement element) + internal static ContainerServiceFleetListResult DeserializeContainerServiceFleetListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DatabaseFleetData.DeserializeDatabaseFleetData(item)); + array.Add(ContainerServiceFleetData.DeserializeContainerServiceFleetData(item)); } value = array; continue; @@ -45,7 +45,7 @@ internal static DatabaseFleetListResult DeserializeDatabaseFleetListResult(JsonE continue; } } - return new DatabaseFleetListResult(value, nextLink.Value); + return new ContainerServiceFleetListResult(value, nextLink.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetListResult.cs similarity index 60% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetListResult.cs index f87c68cbc5036..5f70f07d365a2 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetListResult.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetListResult.cs @@ -9,34 +9,34 @@ using System.Collections.Generic; using System.Linq; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.ContainerServiceFleet; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The response of a Fleet list operation. - internal partial class DatabaseFleetListResult + internal partial class ContainerServiceFleetListResult { - /// Initializes a new instance of DatabaseFleetListResult. + /// Initializes a new instance of ContainerServiceFleetListResult. /// The Fleet items on this page. /// is null. - internal DatabaseFleetListResult(IEnumerable value) + internal ContainerServiceFleetListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); Value = value.ToList(); } - /// Initializes a new instance of DatabaseFleetListResult. + /// Initializes a new instance of ContainerServiceFleetListResult. /// The Fleet items on this page. /// The link to the next page of items. - internal DatabaseFleetListResult(IReadOnlyList value, Uri nextLink) + internal ContainerServiceFleetListResult(IReadOnlyList value, Uri nextLink) { Value = value; NextLink = nextLink; } /// The Fleet items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.Serialization.cs similarity index 70% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.Serialization.cs index 689684ce2a204..1e488d57a1b19 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.Serialization.cs @@ -8,9 +8,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class FleetManagedClusterUpdate : IUtf8JsonSerializable + public partial class ContainerServiceFleetManagedClusterUpdate : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,19 +25,19 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FleetManagedClusterUpdate DeserializeFleetManagedClusterUpdate(JsonElement element) + internal static ContainerServiceFleetManagedClusterUpdate DeserializeContainerServiceFleetManagedClusterUpdate(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - FleetManagedClusterUpgradeSpec upgrade = default; + ContainerServiceFleetManagedClusterUpgradeSpec upgrade = default; Optional nodeImageSelection = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("upgrade"u8)) { - upgrade = FleetManagedClusterUpgradeSpec.DeserializeFleetManagedClusterUpgradeSpec(property.Value); + upgrade = ContainerServiceFleetManagedClusterUpgradeSpec.DeserializeContainerServiceFleetManagedClusterUpgradeSpec(property.Value); continue; } if (property.NameEquals("nodeImageSelection"u8)) @@ -50,7 +50,7 @@ internal static FleetManagedClusterUpdate DeserializeFleetManagedClusterUpdate(J continue; } } - return new FleetManagedClusterUpdate(upgrade, nodeImageSelection.Value); + return new ContainerServiceFleetManagedClusterUpdate(upgrade, nodeImageSelection.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.cs similarity index 68% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.cs index 95fe1f4f1345b..2bae10225167b 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpdate.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpdate.cs @@ -8,32 +8,32 @@ using System; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The update to be applied to the ManagedClusters. - public partial class FleetManagedClusterUpdate + public partial class ContainerServiceFleetManagedClusterUpdate { - /// Initializes a new instance of FleetManagedClusterUpdate. + /// Initializes a new instance of ContainerServiceFleetManagedClusterUpdate. /// The upgrade to apply to the ManagedClusters. /// is null. - public FleetManagedClusterUpdate(FleetManagedClusterUpgradeSpec upgrade) + public ContainerServiceFleetManagedClusterUpdate(ContainerServiceFleetManagedClusterUpgradeSpec upgrade) { Argument.AssertNotNull(upgrade, nameof(upgrade)); Upgrade = upgrade; } - /// Initializes a new instance of FleetManagedClusterUpdate. + /// Initializes a new instance of ContainerServiceFleetManagedClusterUpdate. /// The upgrade to apply to the ManagedClusters. /// The node image upgrade to be applied to the target nodes in update run. - internal FleetManagedClusterUpdate(FleetManagedClusterUpgradeSpec upgrade, NodeImageSelection nodeImageSelection) + internal ContainerServiceFleetManagedClusterUpdate(ContainerServiceFleetManagedClusterUpgradeSpec upgrade, NodeImageSelection nodeImageSelection) { Upgrade = upgrade; NodeImageSelection = nodeImageSelection; } /// The upgrade to apply to the ManagedClusters. - public FleetManagedClusterUpgradeSpec Upgrade { get; set; } + public ContainerServiceFleetManagedClusterUpgradeSpec Upgrade { get; set; } /// The node image upgrade to be applied to the target nodes in update run. internal NodeImageSelection NodeImageSelection { get; set; } /// The node image upgrade type. diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.Serialization.cs similarity index 68% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.Serialization.cs index ae22f7849cf7d..0ea6a41d377b3 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.Serialization.cs @@ -8,9 +8,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class FleetManagedClusterUpgradeSpec : IUtf8JsonSerializable + public partial class ContainerServiceFleetManagedClusterUpgradeSpec : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,19 +25,19 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FleetManagedClusterUpgradeSpec DeserializeFleetManagedClusterUpgradeSpec(JsonElement element) + internal static ContainerServiceFleetManagedClusterUpgradeSpec DeserializeContainerServiceFleetManagedClusterUpgradeSpec(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - FleetManagedClusterUpgradeType type = default; + ContainerServiceFleetManagedClusterUpgradeType type = default; Optional kubernetesVersion = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type"u8)) { - type = new FleetManagedClusterUpgradeType(property.Value.GetString()); + type = new ContainerServiceFleetManagedClusterUpgradeType(property.Value.GetString()); continue; } if (property.NameEquals("kubernetesVersion"u8)) @@ -46,7 +46,7 @@ internal static FleetManagedClusterUpgradeSpec DeserializeFleetManagedClusterUpg continue; } } - return new FleetManagedClusterUpgradeSpec(type, kubernetesVersion.Value); + return new ContainerServiceFleetManagedClusterUpgradeSpec(type, kubernetesVersion.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.cs similarity index 65% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.cs index 46701a2e6307f..9143ae03566dd 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeSpec.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeSpec.cs @@ -5,30 +5,30 @@ #nullable disable -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The upgrade to apply to a ManagedCluster. - public partial class FleetManagedClusterUpgradeSpec + public partial class ContainerServiceFleetManagedClusterUpgradeSpec { - /// Initializes a new instance of FleetManagedClusterUpgradeSpec. + /// Initializes a new instance of ContainerServiceFleetManagedClusterUpgradeSpec. /// /// The upgrade type. /// Full requires the KubernetesVersion property to be set. /// NodeImageOnly requires the KubernetesVersion property not to be set. /// - public FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType upgradeType) + public ContainerServiceFleetManagedClusterUpgradeSpec(ContainerServiceFleetManagedClusterUpgradeType upgradeType) { UpgradeType = upgradeType; } - /// Initializes a new instance of FleetManagedClusterUpgradeSpec. + /// Initializes a new instance of ContainerServiceFleetManagedClusterUpgradeSpec. /// /// The upgrade type. /// Full requires the KubernetesVersion property to be set. /// NodeImageOnly requires the KubernetesVersion property not to be set. /// /// The Kubernetes version to upgrade the member clusters to. - internal FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType upgradeType, string kubernetesVersion) + internal ContainerServiceFleetManagedClusterUpgradeSpec(ContainerServiceFleetManagedClusterUpgradeType upgradeType, string kubernetesVersion) { UpgradeType = upgradeType; KubernetesVersion = kubernetesVersion; @@ -39,7 +39,7 @@ internal FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType upgradeTy /// Full requires the KubernetesVersion property to be set. /// NodeImageOnly requires the KubernetesVersion property not to be set. /// - public FleetManagedClusterUpgradeType UpgradeType { get; set; } + public ContainerServiceFleetManagedClusterUpgradeType UpgradeType { get; set; } /// The Kubernetes version to upgrade the member clusters to. public string KubernetesVersion { get; set; } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeType.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeType.cs new file mode 100644 index 0000000000000..1969334c9b681 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetManagedClusterUpgradeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The type of upgrade to perform when targeting ManagedClusters. + public readonly partial struct ContainerServiceFleetManagedClusterUpgradeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerServiceFleetManagedClusterUpgradeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FullValue = "Full"; + private const string NodeImageOnlyValue = "NodeImageOnly"; + + /// Full upgrades the control plane and all agent pools of the target ManagedClusters. + public static ContainerServiceFleetManagedClusterUpgradeType Full { get; } = new ContainerServiceFleetManagedClusterUpgradeType(FullValue); + /// NodeImageOnly upgrades only the node images of the target ManagedClusters. + public static ContainerServiceFleetManagedClusterUpgradeType NodeImageOnly { get; } = new ContainerServiceFleetManagedClusterUpgradeType(NodeImageOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerServiceFleetManagedClusterUpgradeType left, ContainerServiceFleetManagedClusterUpgradeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerServiceFleetManagedClusterUpgradeType left, ContainerServiceFleetManagedClusterUpgradeType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerServiceFleetManagedClusterUpgradeType(string value) => new ContainerServiceFleetManagedClusterUpgradeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerServiceFleetManagedClusterUpgradeType other && Equals(other); + /// + public bool Equals(ContainerServiceFleetManagedClusterUpgradeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberData.Serialization.cs similarity index 89% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberData.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberData.Serialization.cs index 3b4a63c010876..b6528407f336b 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberData.Serialization.cs @@ -8,12 +8,12 @@ using System.Text.Json; using Azure; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { - public partial class DatabaseFleetMemberData : IUtf8JsonSerializable + public partial class ContainerServiceFleetMemberData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -34,7 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static DatabaseFleetMemberData DeserializeDatabaseFleetMemberData(JsonElement element) + internal static ContainerServiceFleetMemberData DeserializeContainerServiceFleetMemberData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -119,7 +119,7 @@ internal static DatabaseFleetMemberData DeserializeDatabaseFleetMemberData(JsonE continue; } } - return new DatabaseFleetMemberData(id, name, type, systemData.Value, Optional.ToNullable(eTag), clusterResourceId.Value, group.Value, Optional.ToNullable(provisioningState)); + return new ContainerServiceFleetMemberData(id, name, type, systemData.Value, Optional.ToNullable(eTag), clusterResourceId.Value, group.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberListResult.Serialization.cs similarity index 61% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberListResult.Serialization.cs index cac46b02ec618..42ed310e44ad8 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberListResult.Serialization.cs @@ -9,28 +9,28 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.ContainerServiceFleet; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - internal partial class DatabaseFleetMemberListResult + internal partial class ContainerServiceFleetMemberListResult { - internal static DatabaseFleetMemberListResult DeserializeDatabaseFleetMemberListResult(JsonElement element) + internal static ContainerServiceFleetMemberListResult DeserializeContainerServiceFleetMemberListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(item)); + array.Add(ContainerServiceFleetMemberData.DeserializeContainerServiceFleetMemberData(item)); } value = array; continue; @@ -45,7 +45,7 @@ internal static DatabaseFleetMemberListResult DeserializeDatabaseFleetMemberList continue; } } - return new DatabaseFleetMemberListResult(value, nextLink.Value); + return new ContainerServiceFleetMemberListResult(value, nextLink.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberListResult.cs similarity index 59% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberListResult.cs index 5f72f3dee3f85..2cfc5bf84dc78 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberListResult.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberListResult.cs @@ -9,34 +9,34 @@ using System.Collections.Generic; using System.Linq; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.ContainerServiceFleet; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The response of a FleetMember list operation. - internal partial class DatabaseFleetMemberListResult + internal partial class ContainerServiceFleetMemberListResult { - /// Initializes a new instance of DatabaseFleetMemberListResult. + /// Initializes a new instance of ContainerServiceFleetMemberListResult. /// The FleetMember items on this page. /// is null. - internal DatabaseFleetMemberListResult(IEnumerable value) + internal ContainerServiceFleetMemberListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); Value = value.ToList(); } - /// Initializes a new instance of DatabaseFleetMemberListResult. + /// Initializes a new instance of ContainerServiceFleetMemberListResult. /// The FleetMember items on this page. /// The link to the next page of items. - internal DatabaseFleetMemberListResult(IReadOnlyList value, Uri nextLink) + internal ContainerServiceFleetMemberListResult(IReadOnlyList value, Uri nextLink) { Value = value; NextLink = nextLink; } /// The FleetMember items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberPatch.Serialization.cs similarity index 82% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberPatch.Serialization.cs index 2643648a61720..6132b91320839 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberPatch.Serialization.cs @@ -8,9 +8,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class DatabaseFleetMemberPatch : IUtf8JsonSerializable + public partial class ContainerServiceFleetMemberPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberPatch.cs similarity index 60% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberPatch.cs index 050e7800e9f57..75b1010044b55 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetMemberPatch.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetMemberPatch.cs @@ -5,13 +5,13 @@ #nullable disable -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The type used for update operations of the FleetMember. - public partial class DatabaseFleetMemberPatch + public partial class ContainerServiceFleetMemberPatch { - /// Initializes a new instance of DatabaseFleetMemberPatch. - public DatabaseFleetMemberPatch() + /// Initializes a new instance of ContainerServiceFleetMemberPatch. + public ContainerServiceFleetMemberPatch() { } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetPatch.Serialization.cs similarity index 87% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetPatch.Serialization.cs index 19ce4caa75c66..d57bc155ce535 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetPatch.Serialization.cs @@ -8,9 +8,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class DatabaseFleetPatch : IUtf8JsonSerializable + public partial class ContainerServiceFleetPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetPatch.cs similarity index 71% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetPatch.cs index f71f160cd99da..768ca800579d9 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetPatch.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetPatch.cs @@ -9,13 +9,13 @@ using Azure.Core; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// Properties of a Fleet that can be patched. - public partial class DatabaseFleetPatch + public partial class ContainerServiceFleetPatch { - /// Initializes a new instance of DatabaseFleetPatch. - public DatabaseFleetPatch() + /// Initializes a new instance of ContainerServiceFleetPatch. + public ContainerServiceFleetPatch() { Tags = new ChangeTrackingDictionary(); } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroup.Serialization.cs similarity index 72% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroup.Serialization.cs index 1a55c3ec47a0d..b627aa4f13e3a 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroup.Serialization.cs @@ -8,9 +8,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class FleetUpdateGroup : IUtf8JsonSerializable + public partial class ContainerServiceFleetUpdateGroup : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,7 +20,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FleetUpdateGroup DeserializeFleetUpdateGroup(JsonElement element) + internal static ContainerServiceFleetUpdateGroup DeserializeContainerServiceFleetUpdateGroup(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -35,7 +35,7 @@ internal static FleetUpdateGroup DeserializeFleetUpdateGroup(JsonElement element continue; } } - return new FleetUpdateGroup(name); + return new ContainerServiceFleetUpdateGroup(name); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroup.cs similarity index 78% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroup.cs index 9229b13171a3b..d34ad791886d4 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroup.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroup.cs @@ -8,19 +8,19 @@ using System; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// A group to be updated. - public partial class FleetUpdateGroup + public partial class ContainerServiceFleetUpdateGroup { - /// Initializes a new instance of FleetUpdateGroup. + /// Initializes a new instance of ContainerServiceFleetUpdateGroup. /// /// The name of the Fleet member group to update. /// It should match the name of an existing FleetMember group. /// A group can only appear once across all UpdateStages in the UpdateRun. /// /// is null. - public FleetUpdateGroup(string name) + public ContainerServiceFleetUpdateGroup(string name) { Argument.AssertNotNull(name, nameof(name)); diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroupStatus.Serialization.cs similarity index 73% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroupStatus.Serialization.cs index fa3e123a694d7..23508a5105ae5 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroupStatus.Serialization.cs @@ -9,17 +9,17 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class FleetUpdateGroupStatus + public partial class ContainerServiceFleetUpdateGroupStatus { - internal static FleetUpdateGroupStatus DeserializeFleetUpdateGroupStatus(JsonElement element) + internal static ContainerServiceFleetUpdateGroupStatus DeserializeContainerServiceFleetUpdateGroupStatus(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional status = default; + Optional status = default; Optional name = default; Optional> members = default; foreach (var property in element.EnumerateObject()) @@ -30,7 +30,7 @@ internal static FleetUpdateGroupStatus DeserializeFleetUpdateGroupStatus(JsonEle { continue; } - status = FleetUpdateOperationStatus.DeserializeFleetUpdateOperationStatus(property.Value); + status = ContainerServiceFleetUpdateStatus.DeserializeContainerServiceFleetUpdateStatus(property.Value); continue; } if (property.NameEquals("name"u8)) @@ -53,7 +53,7 @@ internal static FleetUpdateGroupStatus DeserializeFleetUpdateGroupStatus(JsonEle continue; } } - return new FleetUpdateGroupStatus(status.Value, name.Value, Optional.ToList(members)); + return new ContainerServiceFleetUpdateGroupStatus(status.Value, name.Value, Optional.ToList(members)); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroupStatus.cs similarity index 62% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroupStatus.cs index d09a755b0412f..07cf84b0cf151 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateGroupStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateGroupStatus.cs @@ -8,22 +8,22 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The status of a UpdateGroup. - public partial class FleetUpdateGroupStatus + public partial class ContainerServiceFleetUpdateGroupStatus { - /// Initializes a new instance of FleetUpdateGroupStatus. - internal FleetUpdateGroupStatus() + /// Initializes a new instance of ContainerServiceFleetUpdateGroupStatus. + internal ContainerServiceFleetUpdateGroupStatus() { Members = new ChangeTrackingList(); } - /// Initializes a new instance of FleetUpdateGroupStatus. + /// Initializes a new instance of ContainerServiceFleetUpdateGroupStatus. /// The status of the UpdateGroup. /// The name of the UpdateGroup. /// The list of member this UpdateGroup updates. - internal FleetUpdateGroupStatus(FleetUpdateOperationStatus status, string name, IReadOnlyList members) + internal ContainerServiceFleetUpdateGroupStatus(ContainerServiceFleetUpdateStatus status, string name, IReadOnlyList members) { Status = status; Name = name; @@ -31,7 +31,7 @@ internal FleetUpdateGroupStatus(FleetUpdateOperationStatus status, string name, } /// The status of the UpdateGroup. - public FleetUpdateOperationStatus Status { get; } + public ContainerServiceFleetUpdateStatus Status { get; } /// The name of the UpdateGroup. public string Name { get; } /// The list of member this UpdateGroup updates. diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunData.Serialization.cs similarity index 75% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunData.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunData.Serialization.cs index ac086cb4daf29..0b4100e147908 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunData.Serialization.cs @@ -8,12 +8,12 @@ using System.Text.Json; using Azure; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { - public partial class DatabaseFleetUpdateRunData : IUtf8JsonSerializable + public partial class ContainerServiceFleetUpdateRunData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -34,7 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static DatabaseFleetUpdateRunData DeserializeDatabaseFleetUpdateRunData(JsonElement element) + internal static ContainerServiceFleetUpdateRunData DeserializeContainerServiceFleetUpdateRunData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -45,10 +45,10 @@ internal static DatabaseFleetUpdateRunData DeserializeDatabaseFleetUpdateRunData string name = default; ResourceType type = default; Optional systemData = default; - Optional provisioningState = default; - Optional strategy = default; - Optional managedClusterUpdate = default; - Optional status = default; + Optional provisioningState = default; + Optional strategy = default; + Optional managedClusterUpdate = default; + Optional status = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("eTag"u8)) @@ -99,7 +99,7 @@ internal static DatabaseFleetUpdateRunData DeserializeDatabaseFleetUpdateRunData { continue; } - provisioningState = new FleetUpdateRunProvisioningState(property0.Value.GetString()); + provisioningState = new ContainerServiceFleetUpdateRunProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("strategy"u8)) @@ -108,7 +108,7 @@ internal static DatabaseFleetUpdateRunData DeserializeDatabaseFleetUpdateRunData { continue; } - strategy = FleetUpdateRunStrategy.DeserializeFleetUpdateRunStrategy(property0.Value); + strategy = ContainerServiceFleetUpdateRunStrategy.DeserializeContainerServiceFleetUpdateRunStrategy(property0.Value); continue; } if (property0.NameEquals("managedClusterUpdate"u8)) @@ -117,7 +117,7 @@ internal static DatabaseFleetUpdateRunData DeserializeDatabaseFleetUpdateRunData { continue; } - managedClusterUpdate = FleetManagedClusterUpdate.DeserializeFleetManagedClusterUpdate(property0.Value); + managedClusterUpdate = ContainerServiceFleetManagedClusterUpdate.DeserializeContainerServiceFleetManagedClusterUpdate(property0.Value); continue; } if (property0.NameEquals("status"u8)) @@ -126,14 +126,14 @@ internal static DatabaseFleetUpdateRunData DeserializeDatabaseFleetUpdateRunData { continue; } - status = FleetUpdateRunStatus.DeserializeFleetUpdateRunStatus(property0.Value); + status = ContainerServiceFleetUpdateRunStatus.DeserializeContainerServiceFleetUpdateRunStatus(property0.Value); continue; } } continue; } } - return new DatabaseFleetUpdateRunData(id, name, type, systemData.Value, Optional.ToNullable(eTag), Optional.ToNullable(provisioningState), strategy.Value, managedClusterUpdate.Value, status.Value); + return new ContainerServiceFleetUpdateRunData(id, name, type, systemData.Value, Optional.ToNullable(eTag), Optional.ToNullable(provisioningState), strategy.Value, managedClusterUpdate.Value, status.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunListResult.Serialization.cs similarity index 60% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunListResult.Serialization.cs index 8159698fd7e9c..2ceb6f6dc96bd 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunListResult.Serialization.cs @@ -9,28 +9,28 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.ContainerServiceFleet; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - internal partial class DatabaseFleetUpdateRunListResult + internal partial class ContainerServiceFleetUpdateRunListResult { - internal static DatabaseFleetUpdateRunListResult DeserializeDatabaseFleetUpdateRunListResult(JsonElement element) + internal static ContainerServiceFleetUpdateRunListResult DeserializeContainerServiceFleetUpdateRunListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(item)); + array.Add(ContainerServiceFleetUpdateRunData.DeserializeContainerServiceFleetUpdateRunData(item)); } value = array; continue; @@ -45,7 +45,7 @@ internal static DatabaseFleetUpdateRunListResult DeserializeDatabaseFleetUpdateR continue; } } - return new DatabaseFleetUpdateRunListResult(value, nextLink.Value); + return new ContainerServiceFleetUpdateRunListResult(value, nextLink.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunListResult.cs similarity index 58% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunListResult.cs index 7020492252cea..3f43cf6592bcc 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseFleetUpdateRunListResult.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunListResult.cs @@ -9,34 +9,34 @@ using System.Collections.Generic; using System.Linq; using Azure.Core; -using Azure.ResourceManager.DatabaseFleetManager; +using Azure.ResourceManager.ContainerServiceFleet; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The response of a UpdateRun list operation. - internal partial class DatabaseFleetUpdateRunListResult + internal partial class ContainerServiceFleetUpdateRunListResult { - /// Initializes a new instance of DatabaseFleetUpdateRunListResult. + /// Initializes a new instance of ContainerServiceFleetUpdateRunListResult. /// The UpdateRun items on this page. /// is null. - internal DatabaseFleetUpdateRunListResult(IEnumerable value) + internal ContainerServiceFleetUpdateRunListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); Value = value.ToList(); } - /// Initializes a new instance of DatabaseFleetUpdateRunListResult. + /// Initializes a new instance of ContainerServiceFleetUpdateRunListResult. /// The UpdateRun items on this page. /// The link to the next page of items. - internal DatabaseFleetUpdateRunListResult(IReadOnlyList value, Uri nextLink) + internal ContainerServiceFleetUpdateRunListResult(IReadOnlyList value, Uri nextLink) { Value = value; NextLink = nextLink; } /// The UpdateRun items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunProvisioningState.cs new file mode 100644 index 0000000000000..571dd27d14db2 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The provisioning state of the UpdateRun resource. + public readonly partial struct ContainerServiceFleetUpdateRunProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerServiceFleetUpdateRunProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static ContainerServiceFleetUpdateRunProvisioningState Succeeded { get; } = new ContainerServiceFleetUpdateRunProvisioningState(SucceededValue); + /// Resource creation failed. + public static ContainerServiceFleetUpdateRunProvisioningState Failed { get; } = new ContainerServiceFleetUpdateRunProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ContainerServiceFleetUpdateRunProvisioningState Canceled { get; } = new ContainerServiceFleetUpdateRunProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerServiceFleetUpdateRunProvisioningState left, ContainerServiceFleetUpdateRunProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerServiceFleetUpdateRunProvisioningState left, ContainerServiceFleetUpdateRunProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerServiceFleetUpdateRunProvisioningState(string value) => new ContainerServiceFleetUpdateRunProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerServiceFleetUpdateRunProvisioningState other && Equals(other); + /// + public bool Equals(ContainerServiceFleetUpdateRunProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStatus.Serialization.cs similarity index 63% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStatus.Serialization.cs index 6425cff140efb..c83bb369be773 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStatus.Serialization.cs @@ -9,18 +9,18 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class FleetUpdateRunStatus + public partial class ContainerServiceFleetUpdateRunStatus { - internal static FleetUpdateRunStatus DeserializeFleetUpdateRunStatus(JsonElement element) + internal static ContainerServiceFleetUpdateRunStatus DeserializeContainerServiceFleetUpdateRunStatus(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional status = default; - Optional> stages = default; + Optional status = default; + Optional> stages = default; Optional nodeImageSelection = default; foreach (var property in element.EnumerateObject()) { @@ -30,7 +30,7 @@ internal static FleetUpdateRunStatus DeserializeFleetUpdateRunStatus(JsonElement { continue; } - status = FleetUpdateOperationStatus.DeserializeFleetUpdateOperationStatus(property.Value); + status = ContainerServiceFleetUpdateStatus.DeserializeContainerServiceFleetUpdateStatus(property.Value); continue; } if (property.NameEquals("stages"u8)) @@ -39,10 +39,10 @@ internal static FleetUpdateRunStatus DeserializeFleetUpdateRunStatus(JsonElement { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FleetUpdateStageStatus.DeserializeFleetUpdateStageStatus(item)); + array.Add(ContainerServiceFleetUpdateStageStatus.DeserializeContainerServiceFleetUpdateStageStatus(item)); } stages = array; continue; @@ -57,7 +57,7 @@ internal static FleetUpdateRunStatus DeserializeFleetUpdateRunStatus(JsonElement continue; } } - return new FleetUpdateRunStatus(status.Value, Optional.ToList(stages), nodeImageSelection.Value); + return new ContainerServiceFleetUpdateRunStatus(status.Value, Optional.ToList(stages), nodeImageSelection.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStatus.cs similarity index 63% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStatus.cs index 54ab14bd3cf32..b00863d598e78 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStatus.cs @@ -8,22 +8,22 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The status of a UpdateRun. - public partial class FleetUpdateRunStatus + public partial class ContainerServiceFleetUpdateRunStatus { - /// Initializes a new instance of FleetUpdateRunStatus. - internal FleetUpdateRunStatus() + /// Initializes a new instance of ContainerServiceFleetUpdateRunStatus. + internal ContainerServiceFleetUpdateRunStatus() { - Stages = new ChangeTrackingList(); + Stages = new ChangeTrackingList(); } - /// Initializes a new instance of FleetUpdateRunStatus. + /// Initializes a new instance of ContainerServiceFleetUpdateRunStatus. /// The status of the UpdateRun. /// The stages composing an update run. Stages are run sequentially withing an UpdateRun. /// The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is `Consistent`. - internal FleetUpdateRunStatus(FleetUpdateOperationStatus status, IReadOnlyList stages, NodeImageSelectionStatus nodeImageSelection) + internal ContainerServiceFleetUpdateRunStatus(ContainerServiceFleetUpdateStatus status, IReadOnlyList stages, NodeImageSelectionStatus nodeImageSelection) { Status = status; Stages = stages; @@ -31,9 +31,9 @@ internal FleetUpdateRunStatus(FleetUpdateOperationStatus status, IReadOnlyList The status of the UpdateRun. - public FleetUpdateOperationStatus Status { get; } + public ContainerServiceFleetUpdateStatus Status { get; } /// The stages composing an update run. Stages are run sequentially withing an UpdateRun. - public IReadOnlyList Stages { get; } + public IReadOnlyList Stages { get; } /// The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is `Consistent`. internal NodeImageSelectionStatus NodeImageSelection { get; } /// The image versions to upgrade the nodes to. diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStrategy.Serialization.cs similarity index 63% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStrategy.Serialization.cs index 89370aa3cb9e9..5b461e73f01ad 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStrategy.Serialization.cs @@ -9,9 +9,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - internal partial class FleetUpdateRunStrategy : IUtf8JsonSerializable + internal partial class ContainerServiceFleetUpdateRunStrategy : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -26,27 +26,27 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FleetUpdateRunStrategy DeserializeFleetUpdateRunStrategy(JsonElement element) + internal static ContainerServiceFleetUpdateRunStrategy DeserializeContainerServiceFleetUpdateRunStrategy(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList stages = default; + IList stages = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("stages"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FleetUpdateStage.DeserializeFleetUpdateStage(item)); + array.Add(ContainerServiceFleetUpdateStage.DeserializeContainerServiceFleetUpdateStage(item)); } stages = array; continue; } } - return new FleetUpdateRunStrategy(stages); + return new ContainerServiceFleetUpdateRunStrategy(stages); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStrategy.cs similarity index 59% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStrategy.cs index e9df241ad67ab..1a9c600ec3826 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunStrategy.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateRunStrategy.cs @@ -10,29 +10,29 @@ using System.Linq; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The UpdateRunStrategy configures the sequence of Stages and Groups in which the clusters will be updated. - internal partial class FleetUpdateRunStrategy + internal partial class ContainerServiceFleetUpdateRunStrategy { - /// Initializes a new instance of FleetUpdateRunStrategy. + /// Initializes a new instance of ContainerServiceFleetUpdateRunStrategy. /// The list of stages that compose this update run. /// is null. - public FleetUpdateRunStrategy(IEnumerable stages) + public ContainerServiceFleetUpdateRunStrategy(IEnumerable stages) { Argument.AssertNotNull(stages, nameof(stages)); Stages = stages.ToList(); } - /// Initializes a new instance of FleetUpdateRunStrategy. + /// Initializes a new instance of ContainerServiceFleetUpdateRunStrategy. /// The list of stages that compose this update run. - internal FleetUpdateRunStrategy(IList stages) + internal ContainerServiceFleetUpdateRunStrategy(IList stages) { Stages = stages; } /// The list of stages that compose this update run. - public IList Stages { get; } + public IList Stages { get; } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStage.Serialization.cs similarity index 76% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStage.Serialization.cs index cc9e9445cfe7c..70537f76887ee 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStage.Serialization.cs @@ -9,9 +9,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class FleetUpdateStage : IUtf8JsonSerializable + public partial class ContainerServiceFleetUpdateStage : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -36,14 +36,14 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FleetUpdateStage DeserializeFleetUpdateStage(JsonElement element) + internal static ContainerServiceFleetUpdateStage DeserializeContainerServiceFleetUpdateStage(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } string name = default; - Optional> groups = default; + Optional> groups = default; Optional afterStageWaitInSeconds = default; foreach (var property in element.EnumerateObject()) { @@ -58,10 +58,10 @@ internal static FleetUpdateStage DeserializeFleetUpdateStage(JsonElement element { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FleetUpdateGroup.DeserializeFleetUpdateGroup(item)); + array.Add(ContainerServiceFleetUpdateGroup.DeserializeContainerServiceFleetUpdateGroup(item)); } groups = array; continue; @@ -76,7 +76,7 @@ internal static FleetUpdateStage DeserializeFleetUpdateStage(JsonElement element continue; } } - return new FleetUpdateStage(name, Optional.ToList(groups), Optional.ToNullable(afterStageWaitInSeconds)); + return new ContainerServiceFleetUpdateStage(name, Optional.ToList(groups), Optional.ToNullable(afterStageWaitInSeconds)); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStage.cs similarity index 76% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStage.cs index 7fab2c88d260d..12cbc250cc887 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStage.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStage.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// /// Contains the groups to be updated by an UpdateRun. @@ -18,27 +18,27 @@ namespace Azure.ResourceManager.DatabaseFleetManager.Models /// - Parallel within a stage: Groups within a stage run in parallel. /// - Sequential within a group: Clusters within a group are updated sequentially. /// - public partial class FleetUpdateStage + public partial class ContainerServiceFleetUpdateStage { - /// Initializes a new instance of FleetUpdateStage. + /// Initializes a new instance of ContainerServiceFleetUpdateStage. /// The name of the stage. Must be unique within the UpdateRun. /// is null. - public FleetUpdateStage(string name) + public ContainerServiceFleetUpdateStage(string name) { Argument.AssertNotNull(name, nameof(name)); Name = name; - Groups = new ChangeTrackingList(); + Groups = new ChangeTrackingList(); } - /// Initializes a new instance of FleetUpdateStage. + /// Initializes a new instance of ContainerServiceFleetUpdateStage. /// The name of the stage. Must be unique within the UpdateRun. /// /// A list of group names that compose the stage. /// The groups will be updated in parallel. Each group name can only appear once in the UpdateRun. /// /// The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified. - internal FleetUpdateStage(string name, IList groups, int? afterStageWaitInSeconds) + internal ContainerServiceFleetUpdateStage(string name, IList groups, int? afterStageWaitInSeconds) { Name = name; Groups = groups; @@ -51,7 +51,7 @@ internal FleetUpdateStage(string name, IList groups, int? afte /// A list of group names that compose the stage. /// The groups will be updated in parallel. Each group name can only appear once in the UpdateRun. /// - public IList Groups { get; } + public IList Groups { get; } /// The time in seconds to wait at the end of this stage before starting the next one. Defaults to 0 seconds if unspecified. public int? AfterStageWaitInSeconds { get; set; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStageStatus.Serialization.cs similarity index 58% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStageStatus.Serialization.cs index b2377f6b18215..8f28ed7a93153 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStageStatus.Serialization.cs @@ -9,20 +9,20 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class FleetUpdateStageStatus + public partial class ContainerServiceFleetUpdateStageStatus { - internal static FleetUpdateStageStatus DeserializeFleetUpdateStageStatus(JsonElement element) + internal static ContainerServiceFleetUpdateStageStatus DeserializeContainerServiceFleetUpdateStageStatus(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional status = default; + Optional status = default; Optional name = default; - Optional> groups = default; - Optional afterStageWaitStatus = default; + Optional> groups = default; + Optional afterStageWaitStatus = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("status"u8)) @@ -31,7 +31,7 @@ internal static FleetUpdateStageStatus DeserializeFleetUpdateStageStatus(JsonEle { continue; } - status = FleetUpdateOperationStatus.DeserializeFleetUpdateOperationStatus(property.Value); + status = ContainerServiceFleetUpdateStatus.DeserializeContainerServiceFleetUpdateStatus(property.Value); continue; } if (property.NameEquals("name"u8)) @@ -45,10 +45,10 @@ internal static FleetUpdateStageStatus DeserializeFleetUpdateStageStatus(JsonEle { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FleetUpdateGroupStatus.DeserializeFleetUpdateGroupStatus(item)); + array.Add(ContainerServiceFleetUpdateGroupStatus.DeserializeContainerServiceFleetUpdateGroupStatus(item)); } groups = array; continue; @@ -59,11 +59,11 @@ internal static FleetUpdateStageStatus DeserializeFleetUpdateStageStatus(JsonEle { continue; } - afterStageWaitStatus = FleetWaitStatus.DeserializeFleetWaitStatus(property.Value); + afterStageWaitStatus = ContainerServiceFleetWaitStatus.DeserializeContainerServiceFleetWaitStatus(property.Value); continue; } } - return new FleetUpdateStageStatus(status.Value, name.Value, Optional.ToList(groups), afterStageWaitStatus.Value); + return new ContainerServiceFleetUpdateStageStatus(status.Value, name.Value, Optional.ToList(groups), afterStageWaitStatus.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStageStatus.cs similarity index 55% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStageStatus.cs index fd5269182ee02..8afd6f4b758d4 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateStageStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStageStatus.cs @@ -8,23 +8,23 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The status of a UpdateStage. - public partial class FleetUpdateStageStatus + public partial class ContainerServiceFleetUpdateStageStatus { - /// Initializes a new instance of FleetUpdateStageStatus. - internal FleetUpdateStageStatus() + /// Initializes a new instance of ContainerServiceFleetUpdateStageStatus. + internal ContainerServiceFleetUpdateStageStatus() { - Groups = new ChangeTrackingList(); + Groups = new ChangeTrackingList(); } - /// Initializes a new instance of FleetUpdateStageStatus. + /// Initializes a new instance of ContainerServiceFleetUpdateStageStatus. /// The status of the UpdateStage. /// The name of the UpdateStage. /// The list of groups to be updated as part of this UpdateStage. /// The status of the wait period configured on the UpdateStage. - internal FleetUpdateStageStatus(FleetUpdateOperationStatus status, string name, IReadOnlyList groups, FleetWaitStatus afterStageWaitStatus) + internal ContainerServiceFleetUpdateStageStatus(ContainerServiceFleetUpdateStatus status, string name, IReadOnlyList groups, ContainerServiceFleetWaitStatus afterStageWaitStatus) { Status = status; Name = name; @@ -33,12 +33,12 @@ internal FleetUpdateStageStatus(FleetUpdateOperationStatus status, string name, } /// The status of the UpdateStage. - public FleetUpdateOperationStatus Status { get; } + public ContainerServiceFleetUpdateStatus Status { get; } /// The name of the UpdateStage. public string Name { get; } /// The list of groups to be updated as part of this UpdateStage. - public IReadOnlyList Groups { get; } + public IReadOnlyList Groups { get; } /// The status of the wait period configured on the UpdateStage. - public FleetWaitStatus AfterStageWaitStatus { get; } + public ContainerServiceFleetWaitStatus AfterStageWaitStatus { get; } } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateState.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateState.cs new file mode 100644 index 0000000000000..38b776536bbf5 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate. + public readonly partial struct ContainerServiceFleetUpdateState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerServiceFleetUpdateState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "NotStarted"; + private const string RunningValue = "Running"; + private const string StoppingValue = "Stopping"; + private const string StoppedValue = "Stopped"; + private const string SkippedValue = "Skipped"; + private const string FailedValue = "Failed"; + private const string CompletedValue = "Completed"; + + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has not been started. + public static ContainerServiceFleetUpdateState NotStarted { get; } = new ContainerServiceFleetUpdateState(NotStartedValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is running. + public static ContainerServiceFleetUpdateState Running { get; } = new ContainerServiceFleetUpdateState(RunningValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is being stopped. + public static ContainerServiceFleetUpdateState Stopping { get; } = new ContainerServiceFleetUpdateState(StoppingValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has stopped. + public static ContainerServiceFleetUpdateState Stopped { get; } = new ContainerServiceFleetUpdateState(StoppedValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has been skipped. + public static ContainerServiceFleetUpdateState Skipped { get; } = new ContainerServiceFleetUpdateState(SkippedValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has failed. + public static ContainerServiceFleetUpdateState Failed { get; } = new ContainerServiceFleetUpdateState(FailedValue); + /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has completed. + public static ContainerServiceFleetUpdateState Completed { get; } = new ContainerServiceFleetUpdateState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerServiceFleetUpdateState left, ContainerServiceFleetUpdateState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerServiceFleetUpdateState left, ContainerServiceFleetUpdateState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerServiceFleetUpdateState(string value) => new ContainerServiceFleetUpdateState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerServiceFleetUpdateState other && Equals(other); + /// + public bool Equals(ContainerServiceFleetUpdateState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStatus.Serialization.cs similarity index 77% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStatus.Serialization.cs index 53a0b93323311..336fe9fde2dcc 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStatus.Serialization.cs @@ -10,11 +10,11 @@ using Azure; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class FleetUpdateOperationStatus + public partial class ContainerServiceFleetUpdateStatus { - internal static FleetUpdateOperationStatus DeserializeFleetUpdateOperationStatus(JsonElement element) + internal static ContainerServiceFleetUpdateStatus DeserializeContainerServiceFleetUpdateStatus(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -22,7 +22,7 @@ internal static FleetUpdateOperationStatus DeserializeFleetUpdateOperationStatus } Optional startTime = default; Optional completedTime = default; - Optional state = default; + Optional state = default; Optional error = default; foreach (var property in element.EnumerateObject()) { @@ -50,7 +50,7 @@ internal static FleetUpdateOperationStatus DeserializeFleetUpdateOperationStatus { continue; } - state = new FleetUpdateState(property.Value.GetString()); + state = new ContainerServiceFleetUpdateState(property.Value.GetString()); continue; } if (property.NameEquals("error"u8)) @@ -63,7 +63,7 @@ internal static FleetUpdateOperationStatus DeserializeFleetUpdateOperationStatus continue; } } - return new FleetUpdateOperationStatus(Optional.ToNullable(startTime), Optional.ToNullable(completedTime), Optional.ToNullable(state), error.Value); + return new ContainerServiceFleetUpdateStatus(Optional.ToNullable(startTime), Optional.ToNullable(completedTime), Optional.ToNullable(state), error.Value); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStatus.cs similarity index 67% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStatus.cs index 2d5015dc934cd..623742604ab95 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateOperationStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpdateStatus.cs @@ -8,22 +8,22 @@ using System; using Azure; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The status for an operation or group of operations. - public partial class FleetUpdateOperationStatus + public partial class ContainerServiceFleetUpdateStatus { - /// Initializes a new instance of FleetUpdateOperationStatus. - internal FleetUpdateOperationStatus() + /// Initializes a new instance of ContainerServiceFleetUpdateStatus. + internal ContainerServiceFleetUpdateStatus() { } - /// Initializes a new instance of FleetUpdateOperationStatus. + /// Initializes a new instance of ContainerServiceFleetUpdateStatus. /// The time the operation or group was started. /// The time the operation or group was completed. /// The State of the operation or group. /// The error details when a failure is encountered. - internal FleetUpdateOperationStatus(DateTimeOffset? startOn, DateTimeOffset? completedOn, FleetUpdateState? state, ResponseError error) + internal ContainerServiceFleetUpdateStatus(DateTimeOffset? startOn, DateTimeOffset? completedOn, ContainerServiceFleetUpdateState? state, ResponseError error) { StartOn = startOn; CompletedOn = completedOn; @@ -36,7 +36,7 @@ internal FleetUpdateOperationStatus(DateTimeOffset? startOn, DateTimeOffset? com /// The time the operation or group was completed. public DateTimeOffset? CompletedOn { get; } /// The State of the operation or group. - public FleetUpdateState? State { get; } + public ContainerServiceFleetUpdateState? State { get; } /// The error details when a failure is encountered. public ResponseError Error { get; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetWaitStatus.Serialization.cs similarity index 66% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetWaitStatus.Serialization.cs index 2dd7941b80573..e38bd7fe501bb 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetWaitStatus.Serialization.cs @@ -8,17 +8,17 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class FleetWaitStatus + public partial class ContainerServiceFleetWaitStatus { - internal static FleetWaitStatus DeserializeFleetWaitStatus(JsonElement element) + internal static ContainerServiceFleetWaitStatus DeserializeContainerServiceFleetWaitStatus(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional status = default; + Optional status = default; Optional waitDurationInSeconds = default; foreach (var property in element.EnumerateObject()) { @@ -28,7 +28,7 @@ internal static FleetWaitStatus DeserializeFleetWaitStatus(JsonElement element) { continue; } - status = FleetUpdateOperationStatus.DeserializeFleetUpdateOperationStatus(property.Value); + status = ContainerServiceFleetUpdateStatus.DeserializeContainerServiceFleetUpdateStatus(property.Value); continue; } if (property.NameEquals("waitDurationInSeconds"u8)) @@ -41,7 +41,7 @@ internal static FleetWaitStatus DeserializeFleetWaitStatus(JsonElement element) continue; } } - return new FleetWaitStatus(status.Value, Optional.ToNullable(waitDurationInSeconds)); + return new ContainerServiceFleetWaitStatus(status.Value, Optional.ToNullable(waitDurationInSeconds)); } } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetWaitStatus.cs similarity index 56% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetWaitStatus.cs index 2243516765ec9..c40d10141f924 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetWaitStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetWaitStatus.cs @@ -5,27 +5,27 @@ #nullable disable -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The status of the wait duration. - public partial class FleetWaitStatus + public partial class ContainerServiceFleetWaitStatus { - /// Initializes a new instance of FleetWaitStatus. - internal FleetWaitStatus() + /// Initializes a new instance of ContainerServiceFleetWaitStatus. + internal ContainerServiceFleetWaitStatus() { } - /// Initializes a new instance of FleetWaitStatus. + /// Initializes a new instance of ContainerServiceFleetWaitStatus. /// The status of the wait duration. /// The wait duration configured in seconds. - internal FleetWaitStatus(FleetUpdateOperationStatus status, int? waitDurationInSeconds) + internal ContainerServiceFleetWaitStatus(ContainerServiceFleetUpdateStatus status, int? waitDurationInSeconds) { Status = status; WaitDurationInSeconds = waitDurationInSeconds; } /// The status of the wait duration. - public FleetUpdateOperationStatus Status { get; } + public ContainerServiceFleetUpdateStatus Status { get; } /// The wait duration configured in seconds. public int? WaitDurationInSeconds { get; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResult.Serialization.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResult.Serialization.cs index 533e6ffc92f5c..102ff8c5fdeb7 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResult.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { public partial class FleetCredentialResult { diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResult.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResult.cs index 20263d16cbd12..8049d63dbb815 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResult.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResult.cs @@ -7,7 +7,7 @@ using System; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// One credential result item. public partial class FleetCredentialResult diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResults.Serialization.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResults.Serialization.cs index b825a4e1836bd..b1cf65440bd0a 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResults.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { public partial class FleetCredentialResults { diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResults.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResults.cs index 442739512d502..4f5ada3e28f97 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetCredentialResults.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetCredentialResults.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The Credential results response. public partial class FleetCredentialResults diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.Serialization.cs similarity index 83% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.Serialization.cs index aac61ef840c10..235e369ea51c6 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { public partial class FleetHubProfile : IUtf8JsonSerializable { @@ -40,8 +40,8 @@ internal static FleetHubProfile DeserializeFleetHubProfile(JsonElement element) return null; } Optional dnsPrefix = default; - Optional apiServerAccessProfile = default; - Optional agentProfile = default; + Optional apiServerAccessProfile = default; + Optional agentProfile = default; Optional fqdn = default; Optional kubernetesVersion = default; foreach (var property in element.EnumerateObject()) @@ -57,7 +57,7 @@ internal static FleetHubProfile DeserializeFleetHubProfile(JsonElement element) { continue; } - apiServerAccessProfile = FleetApiServerAccessProfile.DeserializeFleetApiServerAccessProfile(property.Value); + apiServerAccessProfile = ContainerServiceFleetAPIServerAccessProfile.DeserializeContainerServiceFleetAPIServerAccessProfile(property.Value); continue; } if (property.NameEquals("agentProfile"u8)) @@ -66,7 +66,7 @@ internal static FleetHubProfile DeserializeFleetHubProfile(JsonElement element) { continue; } - agentProfile = FleetAgentProfile.DeserializeFleetAgentProfile(property.Value); + agentProfile = ContainerServiceFleetAgentProfile.DeserializeContainerServiceFleetAgentProfile(property.Value); continue; } if (property.NameEquals("fqdn"u8)) diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.cs similarity index 80% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.cs index c8c65dc16bdcc..6c90fe0789ce5 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetHubProfile.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetHubProfile.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The FleetHubProfile configures the fleet hub. public partial class FleetHubProfile @@ -23,7 +23,7 @@ public FleetHubProfile() /// The agent profile for the Fleet hub. /// The FQDN of the Fleet hub. /// The Kubernetes version of the Fleet hub. - internal FleetHubProfile(string dnsPrefix, FleetApiServerAccessProfile apiServerAccessProfile, FleetAgentProfile agentProfile, string fqdn, string kubernetesVersion) + internal FleetHubProfile(string dnsPrefix, ContainerServiceFleetAPIServerAccessProfile apiServerAccessProfile, ContainerServiceFleetAgentProfile agentProfile, string fqdn, string kubernetesVersion) { DnsPrefix = dnsPrefix; ApiServerAccessProfile = apiServerAccessProfile; @@ -35,9 +35,9 @@ internal FleetHubProfile(string dnsPrefix, FleetApiServerAccessProfile apiServer /// DNS prefix used to create the FQDN for the Fleet hub. public string DnsPrefix { get; set; } /// The access profile for the Fleet hub API server. - public FleetApiServerAccessProfile ApiServerAccessProfile { get; set; } + public ContainerServiceFleetAPIServerAccessProfile ApiServerAccessProfile { get; set; } /// The agent profile for the Fleet hub. - internal FleetAgentProfile AgentProfile { get; set; } + internal ContainerServiceFleetAgentProfile AgentProfile { get; set; } /// The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used. public ResourceIdentifier AgentSubnetId { @@ -45,7 +45,7 @@ public ResourceIdentifier AgentSubnetId set { if (AgentProfile is null) - AgentProfile = new FleetAgentProfile(); + AgentProfile = new ContainerServiceFleetAgentProfile(); AgentProfile.SubnetId = value; } } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetMemberProvisioningState.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberProvisioningState.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetMemberProvisioningState.cs index 6fe877d251d40..6d526e27af092 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetMemberProvisioningState.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetMemberProvisioningState.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The provisioning state of the last accepted operation. public readonly partial struct FleetMemberProvisioningState : IEquatable diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetProvisioningState.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProvisioningState.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetProvisioningState.cs index 8f6a3a7471964..b4d841672b851 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProvisioningState.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/FleetProvisioningState.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The provisioning state of the last accepted operation. public readonly partial struct FleetProvisioningState : IEquatable diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs similarity index 88% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs index 29bf5ae7636a1..e9c33904b2182 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/MemberUpdateStatus.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { public partial class MemberUpdateStatus { @@ -18,7 +18,7 @@ internal static MemberUpdateStatus DeserializeMemberUpdateStatus(JsonElement ele { return null; } - Optional status = default; + Optional status = default; Optional name = default; Optional clusterResourceId = default; Optional operationId = default; @@ -31,7 +31,7 @@ internal static MemberUpdateStatus DeserializeMemberUpdateStatus(JsonElement ele { continue; } - status = FleetUpdateOperationStatus.DeserializeFleetUpdateOperationStatus(property.Value); + status = ContainerServiceFleetUpdateStatus.DeserializeContainerServiceFleetUpdateStatus(property.Value); continue; } if (property.NameEquals("name"u8)) diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/MemberUpdateStatus.cs similarity index 86% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/MemberUpdateStatus.cs index 9458a11a2e2ec..668574cdbd9b3 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MemberUpdateStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/MemberUpdateStatus.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The status of a member update operation. public partial class MemberUpdateStatus @@ -23,7 +23,7 @@ internal MemberUpdateStatus() /// The Azure resource id of the target Kubernetes cluster. /// The operation resource id of the latest attempt to perform the operation. /// The status message after processing the member update operation. - internal MemberUpdateStatus(FleetUpdateOperationStatus status, string name, ResourceIdentifier clusterResourceId, string operationId, string message) + internal MemberUpdateStatus(ContainerServiceFleetUpdateStatus status, string name, ResourceIdentifier clusterResourceId, string operationId, string message) { Status = status; Name = name; @@ -33,7 +33,7 @@ internal MemberUpdateStatus(FleetUpdateOperationStatus status, string name, Reso } /// The status of the MemberUpdate operation. - public FleetUpdateOperationStatus Status { get; } + public ContainerServiceFleetUpdateStatus Status { get; } /// The name of the FleetMember. public string Name { get; } /// The Azure resource id of the target Kubernetes cluster. diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.Serialization.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.Serialization.cs index ccb58d817e35e..bd915fd230b82 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { internal partial class NodeImageSelection : IUtf8JsonSerializable { diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.cs similarity index 92% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.cs index 44d6437934e36..095e0a223963d 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelection.cs @@ -5,7 +5,7 @@ #nullable disable -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The node image upgrade to be applied to the target nodes in update run. internal partial class NodeImageSelection diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs similarity index 95% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs index 1338a03895872..43dea6e6945a7 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionStatus.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { internal partial class NodeImageSelectionStatus { diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionStatus.cs similarity index 94% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionStatus.cs index dac162a2535d1..6d03b33364e4c 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionStatus.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionStatus.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The node image upgrade specs for the update run. internal partial class NodeImageSelectionStatus diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionType.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionType.cs similarity index 98% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionType.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionType.cs index e05a61840979e..1e14e24f9d5f5 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageSelectionType.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageSelectionType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The node image upgrade type. public readonly partial struct NodeImageSelectionType : IEquatable diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.Serialization.cs similarity index 93% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.Serialization.cs index 74172caf165cd..3c5a5bbe6c236 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { public partial class NodeImageVersion { diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.cs similarity index 93% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.cs index c214ea4bdd94a..00d253adb5fa1 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/NodeImageVersion.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/NodeImageVersion.cs @@ -5,7 +5,7 @@ #nullable disable -namespace Azure.ResourceManager.DatabaseFleetManager.Models +namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The node upgrade image version. public partial class NodeImageVersion diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ProviderConstants.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ProviderConstants.cs similarity index 87% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ProviderConstants.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ProviderConstants.cs index 978185b579aa6..ee749ff5d1a62 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ProviderConstants.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ProviderConstants.cs @@ -7,7 +7,7 @@ using Azure.Core.Pipeline; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { internal static class ProviderConstants { diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetMembersRestOperations.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetMembersRestOperations.cs similarity index 90% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetMembersRestOperations.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetMembersRestOperations.cs index 51463e8f2e452..8f0f433dd6ded 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetMembersRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetMembersRestOperations.cs @@ -12,9 +12,9 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { internal partial class FleetMembersRestOperations { @@ -65,7 +65,7 @@ internal HttpMessage CreateListByFleetRequest(string subscriptionId, string reso /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -77,9 +77,9 @@ public async Task> ListByFleetAsync(stri { case 200: { - DatabaseFleetMemberListResult value = default; + ContainerServiceFleetMemberListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetMemberListResult.DeserializeDatabaseFleetMemberListResult(document.RootElement); + value = ContainerServiceFleetMemberListResult.DeserializeContainerServiceFleetMemberListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -94,7 +94,7 @@ public async Task> ListByFleetAsync(stri /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -106,9 +106,9 @@ public Response ListByFleet(string subscriptionId { case 200: { - DatabaseFleetMemberListResult value = default; + ContainerServiceFleetMemberListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetMemberListResult.DeserializeDatabaseFleetMemberListResult(document.RootElement); + value = ContainerServiceFleetMemberListResult.DeserializeContainerServiceFleetMemberListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -146,7 +146,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -159,13 +159,13 @@ public async Task> GetAsync(string subscriptio { case 200: { - DatabaseFleetMemberData value = default; + ContainerServiceFleetMemberData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(document.RootElement); + value = ContainerServiceFleetMemberData.DeserializeContainerServiceFleetMemberData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DatabaseFleetMemberData)null, message.Response); + return Response.FromValue((ContainerServiceFleetMemberData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -179,7 +179,7 @@ public async Task> GetAsync(string subscriptio /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -192,19 +192,19 @@ public Response Get(string subscriptionId, string resou { case 200: { - DatabaseFleetMemberData value = default; + ContainerServiceFleetMemberData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(document.RootElement); + value = ContainerServiceFleetMemberData.DeserializeContainerServiceFleetMemberData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DatabaseFleetMemberData)null, message.Response); + return Response.FromValue((ContainerServiceFleetMemberData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberData data, string ifMatch, string ifNoneMatch) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, ContainerServiceFleetMemberData data, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -249,7 +249,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, ContainerServiceFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -280,7 +280,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, ContainerServiceFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -300,7 +300,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string f } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberPatch patch, string ifMatch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, ContainerServiceFleetMemberPatch patch, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -340,7 +340,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, ContainerServiceFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -370,7 +370,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, DatabaseFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName, ContainerServiceFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -496,7 +496,7 @@ internal HttpMessage CreateListByFleetNextPageRequest(string nextLink, string su /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -509,9 +509,9 @@ public async Task> ListByFleetNextPageAs { case 200: { - DatabaseFleetMemberListResult value = default; + ContainerServiceFleetMemberListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetMemberListResult.DeserializeDatabaseFleetMemberListResult(document.RootElement); + value = ContainerServiceFleetMemberListResult.DeserializeContainerServiceFleetMemberListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -527,7 +527,7 @@ public async Task> ListByFleetNextPageAs /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -540,9 +540,9 @@ public Response ListByFleetNextPage(string nextLi { case 200: { - DatabaseFleetMemberListResult value = default; + ContainerServiceFleetMemberListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetMemberListResult.DeserializeDatabaseFleetMemberListResult(document.RootElement); + value = ContainerServiceFleetMemberListResult.DeserializeContainerServiceFleetMemberListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetsRestOperations.cs similarity index 89% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetsRestOperations.cs index 7c134b97a1d52..5aeef400c8457 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/FleetsRestOperations.cs @@ -12,9 +12,9 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { internal partial class FleetsRestOperations { @@ -59,7 +59,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -69,9 +69,9 @@ public async Task> ListBySubscriptionAsync(str { case 200: { - DatabaseFleetListResult value = default; + ContainerServiceFleetListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); + value = ContainerServiceFleetListResult.DeserializeContainerServiceFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -84,7 +84,7 @@ public async Task> ListBySubscriptionAsync(str /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -94,9 +94,9 @@ public Response ListBySubscription(string subscriptionI { case 200: { - DatabaseFleetListResult value = default; + ContainerServiceFleetListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); + value = ContainerServiceFleetListResult.DeserializeContainerServiceFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -129,7 +129,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -140,9 +140,9 @@ public async Task> ListByResourceGroupAsync(st { case 200: { - DatabaseFleetListResult value = default; + ContainerServiceFleetListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); + value = ContainerServiceFleetListResult.DeserializeContainerServiceFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -156,7 +156,7 @@ public async Task> ListByResourceGroupAsync(st /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -167,9 +167,9 @@ public Response ListByResourceGroup(string subscription { case 200: { - DatabaseFleetListResult value = default; + ContainerServiceFleetListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); + value = ContainerServiceFleetListResult.DeserializeContainerServiceFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -204,7 +204,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -216,13 +216,13 @@ public async Task> GetAsync(string subscriptionId, s { case 200: { - DatabaseFleetData value = default; + ContainerServiceFleetData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetData.DeserializeDatabaseFleetData(document.RootElement); + value = ContainerServiceFleetData.DeserializeContainerServiceFleetData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DatabaseFleetData)null, message.Response); + return Response.FromValue((ContainerServiceFleetData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -235,7 +235,7 @@ public async Task> GetAsync(string subscriptionId, s /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -247,19 +247,19 @@ public Response Get(string subscriptionId, string resourceGro { case 200: { - DatabaseFleetData value = default; + ContainerServiceFleetData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetData.DeserializeDatabaseFleetData(document.RootElement); + value = ContainerServiceFleetData.DeserializeContainerServiceFleetData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DatabaseFleetData)null, message.Response); + return Response.FromValue((ContainerServiceFleetData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetData data, string ifMatch, string ifNoneMatch) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, ContainerServiceFleetData data, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -301,7 +301,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, ContainerServiceFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -330,7 +330,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, ContainerServiceFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -349,7 +349,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetPatch patch, string ifMatch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, ContainerServiceFleetPatch patch, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -386,7 +386,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, ContainerServiceFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -414,7 +414,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string fleetName, DatabaseFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string fleetName, ContainerServiceFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -610,7 +610,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -621,9 +621,9 @@ public async Task> ListBySubscriptionNextPageA { case 200: { - DatabaseFleetListResult value = default; + ContainerServiceFleetListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); + value = ContainerServiceFleetListResult.DeserializeContainerServiceFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -637,7 +637,7 @@ public async Task> ListBySubscriptionNextPageA /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -648,9 +648,9 @@ public Response ListBySubscriptionNextPage(string nextL { case 200: { - DatabaseFleetListResult value = default; + ContainerServiceFleetListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); + value = ContainerServiceFleetListResult.DeserializeContainerServiceFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -679,7 +679,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -691,9 +691,9 @@ public async Task> ListByResourceGroupNextPage { case 200: { - DatabaseFleetListResult value = default; + ContainerServiceFleetListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); + value = ContainerServiceFleetListResult.DeserializeContainerServiceFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -708,7 +708,7 @@ public async Task> ListByResourceGroupNextPage /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -720,9 +720,9 @@ public Response ListByResourceGroupNextPage(string next { case 200: { - DatabaseFleetListResult value = default; + ContainerServiceFleetListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetListResult.DeserializeDatabaseFleetListResult(document.RootElement); + value = ContainerServiceFleetListResult.DeserializeContainerServiceFleetListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/UpdateRunsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs similarity index 92% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/UpdateRunsRestOperations.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs index afef7ef223b92..f29c755513a53 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/UpdateRunsRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs @@ -12,9 +12,9 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.ContainerServiceFleet.Models; -namespace Azure.ResourceManager.DatabaseFleetManager +namespace Azure.ResourceManager.ContainerServiceFleet { internal partial class UpdateRunsRestOperations { @@ -65,7 +65,7 @@ internal HttpMessage CreateListByFleetRequest(string subscriptionId, string reso /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -77,9 +77,9 @@ public async Task> ListByFleetAsync(s { case 200: { - DatabaseFleetUpdateRunListResult value = default; + ContainerServiceFleetUpdateRunListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetUpdateRunListResult.DeserializeDatabaseFleetUpdateRunListResult(document.RootElement); + value = ContainerServiceFleetUpdateRunListResult.DeserializeContainerServiceFleetUpdateRunListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -94,7 +94,7 @@ public async Task> ListByFleetAsync(s /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -106,9 +106,9 @@ public Response ListByFleet(string subscriptio { case 200: { - DatabaseFleetUpdateRunListResult value = default; + ContainerServiceFleetUpdateRunListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetUpdateRunListResult.DeserializeDatabaseFleetUpdateRunListResult(document.RootElement); + value = ContainerServiceFleetUpdateRunListResult.DeserializeContainerServiceFleetUpdateRunListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -146,7 +146,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -159,13 +159,13 @@ public async Task> GetAsync(string subscrip { case 200: { - DatabaseFleetUpdateRunData value = default; + ContainerServiceFleetUpdateRunData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(document.RootElement); + value = ContainerServiceFleetUpdateRunData.DeserializeContainerServiceFleetUpdateRunData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DatabaseFleetUpdateRunData)null, message.Response); + return Response.FromValue((ContainerServiceFleetUpdateRunData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -179,7 +179,7 @@ public async Task> GetAsync(string subscrip /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -192,19 +192,19 @@ public Response Get(string subscriptionId, string re { case 200: { - DatabaseFleetUpdateRunData value = default; + ContainerServiceFleetUpdateRunData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(document.RootElement); + value = ContainerServiceFleetUpdateRunData.DeserializeContainerServiceFleetUpdateRunData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DatabaseFleetUpdateRunData)null, message.Response); + return Response.FromValue((ContainerServiceFleetUpdateRunData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, DatabaseFleetUpdateRunData data, string ifMatch, string ifNoneMatch) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetUpdateRunData data, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -249,7 +249,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -280,7 +280,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -572,7 +572,7 @@ internal HttpMessage CreateListByFleetNextPageRequest(string nextLink, string su /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -585,9 +585,9 @@ public async Task> ListByFleetNextPag { case 200: { - DatabaseFleetUpdateRunListResult value = default; + ContainerServiceFleetUpdateRunListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseFleetUpdateRunListResult.DeserializeDatabaseFleetUpdateRunListResult(document.RootElement); + value = ContainerServiceFleetUpdateRunListResult.DeserializeContainerServiceFleetUpdateRunListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -603,7 +603,7 @@ public async Task> ListByFleetNextPag /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -616,9 +616,9 @@ public Response ListByFleetNextPage(string nex { case 200: { - DatabaseFleetUpdateRunListResult value = default; + ContainerServiceFleetUpdateRunListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseFleetUpdateRunListResult.DeserializeDatabaseFleetUpdateRunListResult(document.RootElement); + value = ContainerServiceFleetUpdateRunListResult.DeserializeContainerServiceFleetUpdateRunListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Properties/AssemblyInfo.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Properties/AssemblyInfo.cs similarity index 59% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Properties/AssemblyInfo.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Properties/AssemblyInfo.cs index e3c63ee56c9e8..736cdddeb8fd9 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Properties/AssemblyInfo.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Properties/AssemblyInfo.cs @@ -6,4 +6,4 @@ [assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.ContainerService/fleet")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] -[assembly: InternalsVisibleTo("Azure.ResourceManager.DatabaseFleetManager.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.ContainerServiceFleet.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/autorest.md b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md similarity index 52% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/autorest.md rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md index f9444ebe2ed5a..f6c4f055524d4 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/autorest.md +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md @@ -5,8 +5,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true csharp: true -library-name: DatabaseFleetManager -namespace: Azure.ResourceManager.DatabaseFleetManager +library-name: ContainerServiceFleet +namespace: Azure.ResourceManager.ContainerServiceFleet require: https://github.com/Azure/azure-rest-api-specs/blob/de06c42bd985fb66b6a49c907aaf5baee693bc7b/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md #tag: package-2023-06-preview output-folder: $(this-folder)/Generated @@ -22,28 +22,30 @@ modelerfour: # show-serialized-names: true rename-mapping: - AgentProfile: FleetAgentProfile - APIServerAccessProfile: FleetApiServerAccessProfile - Fleet: DatabaseFleet - FleetListResult: DatabaseFleetListResult - FleetMember: DatabaseFleetMember - FleetMemberListResult: DatabaseFleetMemberListResult - ManagedClusterUpdate: FleetManagedClusterUpdate - ManagedClusterUpgradeSpec: FleetManagedClusterUpgradeSpec - ManagedClusterUpgradeType: FleetManagedClusterUpgradeType + Fleet: ContainerServiceFleet + FleetListResult: ContainerServiceFleetListResult + FleetMember: ContainerServiceFleetMember + FleetMemberListResult: ContainerServiceFleetMemberListResult MemberUpdateStatus.clusterResourceId: -|arm-id - UpdateGroup: FleetUpdateGroup - UpdateGroupStatus: FleetUpdateGroupStatus - UpdateRun: DatabaseFleetUpdateRun - UpdateRunListResult: DatabaseFleetUpdateRunListResult - UpdateRunProvisioningState: FleetUpdateRunProvisioningState - UpdateRunStatus: FleetUpdateRunStatus - UpdateRunStrategy: FleetUpdateRunStrategy - UpdateStage: FleetUpdateStage - UpdateStageStatus: FleetUpdateStageStatus - UpdateState: FleetUpdateState - UpdateStatus: FleetUpdateOperationStatus - WaitStatus: FleetWaitStatus + +prepend-rp-prefix: + - AgentProfile + - APIServerAccessProfile + - ManagedClusterUpdate + - ManagedClusterUpgradeSpec + - ManagedClusterUpgradeType + - UpdateGroup + - UpdateGroupStatus + - UpdateRun + - UpdateRunListResult + - UpdateRunProvisioningState + - UpdateRunStatus + - UpdateRunStrategy + - UpdateStage + - UpdateStageStatus + - UpdateState + - UpdateStatus + - WaitStatus format-by-name-rules: 'tenantId': 'uuid' diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Azure.ResourceManager.ContainerServiceFleet.Tests.csproj b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Azure.ResourceManager.ContainerServiceFleet.Tests.csproj new file mode 100644 index 0000000000000..76616291529de --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Azure.ResourceManager.ContainerServiceFleet.Tests.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestBase.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/ContainerServiceFleetManagementTestBase.cs similarity index 77% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestBase.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/ContainerServiceFleetManagementTestBase.cs index b47a42a862e84..ec53a4a303be1 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestBase.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/ContainerServiceFleetManagementTestBase.cs @@ -8,19 +8,19 @@ using NUnit.Framework; using System.Threading.Tasks; -namespace Azure.ResourceManager.DatabaseFleetManager.Tests +namespace Azure.ResourceManager.ContainerServiceFleet.Tests { - public class DatabaseFleetManagerManagementTestBase : ManagementRecordedTestBase + public class ContainerServiceFleetManagementTestBase : ManagementRecordedTestBase { protected ArmClient Client { get; private set; } protected SubscriptionResource DefaultSubscription { get; private set; } - protected DatabaseFleetManagerManagementTestBase(bool isAsync, RecordedTestMode mode) + protected ContainerServiceFleetManagementTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) { } - protected DatabaseFleetManagerManagementTestBase(bool isAsync) + protected ContainerServiceFleetManagementTestBase(bool isAsync) : base(isAsync) { } diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestEnvironment.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/ContainerServiceFleetManagementTestEnvironment.cs similarity index 50% rename from sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestEnvironment.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/ContainerServiceFleetManagementTestEnvironment.cs index aa2ce828b954a..93bd92ef9e739 100644 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestEnvironment.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/ContainerServiceFleetManagementTestEnvironment.cs @@ -3,9 +3,9 @@ using Azure.Core.TestFramework; -namespace Azure.ResourceManager.DatabaseFleetManager.Tests +namespace Azure.ResourceManager.ContainerServiceFleet.Tests { - public class DatabaseFleetManagerManagementTestEnvironment : TestEnvironment + public class ContainerServiceFleetManagementTestEnvironment : TestEnvironment { } } \ No newline at end of file diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs deleted file mode 100644 index a31cbdfb9281e..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs +++ /dev/null @@ -1,403 +0,0 @@ -namespace Azure.ResourceManager.DatabaseFleetManager -{ - public partial class DatabaseFleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DatabaseFleetCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class DatabaseFleetData : Azure.ResourceManager.Models.TrackedResourceData - { - public DatabaseFleetData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ETag? ETag { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile HubProfile { get { throw null; } set { } } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState? ProvisioningState { get { throw null; } } - } - public static partial class DatabaseFleetManagerExtensions - { - public static Azure.Response GetDatabaseFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetDatabaseFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberResource GetDatabaseFleetMemberResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetResource GetDatabaseFleetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetCollection GetDatabaseFleets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetDatabaseFleets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDatabaseFleetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunResource GetDatabaseFleetUpdateRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - } - public partial class DatabaseFleetMemberCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DatabaseFleetMemberCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class DatabaseFleetMemberData : Azure.ResourceManager.Models.ResourceData - { - public DatabaseFleetMemberData() { } - public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } set { } } - public Azure.ETag? ETag { get { throw null; } } - public string Group { get { throw null; } set { } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState? ProvisioningState { get { throw null; } } - } - public partial class DatabaseFleetMemberResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected DatabaseFleetMemberResource() { } - public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class DatabaseFleetResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected DatabaseFleetResource() { } - public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDatabaseFleetMember(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDatabaseFleetMemberAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberCollection GetDatabaseFleetMembers() { throw null; } - public virtual Azure.Response GetDatabaseFleetUpdateRun(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDatabaseFleetUpdateRunAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunCollection GetDatabaseFleetUpdateRuns() { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class DatabaseFleetUpdateRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DatabaseFleetUpdateRunCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class DatabaseFleetUpdateRunData : Azure.ResourceManager.Models.ResourceData - { - public DatabaseFleetUpdateRunData() { } - public Azure.ETag? ETag { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpdate ManagedClusterUpdate { get { throw null; } set { } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunStatus Status { get { throw null; } } - public System.Collections.Generic.IList StrategyStages { get { throw null; } set { } } - } - public partial class DatabaseFleetUpdateRunResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected DatabaseFleetUpdateRunResource() { } - public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } -} -namespace Azure.ResourceManager.DatabaseFleetManager.Models -{ - public static partial class ArmDatabaseFleetManagerModelFactory - { - public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData DatabaseFleetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile hubProfile = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData DatabaseFleetMemberData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.Core.ResourceIdentifier clusterResourceId = null, string group = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState?)) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData DatabaseFleetUpdateRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState?), System.Collections.Generic.IEnumerable strategyStages = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpdate managedClusterUpdate = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunStatus status = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetCredentialResult FleetCredentialResult(string name = null, byte[] value = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetCredentialResults FleetCredentialResults(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile FleetHubProfile(string dnsPrefix = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetApiServerAccessProfile apiServerAccessProfile = null, Azure.Core.ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateGroupStatus FleetUpdateGroupStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, string name = null, System.Collections.Generic.IEnumerable members = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus FleetUpdateOperationStatus(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState? state = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState?), Azure.ResponseError error = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunStatus FleetUpdateRunStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, System.Collections.Generic.IEnumerable stages = null, System.Collections.Generic.IEnumerable selectedNodeImageVersions = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateStageStatus FleetUpdateStageStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, string name = null, System.Collections.Generic.IEnumerable groups = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetWaitStatus afterStageWaitStatus = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetWaitStatus FleetWaitStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, int? waitDurationInSeconds = default(int?)) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.MemberUpdateStatus MemberUpdateStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, string name = null, Azure.Core.ResourceIdentifier clusterResourceId = null, string operationId = null, string message = null) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageVersion NodeImageVersion(string version = null) { throw null; } - } - public partial class DatabaseFleetMemberPatch - { - public DatabaseFleetMemberPatch() { } - public string Group { get { throw null; } set { } } - } - public partial class DatabaseFleetPatch - { - public DatabaseFleetPatch() { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - } - public partial class FleetApiServerAccessProfile - { - public FleetApiServerAccessProfile() { } - public bool? EnablePrivateCluster { get { throw null; } set { } } - public bool? EnableVnetIntegration { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } - } - public partial class FleetCredentialResult - { - internal FleetCredentialResult() { } - public string Name { get { throw null; } } - public byte[] Value { get { throw null; } } - } - public partial class FleetCredentialResults - { - internal FleetCredentialResults() { } - public System.Collections.Generic.IReadOnlyList Kubeconfigs { get { throw null; } } - } - public partial class FleetHubProfile - { - public FleetHubProfile() { } - public Azure.Core.ResourceIdentifier AgentSubnetId { get { throw null; } set { } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetApiServerAccessProfile ApiServerAccessProfile { get { throw null; } set { } } - public string DnsPrefix { get { throw null; } set { } } - public string Fqdn { get { throw null; } } - public string KubernetesVersion { get { throw null; } } - } - public partial class FleetManagedClusterUpdate - { - public FleetManagedClusterUpdate(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeSpec upgrade) { } - public Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType? SelectionType { get { throw null; } set { } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeSpec Upgrade { get { throw null; } set { } } - } - public partial class FleetManagedClusterUpgradeSpec - { - public FleetManagedClusterUpgradeSpec(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType upgradeType) { } - public string KubernetesVersion { get { throw null; } set { } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType UpgradeType { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FleetManagedClusterUpgradeType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public FleetManagedClusterUpgradeType(string value) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType Full { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType NodeImageOnly { get { throw null; } } - public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType right) { throw null; } - public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FleetMemberProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public FleetMemberProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Joining { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Leaving { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FleetProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public FleetProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class FleetUpdateGroup - { - public FleetUpdateGroup(string name) { } - public string Name { get { throw null; } set { } } - } - public partial class FleetUpdateGroupStatus - { - internal FleetUpdateGroupStatus() { } - public System.Collections.Generic.IReadOnlyList Members { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } } - } - public partial class FleetUpdateOperationStatus - { - internal FleetUpdateOperationStatus() { } - public System.DateTimeOffset? CompletedOn { get { throw null; } } - public Azure.ResponseError Error { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState? State { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FleetUpdateRunProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public FleetUpdateRunProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class FleetUpdateRunStatus - { - internal FleetUpdateRunStatus() { } - public System.Collections.Generic.IReadOnlyList SelectedNodeImageVersions { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Stages { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } } - } - public partial class FleetUpdateStage - { - public FleetUpdateStage(string name) { } - public int? AfterStageWaitInSeconds { get { throw null; } set { } } - public System.Collections.Generic.IList Groups { get { throw null; } } - public string Name { get { throw null; } set { } } - } - public partial class FleetUpdateStageStatus - { - internal FleetUpdateStageStatus() { } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetWaitStatus AfterStageWaitStatus { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FleetUpdateState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public FleetUpdateState(string value) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Completed { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Failed { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState NotStarted { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Running { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Skipped { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Stopped { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Stopping { get { throw null; } } - public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState right) { throw null; } - public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class FleetWaitStatus - { - internal FleetWaitStatus() { } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } } - public int? WaitDurationInSeconds { get { throw null; } } - } - public partial class MemberUpdateStatus - { - internal MemberUpdateStatus() { } - public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } - public string Message { get { throw null; } } - public string Name { get { throw null; } } - public string OperationId { get { throw null; } } - public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NodeImageSelectionType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public NodeImageSelectionType(string value) { throw null; } - public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType Consistent { get { throw null; } } - public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType Latest { get { throw null; } } - public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType left, Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType right) { throw null; } - public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType left, Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class NodeImageVersion - { - internal NodeImageVersion() { } - public string Version { get { throw null; } } - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetMemberOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetMemberOperationSource.cs deleted file mode 100644 index f5cd6ee59d422..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetMemberOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DatabaseFleetManager -{ - internal class DatabaseFleetMemberOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal DatabaseFleetMemberOperationSource(ArmClient client) - { - _client = client; - } - - DatabaseFleetMemberResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(document.RootElement); - return new DatabaseFleetMemberResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(document.RootElement); - return new DatabaseFleetMemberResource(_client, data); - } - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetOperationSource.cs deleted file mode 100644 index 642cbbd2af375..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DatabaseFleetManager -{ - internal class DatabaseFleetOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal DatabaseFleetOperationSource(ArmClient client) - { - _client = client; - } - - DatabaseFleetResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = DatabaseFleetData.DeserializeDatabaseFleetData(document.RootElement); - return new DatabaseFleetResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = DatabaseFleetData.DeserializeDatabaseFleetData(document.RootElement); - return new DatabaseFleetResource(_client, data); - } - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetUpdateRunOperationSource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetUpdateRunOperationSource.cs deleted file mode 100644 index a827cb262a6ef..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetUpdateRunOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.DatabaseFleetManager -{ - internal class DatabaseFleetUpdateRunOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal DatabaseFleetUpdateRunOperationSource(ArmClient client) - { - _client = client; - } - - DatabaseFleetUpdateRunResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(document.RootElement); - return new DatabaseFleetUpdateRunResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(document.RootElement); - return new DatabaseFleetUpdateRunResource(_client, data); - } - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeType.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeType.cs deleted file mode 100644 index 357fccf2e24eb..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetManagedClusterUpgradeType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DatabaseFleetManager.Models -{ - /// The type of upgrade to perform when targeting ManagedClusters. - public readonly partial struct FleetManagedClusterUpgradeType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FleetManagedClusterUpgradeType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FullValue = "Full"; - private const string NodeImageOnlyValue = "NodeImageOnly"; - - /// Full upgrades the control plane and all agent pools of the target ManagedClusters. - public static FleetManagedClusterUpgradeType Full { get; } = new FleetManagedClusterUpgradeType(FullValue); - /// NodeImageOnly upgrades only the node images of the target ManagedClusters. - public static FleetManagedClusterUpgradeType NodeImageOnly { get; } = new FleetManagedClusterUpgradeType(NodeImageOnlyValue); - /// Determines if two values are the same. - public static bool operator ==(FleetManagedClusterUpgradeType left, FleetManagedClusterUpgradeType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FleetManagedClusterUpgradeType left, FleetManagedClusterUpgradeType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FleetManagedClusterUpgradeType(string value) => new FleetManagedClusterUpgradeType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FleetManagedClusterUpgradeType other && Equals(other); - /// - public bool Equals(FleetManagedClusterUpgradeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunProvisioningState.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunProvisioningState.cs deleted file mode 100644 index 5c6caa6c37944..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateRunProvisioningState.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DatabaseFleetManager.Models -{ - /// The provisioning state of the UpdateRun resource. - public readonly partial struct FleetUpdateRunProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FleetUpdateRunProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - - /// Resource has been created. - public static FleetUpdateRunProvisioningState Succeeded { get; } = new FleetUpdateRunProvisioningState(SucceededValue); - /// Resource creation failed. - public static FleetUpdateRunProvisioningState Failed { get; } = new FleetUpdateRunProvisioningState(FailedValue); - /// Resource creation was canceled. - public static FleetUpdateRunProvisioningState Canceled { get; } = new FleetUpdateRunProvisioningState(CanceledValue); - /// Determines if two values are the same. - public static bool operator ==(FleetUpdateRunProvisioningState left, FleetUpdateRunProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FleetUpdateRunProvisioningState left, FleetUpdateRunProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FleetUpdateRunProvisioningState(string value) => new FleetUpdateRunProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FleetUpdateRunProvisioningState other && Equals(other); - /// - public bool Equals(FleetUpdateRunProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateState.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateState.cs deleted file mode 100644 index 90a21844acfeb..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetUpdateState.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DatabaseFleetManager.Models -{ - /// The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate. - public readonly partial struct FleetUpdateState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FleetUpdateState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotStartedValue = "NotStarted"; - private const string RunningValue = "Running"; - private const string StoppingValue = "Stopping"; - private const string StoppedValue = "Stopped"; - private const string SkippedValue = "Skipped"; - private const string FailedValue = "Failed"; - private const string CompletedValue = "Completed"; - - /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has not been started. - public static FleetUpdateState NotStarted { get; } = new FleetUpdateState(NotStartedValue); - /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is running. - public static FleetUpdateState Running { get; } = new FleetUpdateState(RunningValue); - /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is being stopped. - public static FleetUpdateState Stopping { get; } = new FleetUpdateState(StoppingValue); - /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has stopped. - public static FleetUpdateState Stopped { get; } = new FleetUpdateState(StoppedValue); - /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has been skipped. - public static FleetUpdateState Skipped { get; } = new FleetUpdateState(SkippedValue); - /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has failed. - public static FleetUpdateState Failed { get; } = new FleetUpdateState(FailedValue); - /// The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has completed. - public static FleetUpdateState Completed { get; } = new FleetUpdateState(CompletedValue); - /// Determines if two values are the same. - public static bool operator ==(FleetUpdateState left, FleetUpdateState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FleetUpdateState left, FleetUpdateState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FleetUpdateState(string value) => new FleetUpdateState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FleetUpdateState other && Equals(other); - /// - public bool Equals(FleetUpdateState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/Azure.ResourceManager.DatabaseFleetManager.Tests.csproj b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/Azure.ResourceManager.DatabaseFleetManager.Tests.csproj deleted file mode 100644 index 800cc7d815724..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/tests/Azure.ResourceManager.DatabaseFleetManager.Tests.csproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/sdk/fleet/ci.mgmt.yml b/sdk/fleet/ci.mgmt.yml index 08c7f125cee1e..09a225882401d 100644 --- a/sdk/fleet/ci.mgmt.yml +++ b/sdk/fleet/ci.mgmt.yml @@ -11,7 +11,7 @@ pr: paths: include: - sdk/fleet/ci.mgmt.yml - - sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/ + - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -19,5 +19,5 @@ extends: ServiceDirectory: fleet LimitForPullRequest: true Artifacts: - - name: Azure.ResourceManager.DatabaseFleetManager - safeName: AzureResourceManagerDatabaseFleetManager + - name: Azure.ResourceManager.ContainerServiceFleet + safeName: AzureResourceManagerContainerServiceFleet diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs index 6a93da6a078f0..368a01f697a4d 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs @@ -73,7 +73,8 @@ public virtual async Task> InferCancerProfileAsyn Argument.AssertNotNull(oncoPhenotypeData, nameof(oncoPhenotypeData)); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = await InferCancerProfileAsync(waitUntil, oncoPhenotypeData.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = oncoPhenotypeData.ToRequestContent(); + Operation response = await InferCancerProfileAsync(waitUntil, content, context).ConfigureAwait(false); return ProtocolOperationHelpers.Convert(response, OncoPhenotypeResult.FromResponse, ClientDiagnostics, "CancerProfilingClient.InferCancerProfile"); } @@ -89,7 +90,8 @@ public virtual Operation InferCancerProfile(WaitUntil waitU Argument.AssertNotNull(oncoPhenotypeData, nameof(oncoPhenotypeData)); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = InferCancerProfile(waitUntil, oncoPhenotypeData.ToRequestContent(), context); + using RequestContent content = oncoPhenotypeData.ToRequestContent(); + Operation response = InferCancerProfile(waitUntil, content, context); return ProtocolOperationHelpers.Convert(response, OncoPhenotypeResult.FromResponse, ClientDiagnostics, "CancerProfilingClient.InferCancerProfile"); } 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 e6b5b30dfdd48..8496b5d9de66c 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 @@ -121,7 +121,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -147,7 +147,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -237,7 +237,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -263,7 +263,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { patients = new object[] { 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 061d2395cec91..5891cd31f0617 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 @@ -26,7 +26,7 @@ public void Example_InferCancerProfile_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -55,7 +55,7 @@ public async Task Example_InferCancerProfile_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -116,7 +116,7 @@ public void Example_InferCancerProfile_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -206,7 +206,7 @@ public async Task Example_InferCancerProfile_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { patients = new object[] { diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs index 3984bf1f11aec..531050542978d 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs @@ -73,7 +73,8 @@ public virtual async Task> MatchTrialsAsync(WaitUn Argument.AssertNotNull(trialMatcherData, nameof(trialMatcherData)); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = await MatchTrialsAsync(waitUntil, trialMatcherData.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = trialMatcherData.ToRequestContent(); + Operation response = await MatchTrialsAsync(waitUntil, content, context).ConfigureAwait(false); return ProtocolOperationHelpers.Convert(response, TrialMatcherResult.FromResponse, ClientDiagnostics, "ClinicalMatchingClient.MatchTrials"); } @@ -89,7 +90,8 @@ public virtual Operation MatchTrials(WaitUntil waitUntil, Tr Argument.AssertNotNull(trialMatcherData, nameof(trialMatcherData)); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = MatchTrials(waitUntil, trialMatcherData.ToRequestContent(), context); + using RequestContent content = trialMatcherData.ToRequestContent(); + Operation response = MatchTrials(waitUntil, content, context); return ProtocolOperationHelpers.Convert(response, TrialMatcherResult.FromResponse, ClientDiagnostics, "ClinicalMatchingClient.MatchTrials"); } 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 61ebd64fc0001..51fb164a2d9d4 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 @@ -217,7 +217,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -243,7 +243,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -479,7 +479,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -505,7 +505,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { patients = new object[] { 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 4022d7bd033e4..4f818f4310e3c 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 @@ -26,7 +26,7 @@ public void Example_MatchTrials_ShortVersion() AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -55,7 +55,7 @@ public async Task Example_MatchTrials_ShortVersion_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -116,7 +116,7 @@ public void Example_MatchTrials_AllParameters() AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { patients = new object[] { @@ -352,7 +352,7 @@ public async Task Example_MatchTrials_AllParameters_Async() AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { patients = new object[] { diff --git a/sdk/identity/Azure.Identity.BrokeredAuthentication/README.md b/sdk/identity/Azure.Identity.BrokeredAuthentication/README.md index 643b5d77d7d21..9239f9514ff13 100644 --- a/sdk/identity/Azure.Identity.BrokeredAuthentication/README.md +++ b/sdk/identity/Azure.Identity.BrokeredAuthentication/README.md @@ -1,7 +1,7 @@ # Azure Identity Brokered Authentication client library for .NET - The library extends the Azure.Identity library to provide authentication broker support. It includes the necessary dependencies, and provides the `InteractiveBrowserCredentialBrokerOptions` class. This options class can be used to create an `InteractiveBrowserCredential` capable of using the system authentication broker in lieu of the system browser when available. + The library extends the Azure.Identity library to provide authentication broker support. It includes the necessary dependencies, and provides the `InteractiveBrowserCredentialBrokerOptions` class. This options class can be used to create an `InteractiveBrowserCredential` capable of using the system authentication broker in lieu of the system browser when available. - [Source code][source] | [Package (nuget)][package] | [API reference documentation][identity_api_docs] | [Azure Active Directory documentation][aad_doc] + [Source code][source] | [Package (nuget)][package] | [API reference documentation][identity_api_docs] | [Microsoft Entra ID documentation][aad_doc] ## Getting started @@ -60,7 +60,7 @@ catch (AuthenticationFailedException e) } ``` -For more details on dealing with errors arising from failed requests to Azure Active Directory, or managed identity endpoints please refer to the Azure Active Directory [documentation on authorization error codes][aad_err_doc]. +For more details on dealing with errors arising from failed requests to Microsoft Entra ID, or managed identity endpoints please refer to the Microsoft Entra ID [documentation on authorization error codes][aad_err_doc]. ### Logging diff --git a/sdk/identity/Azure.Identity/CHANGELOG.md b/sdk/identity/Azure.Identity/CHANGELOG.md index 3979a75b0b42b..f1d2199a1e8b9 100644 --- a/sdk/identity/Azure.Identity/CHANGELOG.md +++ b/sdk/identity/Azure.Identity/CHANGELOG.md @@ -78,7 +78,7 @@ ## 1.8.2 (2023-02-08) ### Bugs Fixed -- Fixed error message parsing in `AzurePowerShellCredential` which would misinterpret AAD errors with the need to install PowerShell. [#31998](https://github.com/Azure/azure-sdk-for-net/issues/31998) +- Fixed error message parsing in `AzurePowerShellCredential` which would misinterpret Microsoft Entra ID errors with the need to install PowerShell. [#31998](https://github.com/Azure/azure-sdk-for-net/issues/31998) - Fix regional endpoint validation error when using `ManagedIdentityCredential`. [#32498])(https://github.com/Azure/azure-sdk-for-net/issues/32498) ## 1.8.1 (2023-01-13) @@ -89,7 +89,7 @@ ## 1.8.0 (2022-11-08) ### Bugs Fixed -- Fixed error message parsing in `AzureCliCredential` which would misinterpret AAD errors with the need to login with `az login`. [#26894](https://github.com/Azure/azure-sdk-for-net/issues/26894), [#29109](https://github.com/Azure/azure-sdk-for-net/issues/29109) +- Fixed error message parsing in `AzureCliCredential` which would misinterpret Microsoft Entra ID errors with the need to login with `az login`. [#26894](https://github.com/Azure/azure-sdk-for-net/issues/26894), [#29109](https://github.com/Azure/azure-sdk-for-net/issues/29109) - `ManagedIdentityCredential` will no longer fail when a response received from the endpoint is invalid JSON. It now treats this scenario as if the credential is unavailable. [#30467](https://github.com/Azure/azure-sdk-for-net/issues/30467), [#32061](https://github.com/Azure/azure-sdk-for-net/issues/32061) ## 1.9.0-beta.1 (2022-10-13) @@ -216,7 +216,7 @@ Thank you to our developer community members who helped to make Azure Identity b ### Features Added - `DefaultAzureCredentialOptions` now has a `InteractiveBrowserClientId` property which allows passing a ClientId value to the `InteractiveBrowserCredential` when constructing a `DefaultAzureCredential`. -- Implement `OnBehalfOfCredential` which enables authentication to Azure Active Directory using an On-Behalf-Of flow. +- Implement `OnBehalfOfCredential` which enables authentication to Microsoft Entra ID using an On-Behalf-Of flow. - Added support to `ManagedIdentityCredential` for Azure hosts using federated token exchange for managed identity. ### Bugs Fixed @@ -226,7 +226,7 @@ Thank you to our developer community members who helped to make Azure Identity b ### Other Changes - Updated credentials using `MsalConfidentialClient` to include MSAL log output in logs -- Added additional logging to `AzureCliCredential`, `AzurePowerShellCredential`, `VisualStudioCrednetial`, and `VisualStudioCodeCredential` when `IsPIILoggingEnabled` is set to true. +- Added additional logging to `AzureCliCredential`, `AzurePowerShellCredential`, `VisualStudioCredential`, and `VisualStudioCodeCredential` when `IsPIILoggingEnabled` is set to true. ## 1.5.0-beta.3 (2021-08-10) @@ -270,7 +270,7 @@ Thank you to our developer community members who helped to make Azure Identity b - Added support to `ManagedIdentityCredential` for Bridge to Kubernetes local development authentication. - TenantId values returned from service challenge responses can now be used to request tokens from the correct tenantId. To support this feature, there is a new `AllowMultiTenantAuthentication` option on `TokenCredentialOptions`. - By default, `AllowMultiTenantAuthentication` is false. When this option property is false and the tenant Id configured in the credential options differs from the tenant Id set in the `TokenRequestContext` sent to a credential, an `AuthorizationFailedException` will be thrown. This is potentially breaking change as it could be a different exception than what was thrown previously. This exception behavior can be overridden by either setting an `AppContext` switch named "Azure.Identity.EnableLegacyTenantSelection" to `true` or by setting the environment variable "AZURE_IDENTITY_ENABLE_LEGACY_TENANT_SELECTION" to "true". Note: AppContext switches can also be configured via configuration like below: -- Added `OnBehalfOfFlowCredential` which enables support for AAD On-Behalf-Of (OBO) flow. See the [Azure Active Directory documentation](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow) to learn more about OBO flow scenarios. +- Added `OnBehalfOfFlowCredential` which enables support for Microsoft Entra On-Behalf-Of (OBO) flow. See the [Microsoft Entra ID documentation](https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow) to learn more about OBO flow scenarios. ```xml @@ -290,7 +290,7 @@ Thank you to our developer community members who helped to make Azure Identity b ### New Features - By default, the MSAL Public Client Client Capabilities are populated with "CP1" to enable support for [Continuous Access Evaluation (CAE)](https://docs.microsoft.com/azure/active-directory/develop/app-resilience-continuous-access-evaluation). -This indicates to AAD that your application is CAE ready and can handle the CAE claim challenge. This capability can be disabled, if necessary, by either setting an `AppContext` switch named "Azure.Identity.DisableCP1" to `true` or by setting the environment variable; +This indicates to Microsoft Entra ID that your application is CAE ready and can handle the CAE claim challenge. This capability can be disabled, if necessary, by either setting an `AppContext` switch named "Azure.Identity.DisableCP1" to `true` or by setting the environment variable; "AZURE_IDENTITY_DISABLE_CP1" to "true". Note: AppContext switches can also be configured via configuration like below: ```xml diff --git a/sdk/identity/Azure.Identity/README.md b/sdk/identity/Azure.Identity/README.md index ea4aa4bdd14d1..f01f3b2222c56 100644 --- a/sdk/identity/Azure.Identity/README.md +++ b/sdk/identity/Azure.Identity/README.md @@ -1,8 +1,8 @@ # Azure Identity client library for .NET -The Azure Identity library provides [Azure Active Directory (Azure AD)](https://learn.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) token authentication support across the Azure SDK. It provides a set of [`TokenCredential`](https://learn.microsoft.com/dotnet/api/azure.core.tokencredential?view=azure-dotnet) implementations which can be used to construct Azure SDK clients which support Azure AD token authentication. +The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) ([formerly Azure Active Directory](https://learn.microsoft.com/azure/active-directory/fundamentals/new-name)) token authentication support across the Azure SDK. It provides a set of [`TokenCredential`](https://learn.microsoft.com/dotnet/api/azure.core.tokencredential?view=azure-dotnet) implementations which can be used to construct Azure SDK clients which support Microsoft Entra token authentication. - [Source code][source] | [Package (NuGet)][package] | [API reference documentation][identity_api_docs] | [Azure AD documentation][aad_doc] + [Source code][source] | [Package (NuGet)][package] | [API reference documentation][identity_api_docs] | [Microsoft Entra ID documentation][aad_doc] ## Getting started @@ -25,9 +25,9 @@ When debugging and executing code locally it is typical for a developer to use t #### Authenticate via Visual Studio -Developers using Visual Studio 2017 or later can authenticate an Azure AD account through the IDE. Applications using the `DefaultAzureCredential` or the `VisualStudioCredential` can then use this account to authenticate calls in their application when running locally. +Developers using Visual Studio 2017 or later can authenticate a Microsoft Entra account through the IDE. Applications using the `DefaultAzureCredential` or the `VisualStudioCredential` can then use this account to authenticate calls in their application when running locally. -To authenticate in Visual Studio, select the **Tools** > **Options** menu to launch the Options dialog. Then navigate to the `Azure Service Authentication` options to sign in with your Azure AD account. +To authenticate in Visual Studio, select the **Tools** > **Options** menu to launch the Options dialog. Then navigate to the `Azure Service Authentication` options to sign in with your Microsoft Entra account. ![Visual Studio Account Selection][vs_login_image] @@ -71,7 +71,7 @@ For systems without a default web browser, the `Connect-AzAccount` command will A credential is a class which contains or can obtain the data needed for a service client to authenticate requests. Service clients across the Azure SDK accept credentials when they're constructed. Service clients use those credentials to authenticate requests to the service. -The Azure Identity library focuses on OAuth authentication with Azure AD, and it offers a variety of credential classes capable of acquiring an Azure AD token to authenticate service requests. All of the credential classes in this library are implementations of the `TokenCredential` abstract class in [Azure.Core][azure_core_library], and any of them can be used to construct service clients capable of authenticating with a `TokenCredential`. +The Azure Identity library focuses on OAuth authentication with Microsoft Entra ID, and it offers a variety of credential classes capable of acquiring a Microsoft Entra token to authenticate service requests. All of the credential classes in this library are implementations of the `TokenCredential` abstract class in [Azure.Core][azure_core_library], and any of them can be used to construct service clients capable of authenticating with a `TokenCredential`. See [Credential Classes](#credential-classes) for a complete listing of available credential types. @@ -182,7 +182,7 @@ var client = new SecretClient(new Uri("https://myvault.vault.azure.net/"), crede ## Cloud configuration -Credentials default to authenticating to the Azure AD endpoint for the Azure public cloud. To access resources in other clouds, such as Azure Government or a private cloud, configure credentials with the `AuthorityHost` argument. [AzureAuthorityHosts](https://learn.microsoft.com/dotnet/api/azure.identity.azureauthorityhosts?view=azure-dotnet) defines authorities for well-known clouds: +Credentials default to authenticating to the Microsoft Entra endpoint for the Azure public cloud. To access resources in other clouds, such as Azure Government or a private cloud, configure credentials with the `AuthorityHost` argument. [AzureAuthorityHosts](https://learn.microsoft.com/dotnet/api/azure.identity.azureauthorityhosts?view=azure-dotnet) defines authorities for well-known clouds: ```C# Snippet:AuthenticatingWithAuthorityHost var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions { AuthorityHost = AzureAuthorityHosts.AzureGovernment }); @@ -200,7 +200,7 @@ Not all credentials require this configuration. Credentials which authenticate t |[`ChainedTokenCredential`][ref_ChainedTokenCredential]|Allows users to define custom authentication flows composing multiple credentials. |[`EnvironmentCredential`][ref_EnvironmentCredential]|Authenticates a service principal or user via credential information specified in environment variables. |[`ManagedIdentityCredential`][ref_ManagedIdentityCredential]|Authenticates the managed identity of an Azure resource. -|[`WorkloadIdentityCredential`][ref_WorkloadIdentityCredential]|Supports [Azure AD workload identity](https://learn.microsoft.com/azure/aks/workload-identity-overview) on Kubernetes. +|[`WorkloadIdentityCredential`][ref_WorkloadIdentityCredential]|Supports [Microsoft Entra Workload ID](https://learn.microsoft.com/azure/aks/workload-identity-overview) on Kubernetes. ### Authenticate service principals @@ -240,16 +240,16 @@ Not all credentials require this configuration. Credentials which authenticate t |Variable name|Value |-|- -|`AZURE_CLIENT_ID`|ID of an Azure AD application -|`AZURE_TENANT_ID`|ID of the application's Azure AD tenant +|`AZURE_CLIENT_ID`|ID of a Microsoft Entra application +|`AZURE_TENANT_ID`|ID of the application's Microsoft Entra tenant |`AZURE_CLIENT_SECRET`|one of the application's client secrets #### Service principal with certificate |variable name|Value |-|- -|`AZURE_CLIENT_ID`|ID of an Azure AD application -|`AZURE_TENANT_ID`|ID of the application's Azure AD tenant +|`AZURE_CLIENT_ID`|ID of a Microsoft Entra application +|`AZURE_TENANT_ID`|ID of the application's Microsoft Entra tenant |`AZURE_CLIENT_CERTIFICATE_PATH`|path to a PFX or PEM-encoded certificate file including private key |`AZURE_CLIENT_CERTIFICATE_PASSWORD`|(optional) the password protecting the certificate file (currently only supported for PFX (PKCS12) certificates) |`AZURE_CLIENT_SEND_CERTIFICATE_CHAIN`|(optional) send certificate chain in x5c header to support subject name / issuer based authentication @@ -258,8 +258,8 @@ Not all credentials require this configuration. Credentials which authenticate t |Variable name|Value |-|- -|`AZURE_CLIENT_ID`|ID of an Azure AD application -|`AZURE_TENANT_ID`|ID of the application's Azure AD tenant +|`AZURE_CLIENT_ID`|ID of a Microsoft Entra application +|`AZURE_TENANT_ID`|ID of the application's Microsoft Entra tenant |`AZURE_USERNAME`|a username (usually an email address) |`AZURE_PASSWORD`|that user's password @@ -277,7 +277,7 @@ Token caching is a feature provided by the Azure Identity library that allows ap * Cache tokens in memory (default) or on disk (opt-in). * Improve resilience and performance. -* Reduce the number of requests made to Azure Active Directory (Azure AD) to obtain access tokens. +* Reduce the number of requests made to Microsoft Entra ID to obtain access tokens. The Azure Identity library offers both in-memory and persistent disk caching. For more details, see the [token caching documentation](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/samples/TokenCache.md) @@ -306,7 +306,7 @@ catch (AuthenticationFailedException e) } ``` -For more information on dealing with errors arising from failed requests to Azure AD or managed identity endpoints, see the Azure AD [documentation on authorization error codes][aad_err_doc]. +For more information on dealing with errors arising from failed requests to Microsoft Entra ID or managed identity endpoints, see the Microsoft Entra ID [documentation on authorization error codes][aad_err_doc]. ### Logging diff --git a/sdk/identity/Azure.Identity/TROUBLESHOOTING.md b/sdk/identity/Azure.Identity/TROUBLESHOOTING.md index d127b396981c3..d8441ac5d9bdc 100644 --- a/sdk/identity/Azure.Identity/TROUBLESHOOTING.md +++ b/sdk/identity/Azure.Identity/TROUBLESHOOTING.md @@ -1,4 +1,4 @@ -# Troubleshoot Azure Identity authentication issues +# Troubleshoot Azure Identity authentication issues This troubleshooting guide covers failure investigation techniques, common errors for the credential types in the Azure Identity library for .NET, and mitigation steps to resolve these errors. @@ -67,7 +67,7 @@ Calls to service clients resulting in `RequestFailedException` with a `StatusCod ## Find relevant information in exception messages -`AuthenticationFailedException` is thrown when unexpected errors occurred while a credential is authenticating. This can include errors received from requests to the Azure AD STS and often contains information helpful to diagnosis. Consider the following `AuthenticationFailedException` message. +`AuthenticationFailedException` is thrown when unexpected errors occurred while a credential is authenticating. This can include errors received from requests to the Microsoft Entra STS and often contains information helpful to diagnosis. Consider the following `AuthenticationFailedException` message. ![AuthenticationFailedException Message Example](https://raw.githubusercontent.com/Azure/azure-sdk-for-net/main/sdk/identity/Azure.Identity/images/AuthFailedErrorMessageExample.png) @@ -75,7 +75,7 @@ This error contains several pieces of information: - __Failing Credential Type__: The type of credential that failed to authenticate. This can be helpful when diagnosing issues with chained credential types such as `DefaultAzureCredential` or `ChainedTokenCredential`. -- __STS Error Code and Message__: The error code and message returned from the Azure AD STS. This can give insight into the specific reason the request failed. For instance, in this specific case because the provided client secret is incorrect. More information on STS error codes can be found [here](https://learn.microsoft.com/azure/active-directory/develop/reference-aadsts-error-codes#aadsts-error-codes). +- __STS Error Code and Message__: The error code and message returned from the Microsoft Entra STS. This can give insight into the specific reason the request failed. For instance, in this specific case because the provided client secret is incorrect. More information on STS error codes can be found [here](https://learn.microsoft.com/azure/active-directory/develop/reference-aadsts-error-codes#aadsts-error-codes). - __Correlation ID and Timestamp__: The correlation ID and call Timestamp used to identify the request in server-side logs. This information can be useful to support engineers when diagnosing unexpected STS failures. @@ -138,7 +138,7 @@ DefaultAzureCredentialOptions options = new DefaultAzureCredentialOptions() | Error Code | Description | Mitigation | |---|---|---| -|AADSTS700027|Client assertion contains an invalid signature.|Ensure the specified certificate has been uploaded to the Azure AD application registration. Instructions for uploading certificates to the application registration can be found [here](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-1-upload-a-certificate).| +|AADSTS700027|Client assertion contains an invalid signature.|Ensure the specified certificate has been uploaded to the Microsoft Entra application registration. Instructions for uploading certificates to the application registration can be found [here](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-1-upload-a-certificate).| |AADSTS700016|The specified application wasn't found in the specified tenant.| Ensure the specified `clientId` and `tenantId` are correct for your application registration. For multi-tenant apps, ensure the application has been added to the desired tenant by a tenant admin. To add a new application in the desired tenant, follow the instructions [here](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). ## Troubleshoot `ClientAssertionCredential` authentication issues @@ -165,7 +165,7 @@ DefaultAzureCredentialOptions options = new DefaultAzureCredentialOptions() | Error Message |Description| Mitigation | |---|---|---| -|`CredentialUnavailableException` raised with message. "WorkloadIdentityCredential authentication unavailable. The workload options are not fully configured."|The `WorkloadIdentityCredential` requires `ClientId`, `TenantId` and `TokenFilePath` to authenticate with Azure Active Directory.|
  • If using `DefaultAzureCredential` then:
    • Ensure client ID is specified via `WorkloadIdentityClientId` property on `DefaultAzureCredentialOptions` or `AZURE_CLIENT_ID` env variable.
    • Ensure tenant ID is specified via `AZURE_TENANT_ID` env variable.
    • Ensure token file path is specified via `AZURE_FEDERATED_TOKEN_FILE` env variable.
    • Ensure authority host is specified via `AZURE_AUTHORITY_HOST` env variable.
  • If using `WorkloadIdentityCredential` then:
    • Ensure tenant ID is specified via the `TenantId` property on the `WorkloadIdentityCredentialOptions` or `AZURE_TENANT_ID` env variable.
    • Ensure client ID is specified via the `ClientId` property on the `WorkloadIdentityCredentialOptions` or `AZURE_CLIENT_ID` env variable.
    • Ensure token file path is specified via the `TokenFilePath` property on the `WorkloadIdentityCredentialOptions` instance or `AZURE_FEDERATED_TOKEN_FILE` environment variable.
  • Consult the [product troubleshooting guide](https://azure.github.io/azure-workload-identity/docs/troubleshooting.html) for other issues.
+|`CredentialUnavailableException` raised with message. "WorkloadIdentityCredential authentication unavailable. The workload options are not fully configured."|The `WorkloadIdentityCredential` requires `ClientId`, `TenantId` and `TokenFilePath` to authenticate with Microsoft Entra ID.|
  • If using `DefaultAzureCredential` then:
    • Ensure client ID is specified via `WorkloadIdentityClientId` property on `DefaultAzureCredentialOptions` or `AZURE_CLIENT_ID` env variable.
    • Ensure tenant ID is specified via `AZURE_TENANT_ID` env variable.
    • Ensure token file path is specified via `AZURE_FEDERATED_TOKEN_FILE` env variable.
    • Ensure authority host is specified via `AZURE_AUTHORITY_HOST` env variable.
  • If using `WorkloadIdentityCredential` then:
    • Ensure tenant ID is specified via the `TenantId` property on the `WorkloadIdentityCredentialOptions` or `AZURE_TENANT_ID` env variable.
    • Ensure client ID is specified via the `ClientId` property on the `WorkloadIdentityCredentialOptions` or `AZURE_CLIENT_ID` env variable.
    • Ensure token file path is specified via the `TokenFilePath` property on the `WorkloadIdentityCredentialOptions` instance or `AZURE_FEDERATED_TOKEN_FILE` environment variable.
  • Consult the [product troubleshooting guide](https://azure.github.io/azure-workload-identity/docs/troubleshooting.html) for other issues.
|The workload options are not fully configured.|The workload identity configuration wasn't provided in environment variables or through `WorkloadIdentityCredentialOptions`.|Ensure the appropriate environment variables are set **prior to application startup** or are specified in code.

  • To configure the `WorkloadIdentityCredential` via the environment, ensure the variables `AZURE_AUTHORITY_HOST`, `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, and `AZURE_FEDERATED_TOKEN_FILE` are set by the admission webhook.
  • To configure the `WorkloadIdentityCredential` in code, ensure `ClientId`, `TenantId`, and `TokenFilePath` are set on the `WorkloadIdentityCredentialOptions` passed to the `WorkloadIdentityCredential` constructor.
    • | ## Troubleshoot `ManagedIdentityCredential` authentication issues @@ -240,7 +240,7 @@ curl 'http://169.254.169.254/metadata/identity/oauth2/token?resource=https://man |Failed To Read VS Code Credentials

      OR

      Authenticate via Azure Tools plugin in VS Code|No Azure account information was found in the VS Code configuration.|
      • Ensure the [Azure Account plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) is properly installed
      • Use **View > Command Palette** to execute the **Azure: Sign In** command. This command opens a browser window and displays a page that allows you to sign in to Azure.
      • If you already had the Azure Account extension installed and logged in to your account, try logging out and logging in again. Doing so will repopulate the cache and potentially mitigate the error you're getting.
      | |MSAL Interaction Required Error|The `VisualStudioCodeCredential` was able to read the cached credentials from the cache but the cached token is likely expired.|Log into the Azure Account extension via **View > Command Palette** to execute the **Azure: Sign In** command in the VS Code IDE.| |ADFS tenant not supported|ADFS tenants aren't currently supported by Visual Studio `Azure Service Authentication`.|Use credentials from a supported cloud when authenticating with Visual Studio. The supported clouds are:

      • AZURE PUBLIC CLOUD - https://login.microsoftonline.com/
      • AZURE GERMANY - https://login.microsoftonline.de/
      • AZURE CHINA - https://login.chinacloudapi.cn/
      • AZURE GOVERNMENT - https://login.microsoftonline.us/
      | -|AADSTS50020| User account '{EmailHidden}' from identity provider 'live.com' doesn't exist in tenant 'Microsoft Services' and cannot access the application '04f0c124-f2bc-4f59-8241-bf6df9866bbd'(VS with native MSA) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.|Specify a `TenantId` value that corresponds to the resource to which you're authenticating in the `VisualStudioCredentialOptions` (or the `DefaultAzureCredentialOptions` if you're using `DefaultAzureCredential`).| +|AADSTS50020| User account '{EmailHidden}' from identity provider 'live.com' doesn't exist in tenant 'Microsoft Services' and cannot access the application '04f0c124-f2bc-4f59-8241-bf6df9866bbd'(VS with native MSA) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Microsoft Entra user account.|Specify a `TenantId` value that corresponds to the resource to which you're authenticating in the `VisualStudioCredentialOptions` (or the `DefaultAzureCredentialOptions` if you're using `DefaultAzureCredential`).| ## Troubleshoot `VisualStudioCredential` authentication issues @@ -248,7 +248,7 @@ curl 'http://169.254.169.254/metadata/identity/oauth2/token?resource=https://man | Error Message |Description| Mitigation | |---|---|---| -|Failed To Read Credentials

      OR

      Authenticate via Azure Service Authentication|The `VisualStudioCredential` failed to retrieve a token from the Visual Studio authentication utility `Microsoft.Asal.TokenService.exe`.|
      • In Visual Studio, select the **Tools** > **Options** menu to launch the **Options** dialog.
      • Navigate to the **Azure Service Authentication** options to sign in with your Azure Active Directory account.
      • If you already logged in to your account, try logging out and logging in again. Doing so will repopulate the cache and potentially mitigate the error you're getting.
      | +|Failed To Read Credentials

      OR

      Authenticate via Azure Service Authentication|The `VisualStudioCredential` failed to retrieve a token from the Visual Studio authentication utility `Microsoft.Asal.TokenService.exe`.|
      • In Visual Studio, select the **Tools** > **Options** menu to launch the **Options** dialog.
      • Navigate to the **Azure Service Authentication** options to sign in with your Microsoft Entra account.
      • If you already logged in to your account, try logging out and logging in again. Doing so will repopulate the cache and potentially mitigate the error you're getting.
      | |ADFS tenant not supported|ADFS tenants aren't currently supported by Visual Studio `Azure Service Authentication`.|Use credentials from a supported cloud when authenticating with Visual Studio. The supported clouds are:

      • AZURE PUBLIC CLOUD - https://login.microsoftonline.com/
      • AZURE GERMANY - https://login.microsoftonline.de/
      • AZURE CHINA - https://login.chinacloudapi.cn/
      • AZURE GOVERNMENT - https://login.microsoftonline.us/
      | ## Troubleshoot `AzureCliCredential` authentication issues @@ -342,9 +342,9 @@ Get-AzAccessToken -ResourceUrl "https://management.core.windows.net" ## Troubleshoot WAM with MSA login issues -When using `InteractiveBrowserCredential`, by default, only the Azure AD account is listed: +When using `InteractiveBrowserCredential`, by default, only the Microsoft Entra account is listed: -![MSA Azure AD only](./images/MSA1.png) +![MSA Microsoft Entra ID only](./images/MSA1.png) If you choose "Use another account" and type in an MSA outlook.com account, it fails: diff --git a/sdk/identity/Azure.Identity/samples/ClientCertificateCredentialSamples.md b/sdk/identity/Azure.Identity/samples/ClientCertificateCredentialSamples.md index eb0ef41783016..033c8f460c0a9 100644 --- a/sdk/identity/Azure.Identity/samples/ClientCertificateCredentialSamples.md +++ b/sdk/identity/Azure.Identity/samples/ClientCertificateCredentialSamples.md @@ -1,6 +1,6 @@ # Using the ClientCertificateCredential -Applications which execute in a protected environment can authenticate using a client assertion signed by a private key whose public key or root certificate is registered with AAD. The Azure.Identity library provides the `ClientCertificateCredential` for applications choosing to authenticate this way. Below are some examples of how applications can utilize the `ClientCertificateCredential` to authenticate clients. +Applications which execute in a protected environment can authenticate using a client assertion signed by a private key whose public key or root certificate is registered with Microsoft Entra ID. The Azure.Identity library provides the `ClientCertificateCredential` for applications choosing to authenticate this way. Below are some examples of how applications can utilize the `ClientCertificateCredential` to authenticate clients. ## Loading certificates from disk @@ -20,7 +20,7 @@ var credential = new ClientCertificateCredential(tenantId, clientId, certificate ## Loading certificates from an X509Store -Applications running on platforms which provide a secure certificate store might prefer to store and retrieve certificates from there. While the `ClientCertificateCredential` doesn't directly provide a mechanism for this, the application can retrieve the appropriate certificate from the store and use it to construct the `ClientCertificateCredential`. +Applications running on platforms which provide a secure certificate store might prefer to store and retrieve certificates from there. While the `ClientCertificateCredential` doesn't directly provide a mechanism for this, the application can retrieve the appropriate certificate from the store and use it to construct the `ClientCertificateCredential`. Consider the scenario where a pinned certificate used for development authentication is stored in the Personal certificate store. Since the certificate is pinned it can be identified by its thumbprint, which the application might read from configuration or the environment. @@ -36,13 +36,13 @@ var credential = new ClientCertificateCredential(tenantId, clientId, certificate ## Rolling Certificates -Long running applications may have the need to roll certificates during process execution. Certificate rotation is not currently supported by the `ClientCertficateCredential` which treats the certificate used to construct the credential as immutable. This means that any clients constructed with an `ClientCertificateCredential` using a particular cert would fail to authenticate requests after that cert has been rolled and the original is no longer valid. +Long running applications may have the need to roll certificates during process execution. Certificate rotation is not currently supported by the `ClientCertificateCredential` which treats the certificate used to construct the credential as immutable. This means that any clients constructed with an `ClientCertificateCredential` using a particular cert would fail to authenticate requests after that cert has been rolled and the original is no longer valid. However, if an application wants to roll this certificate without creating new service clients, it can accomplish this by creating its own `TokenCredential` implementation which wraps the `ClientCertificateCredential`. The implementation of this custom credential `TokenCredential` would somewhat depend on how the application handles certificate rotation. ### Explicit rotation -If the application get's notified of certificate rotations and it can directly respond, it might choose to wrap the `ClientCertificateCredential` in a custom credential which provides a means for rotating the certificate. +If the application get's notified of certificate rotations and it can directly respond, it might choose to wrap the `ClientCertificateCredential` in a custom credential which provides a means for rotating the certificate. ```C# Snippet:Identity_CertificateCredenetial_RotatableCredential public class RotatableCertificateCredential : TokenCredential @@ -78,7 +78,7 @@ public class RotatableCertificateCredential : TokenCredential The above example shows a custom credential type `RotatableCertificateCredential` which provides a `RotateCertificateMethod`. The implementation internally relies on a `ClientCertificateCredential` instance `_credential`, and `RotateCertificate` simply replaces this instance with a new instance using the updated certificate. ### Implicit rotation -Some applications might want to respond to certificate rotations which are external to the application, for instance a separate process rotates the certificate by updating it on disk. Here the application create a custom credential which checks for certificate updates when tokens are requested. +Some applications might want to respond to certificate rotations which are external to the application, for instance a separate process rotates the certificate by updating it on disk. Here the application create a custom credential which checks for certificate updates when tokens are requested. ```C# Snippet:Identity_CertificateCredenetial_RotatingCredential public class RotatingCertificateCredential : TokenCredential @@ -130,4 +130,4 @@ public class RotatingCertificateCredential : TokenCredential } ``` -In this example the custom credential type `RotatingCertifiateCredential` again uses a `ClientCertificateCredential` instance `_credential` to retrieve tokens. However, in this case it will attempt to refresh the certificate prior to obtaining the token. The method `RefreshCertificate` will query to see if the certificate has changed, and if so it will replace the instance `_credential` with a new instance using the new certificate. +In this example the custom credential type `RotatingCertificateCredential` again uses a `ClientCertificateCredential` instance `_credential` to retrieve tokens. However, in this case it will attempt to refresh the certificate prior to obtaining the token. The method `RefreshCertificate` will query to see if the certificate has changed, and if so it will replace the instance `_credential` with a new instance using the new certificate. diff --git a/sdk/identity/Azure.Identity/samples/DefiningCustomCredentialTypes.md b/sdk/identity/Azure.Identity/samples/DefiningCustomCredentialTypes.md index 0c9c18176ad9b..da4701ea88010 100644 --- a/sdk/identity/Azure.Identity/samples/DefiningCustomCredentialTypes.md +++ b/sdk/identity/Azure.Identity/samples/DefiningCustomCredentialTypes.md @@ -1,5 +1,5 @@ # Defining Custom Credential types -The Azure.Identity library covers a broad range of Azure Active Directory authentication scenarios. However, it's possible the credential implementations in Azure.Identity might not meet the specific needs your application, or an application might want to avoid taking a dependency on the Azure.Identity library. +The Azure.Identity library covers a broad range of Microsoft Entra authentication scenarios. However, it's possible the credential implementations in Azure.Identity might not meet the specific needs your application, or an application might want to avoid taking a dependency on the Azure.Identity library. ## Authenticating with a prefetched access token diff --git a/sdk/identity/Azure.Identity/samples/TokenCache.md b/sdk/identity/Azure.Identity/samples/TokenCache.md index 586599d94120f..8bef4187b7d47 100644 --- a/sdk/identity/Azure.Identity/samples/TokenCache.md +++ b/sdk/identity/Azure.Identity/samples/TokenCache.md @@ -3,16 +3,16 @@ *Token caching* is a feature provided by the Azure Identity library that allows apps to: - Improve their resilience and performance. -- Reduce the number of requests made to Azure Active Directory (Azure AD) to obtain access tokens. +- Reduce the number of requests made to Microsoft Entra ID to obtain access tokens. - Reduce the number of times the user is prompted to authenticate. -When an app needs to access a protected Azure resource, it typically needs to obtain an access token from Azure AD. Obtaining that token involves sending a request to Azure AD and may also involve prompting the user. Azure AD then validates the credentials provided in the request and issues an access token. +When an app needs to access a protected Azure resource, it typically needs to obtain an access token from Microsoft Entra ID. Obtaining that token involves sending a request to Microsoft Entra ID and may also involve prompting the user. Microsoft Entra ID then validates the credentials provided in the request and issues an access token. -Token caching, via the Azure Identity library, allows the app to store this access token [in memory](#in-memory-token-caching), where it's accessible to the current process, or [on disk](#persistent-token-caching) where it can be accessed across application or process invocations. The token can then be retrieved quickly and easily the next time the app needs to access the same resource. The app can avoid making another request to Azure AD, which reduces network traffic and improves resilience. Additionally, in scenarios where the app is authenticating users, token caching also avoids prompting the user each time new tokens are requested. +Token caching, via the Azure Identity library, allows the app to store this access token [in memory](#in-memory-token-caching), where it's accessible to the current process, or [on disk](#persistent-token-caching) where it can be accessed across application or process invocations. The token can then be retrieved quickly and easily the next time the app needs to access the same resource. The app can avoid making another request to Microsoft Entra ID, which reduces network traffic and improves resilience. Additionally, in scenarios where the app is authenticating users, token caching also avoids prompting the user each time new tokens are requested. ### In-memory token caching -*In-memory token caching* is the default option provided by the Azure Identity library. This caching approach allows apps to store access tokens in memory. With in-memory token caching, the library first determines if a valid access token for the requested resource is already stored in memory. If a valid token is found, it's returned to the app without the need to make another request to Azure AD. If a valid token isn't found, the library will automatically acquire a token by sending a request to Azure AD. +*In-memory token caching* is the default option provided by the Azure Identity library. This caching approach allows apps to store access tokens in memory. With in-memory token caching, the library first determines if a valid access token for the requested resource is already stored in memory. If a valid token is found, it's returned to the app without the need to make another request to Microsoft Entra ID. If a valid token isn't found, the library will automatically acquire a token by sending a request to Microsoft Entra ID. The in-memory token cache provided by the Azure Identity library is thread-safe. @@ -32,10 +32,10 @@ As there are many levels of cache, it's not possible to disable in-memory cachin | macOS | Keychain | | Windows | DPAPI | -With persistent disk token caching enabled, the library first determines if a valid access token for the requested resource is already stored in the persistent cache. If a valid token is found, it's returned to the app without the need to make another request to Azure AD. Additionally, the tokens are preserved across app runs, which: +With persistent disk token caching enabled, the library first determines if a valid access token for the requested resource is already stored in the persistent cache. If a valid token is found, it's returned to the app without the need to make another request to Microsoft Entra ID. Additionally, the tokens are preserved across app runs, which: - Makes the app more resilient to failures. -- Ensures the app can continue to function during an Azure AD outage or disruption. +- Ensures the app can continue to function during a Microsoft Entra ID outage or disruption. - Avoids having to prompt users to authenticate each time the process is restarted. diff --git a/sdk/identity/Azure.Identity/src/AzureAuthorityHosts.cs b/sdk/identity/Azure.Identity/src/AzureAuthorityHosts.cs index d707aaafe3d77..d831421ddd784 100644 --- a/sdk/identity/Azure.Identity/src/AzureAuthorityHosts.cs +++ b/sdk/identity/Azure.Identity/src/AzureAuthorityHosts.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -15,22 +15,22 @@ public static class AzureAuthorityHosts private const string AzureGermanyHostUrl = "https://login.microsoftonline.de/"; private const string AzureGovernmentHostUrl = "https://login.microsoftonline.us/"; /// - /// The host of the Azure Active Directory authority for tenants in the Azure Public Cloud. + /// The host of the Microsoft Entra authority for tenants in the Azure Public Cloud. /// public static Uri AzurePublicCloud { get; } = new Uri(AzurePublicCloudHostUrl); /// - /// The host of the Azure Active Directory authority for tenants in the Azure China Cloud. + /// The host of the Microsoft Entra authority for tenants in the Azure China Cloud. /// public static Uri AzureChina { get; } = new Uri(AzureChinaHostUrl); /// - /// The host of the Azure Active Directory authority for tenants in the Azure German Cloud. + /// The host of the Microsoft Entra authority for tenants in the Azure German Cloud. /// public static Uri AzureGermany { get; } = new Uri(AzureGermanyHostUrl); /// - /// The host of the Azure Active Directory authority for tenants in the Azure US Government Cloud. + /// The host of the Microsoft Entra authority for tenants in the Azure US Government Cloud. /// public static Uri AzureGovernment { get; } = new Uri(AzureGovernmentHostUrl); diff --git a/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs index deb75f3111f53..cb62f975a48ac 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -12,8 +12,8 @@ namespace Azure.Identity { /// - /// Authenticates by redeeming an authorization code previously obtained from Azure Active Directory. See - /// for more information + /// Authenticates by redeeming an authorization code previously obtained from Microsoft Entra ID. See + /// for more information /// about the authorization code authentication flow. /// public class AuthorizationCodeCredential : TokenCredential @@ -35,7 +35,7 @@ protected AuthorizationCodeCredential() } /// - /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Azure Active Directory with a prefetched authorization code. + /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -48,7 +48,7 @@ public AuthorizationCodeCredential(string tenantId, string clientId, string clie } /// - /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Azure Active Directory with a prefetched authorization code. + /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -65,7 +65,7 @@ public AuthorizationCodeCredential( { } /// - /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Azure Active Directory with a prefetched authorization code. + /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -107,7 +107,7 @@ internal AuthorizationCodeCredential(string tenantId, string clientId, string cl } /// - /// Obtains a token from the Azure Active Directory service, using the specified authorization code to authenticate. Acquired tokens + /// Obtains a token from Microsoft Entra ID, using the specified authorization code to authenticate. Acquired tokens /// are cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, reuse credential /// instances to optimize cache effectiveness. /// @@ -120,7 +120,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell } /// - /// Obtains a token from the Azure Active Directory service, using the specified authorization code to authenticate. Acquired tokens + /// Obtains a token from Microsoft Entra ID, using the specified authorization code to authenticate. Acquired tokens /// are cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, reuse credential /// instances to optimize cache effectiveness. /// diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs index 8360f77bb8970..33ace73f40c77 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -16,7 +16,7 @@ namespace Azure.Identity { /// - /// Enables authentication to Azure Active Directory using Azure CLI to obtain an access token. + /// Enables authentication to Microsoft Entra ID using Azure CLI to obtain an access token. /// public class AzureCliCredential : TokenCredential { diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs index aada387c93cc5..8b3ca75c8a6e2 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs @@ -16,7 +16,7 @@ namespace Azure.Identity { /// - /// Enables authentication to Azure Active Directory using Azure Developer CLI to obtain an access token. + /// Enables authentication to Microsoft Entra ID using Azure Developer CLI to obtain an access token. /// public class AzureDeveloperCliCredential : TokenCredential { diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs index 2f3148507a66c..0fd4d3bfdda12 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -16,7 +16,7 @@ namespace Azure.Identity { /// - /// Enables authentication to Azure Active Directory using Azure PowerShell to obtain an access token. + /// Enables authentication to Microsoft Entra ID using Azure PowerShell to obtain an access token. /// public class AzurePowerShellCredential : TokenCredential { diff --git a/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs index 632aa1b7c67cb..6585aa1e7ac9f 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -13,7 +13,7 @@ namespace Azure.Identity { /// - /// Enables authentication of an AAD service principal using a signed client assertion. + /// Enables authentication of a Microsoft Entra service principal using a signed client assertion. /// public class ClientAssertionCredential : TokenCredential { @@ -32,7 +32,7 @@ protected ClientAssertionCredential() { } /// - /// Creates an instance of the ClientCertificateCredential with an asynchronous callback that provides a signed client assertion to authenticate against Azure Active Directory. + /// Creates an instance of the ClientCertificateCredential with an asynchronous callback that provides a signed client assertion to authenticate against Microsoft Entra ID. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -51,7 +51,7 @@ public ClientAssertionCredential(string tenantId, string clientId, Func - /// Creates an instance of the ClientCertificateCredential with a synchronous callback that provides a signed client assertion to authenticate against Azure Active Directory. + /// Creates an instance of the ClientCertificateCredential with a synchronous callback that provides a signed client assertion to authenticate against Microsoft Entra ID. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -70,7 +70,7 @@ public ClientAssertionCredential(string tenantId, string clientId, Func } /// - /// Obtains a token from the Azure Active Directory service, by calling the assertionCallback specified when constructing the credential to obtain a client assertion for authentication. + /// Obtains a token from Microsoft Entra ID, by calling the assertionCallback specified when constructing the credential to obtain a client assertion for authentication. /// /// The details of the authentication request. /// A controlling the request lifetime. @@ -94,7 +94,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell } /// - /// Obtains a token from the Azure Active Directory service, by calling the assertionCallback specified when constructing the credential to obtain a client assertion for authentication. + /// Obtains a token from Microsoft Entra ID, by calling the assertionCallback specified when constructing the credential to obtain a client assertion for authentication. /// /// The details of the authentication request. /// A controlling the request lifetime. diff --git a/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs index cdfbcdbe86f9c..3659ea8f3f771 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using Azure.Core; @@ -13,16 +13,16 @@ namespace Azure.Identity { /// - /// Enables authentication of a service principal in to Azure Active Directory using a X509 certificate that is assigned to it's App Registration. More information + /// Enables authentication of a service principal to Microsoft Entra ID using a X509 certificate that is assigned to it's App Registration. More information /// on how to configure certificate authentication can be found here: - /// https://docs.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials#register-your-certificate-with-azure-ad + /// https://learn.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials#register-your-certificate-with-azure-ad /// public class ClientCertificateCredential : TokenCredential { internal const string Troubleshooting = "See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/clientcertificatecredential/troubleshoot"; /// - /// Gets the Azure Active Directory tenant (directory) Id of the service principal + /// Gets the Microsoft Entra tenant (directory) ID of the service principal /// internal string TenantId { get; } @@ -46,7 +46,7 @@ protected ClientCertificateCredential() { } /// - /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Azure Active Directory with the specified certificate. + /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Microsoft Entra ID with the specified certificate. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -56,7 +56,7 @@ public ClientCertificateCredential(string tenantId, string clientId, string clie { } /// - /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Azure Active Directory with the specified certificate. + /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Microsoft Entra ID with the specified certificate. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -68,7 +68,7 @@ public ClientCertificateCredential(string tenantId, string clientId, string clie { } /// - /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Azure Active Directory with the specified certificate. + /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Microsoft Entra ID with the specified certificate. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -79,7 +79,7 @@ public ClientCertificateCredential(string tenantId, string clientId, string clie { } /// - /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Azure Active Directory with the specified certificate. + /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Microsoft Entra ID with the specified certificate. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -89,7 +89,7 @@ public ClientCertificateCredential(string tenantId, string clientId, X509Certifi { } /// - /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Azure Active Directory with the specified certificate. + /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Microsoft Entra ID with the specified certificate. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -101,7 +101,7 @@ public ClientCertificateCredential(string tenantId, string clientId, X509Certifi { } /// - /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Azure Active Directory with the specified certificate. + /// Creates an instance of the ClientCertificateCredential with the details needed to authenticate against Microsoft Entra ID with the specified certificate. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -171,7 +171,7 @@ internal ClientCertificateCredential( } /// - /// Obtains a token from the Azure Active Directory service, using the specified X509 certificate to authenticate. Acquired tokens are + /// Obtains a token from Microsoft Entra ID, using the specified X509 certificate to authenticate. Acquired tokens are /// cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, reuse credential /// instances to optimize cache effectiveness. /// @@ -196,7 +196,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell } /// - /// Obtains a token from the Azure Active Directory service, using the specified X509 certificate to authenticate. Acquired tokens are + /// Obtains a token from Microsoft Entra ID, using the specified X509 certificate to authenticate. Acquired tokens are /// cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, reuse credential /// instances to optimize cache effectiveness. /// diff --git a/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs index d8713acb28e3a..5bc95da240e63 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -11,7 +11,7 @@ namespace Azure.Identity { /// - /// Enables authentication to Azure Active Directory using a client secret that was generated for an App Registration. More information on how + /// Enables authentication to Microsoft Entra ID using a client secret that was generated for an App Registration. More information on how /// to configure a client secret can be found here: /// https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application /// @@ -24,7 +24,7 @@ public class ClientSecretCredential : TokenCredential internal MsalConfidentialClient Client { get; } /// - /// Gets the Azure Active Directory tenant (directory) Id of the service principal + /// Gets the Microsoft Entra tenant (directory) Id of the service principal /// internal string TenantId { get; } @@ -46,7 +46,7 @@ protected ClientSecretCredential() } /// - /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Azure Active Directory with a client secret. + /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a client secret. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -57,7 +57,7 @@ public ClientSecretCredential(string tenantId, string clientId, string clientSec } /// - /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Azure Active Directory with a client secret. + /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a client secret. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -69,7 +69,7 @@ public ClientSecretCredential(string tenantId, string clientId, string clientSec } /// - /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Azure Active Directory with a client secret. + /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a client secret. /// /// The Azure Active Directory tenant (directory) Id of the service principal. /// The client (application) ID of the service principal @@ -102,7 +102,7 @@ internal ClientSecretCredential(string tenantId, string clientId, string clientS } /// - /// Obtains a token from the Azure Active Directory service, using the specified client secret to authenticate. Acquired tokens are cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, reuse credential instances to optimize cache effectiveness. + /// Obtains a token from Microsoft Entra ID, using the specified client secret to authenticate. Acquired tokens are cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, reuse credential instances to optimize cache effectiveness. /// /// The details of the authentication request. /// A controlling the request lifetime. @@ -125,7 +125,7 @@ public override async ValueTask GetTokenAsync(TokenRequestContext r } /// - /// Obtains a token from the Azure Active Directory service, using the specified client secret to authenticate. Acquired tokens are cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, reuse credential instances to optimize cache effectiveness. + /// Obtains a token from Microsoft Entra ID, using the specified client secret to authenticate. Acquired tokens are cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, reuse credential instances to optimize cache effectiveness. /// /// The details of the authentication request. /// A controlling the request lifetime. diff --git a/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs index 7493994d7e2f3..2486f5f26c28e 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -11,7 +11,7 @@ namespace Azure.Identity { /// - /// Enables authentication to Azure Active Directory using a client secret or certificate, or as a user + /// Enables authentication to Microsoft Entra ID using a client secret or certificate, or as a user /// with a username and password. /// /// Configuration is attempted in this order, using these environment variables: @@ -20,7 +20,7 @@ namespace Azure.Identity /// Service principal with secret: /// /// VariableDescription - /// AZURE_TENANT_IDThe Azure Active Directory tenant (directory) ID. + /// AZURE_TENANT_IDThe Microsoft Entra tenant (directory) ID. /// AZURE_CLIENT_IDThe client (application) ID of an App Registration in the tenant. /// AZURE_CLIENT_SECRETA client secret that was generated for the App Registration. /// @@ -28,7 +28,7 @@ namespace Azure.Identity /// Service principal with certificate: /// /// VariableDescription - /// AZURE_TENANT_IDThe Azure Active Directory tenant (directory) ID. + /// AZURE_TENANT_IDThe Microsoft Entra tenant (directory) ID. /// AZURE_CLIENT_IDThe client (application) ID of an App Registration in the tenant. /// AZURE_CLIENT_CERTIFICATE_PATHA path to certificate and private key pair in PEM or PFX format, which can authenticate the App Registration. /// AZURE_CLIENT_CERTIFICATE_PASSWORD(Optional) The password protecting the certificate file (currently only supported for PFX (PKCS12) certificates). @@ -38,10 +38,10 @@ namespace Azure.Identity /// Username and password: /// /// VariableDescription - /// AZURE_TENANT_IDThe Azure Active Directory tenant (directory) ID. + /// AZURE_TENANT_IDThe Microsoft Entra tenant (directory) ID. /// AZURE_CLIENT_IDThe client (application) ID of an App Registration in the tenant. - /// AZURE_USERNAMEThe username, also known as upn, of an Azure Active Directory user account. - /// AZURE_PASSWORDThe password of the Azure Active Directory user account. Note this does not support accounts with MFA enabled. + /// AZURE_USERNAMEThe username, also known as upn, of a Microsoft Entra user account. + /// AZURE_PASSWORDThe password of the Microsoft Entra user account. Note this does not support accounts with MFA enabled. /// /// /// This credential ultimately uses a , , or to @@ -126,7 +126,7 @@ internal EnvironmentCredential(CredentialPipeline pipeline, TokenCredential cred } /// - /// Obtains a token from the Azure Active Directory service, using the specified client details specified in the environment variables + /// Obtains a token from Microsoft Entra ID, using the specified client details specified in the environment variables /// AZURE_TENANT_ID, AZURE_CLIENT_ID, and AZURE_CLIENT_SECRET or AZURE_USERNAME and AZURE_PASSWORD to authenticate. /// Acquired tokens are cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, /// reuse credential instances to optimize cache effectiveness. @@ -143,7 +143,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell } /// - /// Obtains a token from the Azure Active Directory service, using the specified client details specified in the environment variables + /// Obtains a token from Microsoft Entra ID, using the specified client details specified in the environment variables /// AZURE_TENANT_ID, AZURE_CLIENT_ID, and AZURE_CLIENT_SECRET or AZURE_USERNAME and AZURE_PASSWORD to authenticate. /// Acquired tokens are cached by the credential instance. Token lifetime and refreshing is handled automatically. Where possible, /// reuse credential instances to optimize cache effectiveness. diff --git a/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs index cd720f8119827..c8bb2f0ec7454 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs @@ -12,7 +12,7 @@ namespace Azure.Identity { /// - /// Enables authentication to Azure Active Directory using an On-Behalf-Of flow. + /// Enables authentication to Microsoft Entra ID using an On-Behalf-Of flow. /// public class OnBehalfOfCredential : TokenCredential { @@ -31,9 +31,9 @@ protected OnBehalfOfCredential() { } /// - /// Creates an instance of the with the details needed to authenticate against Azure Active Directory with the specified certificate. + /// Creates an instance of the with the details needed to authenticate against Microsoft Entra ID with the specified certificate. /// - /// The Azure Active Directory tenant (directory) Id of the service principal. + /// The Microsoft Entra tenant (directory) ID of the service principal. /// The client (application) ID of the service principal /// The authentication X509 Certificate of the service principal /// The access token that will be used by as the user assertion when requesting On-Behalf-Of tokens. @@ -42,21 +42,21 @@ public OnBehalfOfCredential(string tenantId, string clientId, X509Certificate2 c { } /// - /// Creates an instance of the with the details needed to authenticate against Azure Active Directory with the specified certificate. + /// Creates an instance of the with the details needed to authenticate against Microsoft Entra ID with the specified certificate. /// - /// The Azure Active Directory tenant (directory) Id of the service principal. + /// The Microsoft Entra tenant (directory) ID of the service principal. /// The client (application) ID of the service principal /// The authentication X509 Certificate of the service principal /// The access token that will be used by as the user assertion when requesting On-Behalf-Of tokens. - /// Options that allow to configure the management of the requests sent to the Azure Active Directory service. + /// Options that allow to configure the management of the requests sent to Microsoft Entra ID. public OnBehalfOfCredential(string tenantId, string clientId, X509Certificate2 clientCertificate, string userAssertion, OnBehalfOfCredentialOptions options) : this(tenantId, clientId, clientCertificate, userAssertion, options, null, null) { } /// - /// Creates an instance of the with the details needed to authenticate with Azure Active Directory. + /// Creates an instance of the with the details needed to authenticate with Microsoft Entra ID. /// - /// The Azure Active Directory tenant (directory) Id of the service principal. + /// The Microsoft Entra tenant (directory) ID of the service principal. /// The client (application) ID of the service principal /// A client secret that was generated for the App Registration used to authenticate the client. /// The access token that will be used by as the user assertion when requesting On-Behalf-Of tokens. @@ -69,13 +69,13 @@ public OnBehalfOfCredential( { } /// - /// Creates an instance of the with the details needed to authenticate with Azure Active Directory. + /// Creates an instance of the with the details needed to authenticate with Microsoft Entra ID. /// - /// The Azure Active Directory tenant (directory) Id of the service principal. + /// The Microsoft Entra tenant (directory) ID of the service principal. /// The client (application) ID of the service principal /// A client secret that was generated for the App Registration used to authenticate the client. /// The access token that will be used by as the user assertion when requesting On-Behalf-Of tokens. - /// Options that allow to configure the management of the requests sent to the Azure Active Directory service. + /// Options that allow to configure the management of the requests sent to Microsoft Entra ID. public OnBehalfOfCredential( string tenantId, string clientId, @@ -154,7 +154,7 @@ internal OnBehalfOfCredential( } /// - /// Authenticates with Azure Active Directory and returns an access token if successful. + /// Authenticates with Microsoft Entra ID and returns an access token if successful. /// Acquired tokens are cached by the credential instance. Token lifetime and refreshing is /// handled automatically. Where possible, reuse credential instances to optimize cache /// effectiveness. @@ -166,7 +166,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell GetTokenInternalAsync(requestContext, false, cancellationToken).EnsureCompleted(); /// - /// Authenticates with Azure Active Directory and returns an access token if successful. + /// Authenticates with Microsoft Entra ID and returns an access token if successful. /// Acquired tokens are cached by the credential instance. Token lifetime and refreshing is /// handled automatically. Where possible, reuse credential instances to optimize cache /// effectiveness. diff --git a/sdk/identity/Azure.Identity/src/Credentials/TokenCredentialOptions.cs b/sdk/identity/Azure.Identity/src/Credentials/TokenCredentialOptions.cs index 915e4859afc07..cdd0086356869 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/TokenCredentialOptions.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/TokenCredentialOptions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -23,7 +23,7 @@ public TokenCredentialOptions() } /// - /// The host of the Azure Active Directory authority. The default is https://login.microsoftonline.com/. For well known authority hosts for Azure cloud instances see . + /// The host of the Microsoft Entra authority. The default is https://login.microsoftonline.com/. For well known authority hosts for Azure cloud instances see . /// public Uri AuthorityHost { diff --git a/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs index cf21e82f20751..551ce7c531468 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using Azure.Core; @@ -12,7 +12,7 @@ namespace Azure.Identity { /// - /// Enables authentication to Azure Active Directory using a user's username and password. If the user has MFA enabled this + /// Enables authentication to Microsoft Entra ID using a user's username and password. If the user has MFA enabled this /// credential will fail to get a token throwing an . Also, this credential requires a high degree of /// trust and is not recommended outside of prototyping when more secure credentials can be used. /// @@ -38,7 +38,7 @@ protected UsernamePasswordCredential() { } /// - /// Creates an instance of the with the details needed to authenticate against Azure Active Directory with a simple username + /// Creates an instance of the with the details needed to authenticate against Microsoft Entra ID with a simple username /// and password. /// /// The user account's username, also known as UPN. @@ -50,7 +50,7 @@ public UsernamePasswordCredential(string username, string password, string tenan { } /// - /// Creates an instance of the with the details needed to authenticate against Azure Active Directory with a simple username + /// Creates an instance of the with the details needed to authenticate against Microsoft Entra ID with a simple username /// and password. /// /// The user account's user name, UPN. @@ -63,7 +63,7 @@ public UsernamePasswordCredential(string username, string password, string tenan { } /// - /// Creates an instance of the with the details needed to authenticate against Azure Active Directory with a simple username + /// Creates an instance of the with the details needed to authenticate against Microsoft Entra ID with a simple username /// and password. /// /// The user account's user name, UPN. diff --git a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs index 4e482cf87a4eb..9e3fde5810421 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -15,7 +15,7 @@ namespace Azure.Identity { /// - /// Enables authentication to Azure Active Directory as the user signed in to Visual Studio Code via + /// Enables authentication to Microsoft Entra ID as the user signed in to Visual Studio Code via /// the 'Azure Account' extension. /// /// It's a known issue that `VisualStudioCodeCredential` diff --git a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs index f8d1301b1b1dd..01afc5f504877 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -17,7 +17,7 @@ namespace Azure.Identity { /// - /// Enables authentication to Azure Active Directory using data from Visual Studio 2017 or later. See + /// Enables authentication to Microsoft Entra ID using data from Visual Studio 2017 or later. See /// for more information /// on how to configure Visual Studio for Azure development. /// diff --git a/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs index f41a3ac678b1a..e77bddcd266af 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -13,8 +13,8 @@ namespace Azure.Identity { /// - /// WorkloadIdentityCredential supports Azure workload identity authentication on Kubernetes and other hosts supporting workload identity. - /// Refer to Azure Active Directory Workload Identity for more information. + /// WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Kubernetes and other hosts supporting workload identity. + /// Refer to Microsoft Entra Workload ID for more information. /// public class WorkloadIdentityCredential : TokenCredential { 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 086796b55858b..1d9b7e97b46c7 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateTestAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -21,7 +21,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { passFailCriteria = new { @@ -149,7 +149,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateTest("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -161,7 +161,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { passFailCriteria = new { @@ -611,7 +611,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { components = new { @@ -629,7 +629,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { components = new { @@ -667,7 +667,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { components = new { @@ -685,7 +685,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { components = new { @@ -795,7 +795,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -807,7 +807,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { metrics = new { @@ -849,7 +849,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -861,7 +861,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { metrics = new { 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 f5d78d844186f..5ddface5c93e1 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml @@ -709,7 +709,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { components = new { @@ -727,7 +727,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { components = new { @@ -765,7 +765,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { components = new { @@ -783,7 +783,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { components = new { @@ -893,7 +893,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -905,7 +905,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { metrics = new { @@ -947,7 +947,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -959,7 +959,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { metrics = new { @@ -1075,7 +1075,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = null; +using RequestContent content = null; await foreach (BinaryData item in client.GetMetricsAsync("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -1088,7 +1088,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { filters = new object[] { @@ -1120,7 +1120,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = null; +using RequestContent content = null; foreach (BinaryData item in client.GetMetrics("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -1133,7 +1133,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { filters = new object[] { 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 e5822c259d4ca..e1f2f4a986ab0 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 @@ -26,7 +26,7 @@ public void Example_CreateOrUpdateTest_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateTest("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -41,7 +41,7 @@ public async Task Example_CreateOrUpdateTest_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateTestAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -56,7 +56,7 @@ public void Example_CreateOrUpdateTest_AllParameters() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { passFailCriteria = new { @@ -184,7 +184,7 @@ public async Task Example_CreateOrUpdateTest_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { passFailCriteria = new { @@ -658,7 +658,7 @@ public void Example_CreateOrUpdateAppComponents_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { components = new { @@ -679,7 +679,7 @@ public async Task Example_CreateOrUpdateAppComponents_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { components = new { @@ -700,7 +700,7 @@ public void Example_CreateOrUpdateAppComponents_AllParameters() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { components = new { @@ -738,7 +738,7 @@ public async Task Example_CreateOrUpdateAppComponents_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { components = new { @@ -854,7 +854,7 @@ public void Example_CreateOrUpdateServerMetricsConfig_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -869,7 +869,7 @@ public async Task Example_CreateOrUpdateServerMetricsConfig_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -884,7 +884,7 @@ public void Example_CreateOrUpdateServerMetricsConfig_AllParameters() TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { metrics = new { @@ -926,7 +926,7 @@ public async Task Example_CreateOrUpdateServerMetricsConfig_AllParameters_Async( TokenCredential credential = new DefaultAzureCredential(); LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { metrics = new { 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 9979f8280db8c..9e37b8bbee684 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 @@ -762,7 +762,7 @@ public void Example_CreateOrUpdateAppComponents_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { components = new { @@ -783,7 +783,7 @@ public async Task Example_CreateOrUpdateAppComponents_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { components = new { @@ -804,7 +804,7 @@ public void Example_CreateOrUpdateAppComponents_AllParameters() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { components = new { @@ -842,7 +842,7 @@ public async Task Example_CreateOrUpdateAppComponents_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { components = new { @@ -958,7 +958,7 @@ public void Example_CreateOrUpdateServerMetricsConfig_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -973,7 +973,7 @@ public async Task Example_CreateOrUpdateServerMetricsConfig_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -988,7 +988,7 @@ public void Example_CreateOrUpdateServerMetricsConfig_AllParameters() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { metrics = new { @@ -1030,7 +1030,7 @@ public async Task Example_CreateOrUpdateServerMetricsConfig_AllParameters_Async( TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { metrics = new { @@ -1152,7 +1152,7 @@ public void Example_GetMetrics_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = null; + using RequestContent content = null; foreach (BinaryData item in client.GetMetrics("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -1168,7 +1168,7 @@ public async Task Example_GetMetrics_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = null; + using RequestContent content = null; await foreach (BinaryData item in client.GetMetricsAsync("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; @@ -1184,7 +1184,7 @@ public void Example_GetMetrics_AllParameters() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { filters = new object[] { @@ -1216,7 +1216,7 @@ public async Task Example_GetMetrics_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { filters = new object[] { diff --git a/sdk/monitor/Azure.Monitor.Ingestion/CHANGELOG.md b/sdk/monitor/Azure.Monitor.Ingestion/CHANGELOG.md index dd037a9ac0844..bb3f81d11d12c 100644 --- a/sdk/monitor/Azure.Monitor.Ingestion/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.Ingestion/CHANGELOG.md @@ -1,16 +1,25 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (Unreleased) ### Features Added ### Breaking Changes ### Bugs Fixed - - Fix sovereign support for US Gov and China clouds ### Other Changes +## 1.1.0 (2023-10-10) + +## Features Added +- Added `LogsIngestionAudience` for multi-cloud support to allow users to select the Azure cloud where the resource is located. + +## 1.1.0-beta.1 (2023-10-10) + +### Bugs Fixed +- Fix sovereign support for US Gov and China clouds + ## 1.0.0 (2023-02-21) ### Features Added diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Azure.Monitor.Ingestion.csproj b/sdk/monitor/Azure.Monitor.Ingestion/src/Azure.Monitor.Ingestion.csproj index 4f71491c5461b..d8fc5034664a3 100644 --- a/sdk/monitor/Azure.Monitor.Ingestion/src/Azure.Monitor.Ingestion.csproj +++ b/sdk/monitor/Azure.Monitor.Ingestion/src/Azure.Monitor.Ingestion.csproj @@ -2,9 +2,9 @@ A library for ingesting data to Azure Monitor. Azure Monitor Ingestion client library - 1.1.0-beta.1 + 1.2.0-beta.1 - 1.0.0 + 1.1.0 Azure Monitor Ingestion $(RequiredTargetFrameworks);net461 $(NoWarn);CA1835 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 33ddab341e4d8..7d2530c2b7e1e 100644 --- a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml +++ b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -23,7 +23,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -40,7 +40,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -54,7 +54,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); 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 fbb7b292f6c8c..8b4c67db357c6 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 @@ -25,7 +25,7 @@ public void Example_Upload_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -42,7 +42,7 @@ public async Task Example_Upload_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -59,7 +59,7 @@ public void Example_Upload_AllParameters() TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -76,7 +76,7 @@ public async Task Example_Upload_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/OpenAIClient.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/OpenAIClient.cs index 5c9517355a947..e104ca9fd6819 100644 --- a/sdk/openai/Azure.AI.OpenAI/src/Generated/OpenAIClient.cs +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/OpenAIClient.cs @@ -47,7 +47,8 @@ internal virtual async Task> Be Argument.AssertNotNull(imageGenerationOptions, nameof(imageGenerationOptions)); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = await BeginAzureBatchImageGenerationAsync(waitUntil, imageGenerationOptions.ToRequestContent(), context).ConfigureAwait(false); + using RequestContent content = imageGenerationOptions.ToRequestContent(); + Operation response = await BeginAzureBatchImageGenerationAsync(waitUntil, content, context).ConfigureAwait(false); return ProtocolOperationHelpers.Convert(response, BatchImageGenerationOperationResponse.FromResponse, ClientDiagnostics, "OpenAIClient.BeginAzureBatchImageGeneration"); } @@ -61,7 +62,8 @@ internal virtual Operation BeginAzureBatc Argument.AssertNotNull(imageGenerationOptions, nameof(imageGenerationOptions)); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = BeginAzureBatchImageGeneration(waitUntil, imageGenerationOptions.ToRequestContent(), context); + using RequestContent content = imageGenerationOptions.ToRequestContent(); + Operation response = BeginAzureBatchImageGeneration(waitUntil, content, context); return ProtocolOperationHelpers.Convert(response, BatchImageGenerationOperationResponse.FromResponse, ClientDiagnostics, "OpenAIClient.BeginAzureBatchImageGeneration"); } 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 8b97b5e4f4a41..92ae036615504 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 @@ -133,7 +133,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -145,7 +145,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -200,7 +200,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -212,7 +212,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -319,7 +319,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -331,7 +331,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { keyType = "PrimaryAtlasKafkaKey", }); @@ -350,7 +350,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -362,7 +362,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { keyType = "PrimaryAtlasKafkaKey", }); 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 6346b77e16ef3..5748f8ad4e26c 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 @@ -81,7 +81,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -93,7 +93,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { description = "", friendlyName = "", @@ -127,7 +127,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -139,7 +139,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { description = "", friendlyName = "", 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 4e2e9530fe1a4..c56b282178cd4 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 @@ -227,7 +227,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -239,7 +239,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { advancedResourceSet = new { @@ -448,7 +448,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -460,7 +460,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { advancedResourceSet = new { 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 329250bf5bd41..4395711971cb4 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 @@ -156,7 +156,7 @@ public void Example_UpdateAccountProperties_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -171,7 +171,7 @@ public async Task Example_UpdateAccountProperties_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -186,7 +186,7 @@ public void Example_UpdateAccountProperties_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -241,7 +241,7 @@ public async Task Example_UpdateAccountProperties_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -354,7 +354,7 @@ public void Example_RegenerateAccessKey_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -369,7 +369,7 @@ public async Task Example_RegenerateAccessKey_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -384,7 +384,7 @@ public void Example_RegenerateAccessKey_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { keyType = "PrimaryAtlasKafkaKey", }); @@ -403,7 +403,7 @@ public async Task Example_RegenerateAccessKey_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { keyType = "PrimaryAtlasKafkaKey", }); 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 3371b78c1c0fa..a57ea376b0d2d 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 @@ -104,7 +104,7 @@ public void Example_CreateOrUpdateCollection_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -119,7 +119,7 @@ public async Task Example_CreateOrUpdateCollection_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -134,7 +134,7 @@ public void Example_CreateOrUpdateCollection_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { description = "", friendlyName = "", @@ -168,7 +168,7 @@ public async Task Example_CreateOrUpdateCollection_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { description = "", friendlyName = "", 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 1c413281ab74e..24d01d86f4154 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 @@ -250,7 +250,7 @@ public void Example_CreateOrUpdateResourceSetRule_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -265,7 +265,7 @@ public async Task Example_CreateOrUpdateResourceSetRule_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -280,7 +280,7 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { advancedResourceSet = new { @@ -489,7 +489,7 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { advancedResourceSet = new { diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/assets.json b/sdk/purview/Azure.Analytics.Purview.Administration/assets.json index 7151bbb630304..d6a63dd12ef32 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/assets.json +++ b/sdk/purview/Azure.Analytics.Purview.Administration/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/purview/Azure.Analytics.Purview.Administration", - "Tag": "net/purview/Azure.Analytics.Purview.Administration_6bb65ebe43" + "Tag": "net/purview/Azure.Analytics.Purview.Administration_01092e8843" } 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 8b97b5e4f4a41..92ae036615504 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 @@ -133,7 +133,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -145,7 +145,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -200,7 +200,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -212,7 +212,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -319,7 +319,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -331,7 +331,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { keyType = "PrimaryAtlasKafkaKey", }); @@ -350,7 +350,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -362,7 +362,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { keyType = "PrimaryAtlasKafkaKey", }); 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 6346b77e16ef3..9fa8b4c3c768f 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 @@ -81,7 +81,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -93,13 +93,14 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { description = "", friendlyName = "", parentCollection = new { referenceName = "", + type = "", }, }); Response response = await client.CreateOrUpdateCollectionAsync(content); @@ -127,7 +128,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -139,13 +140,14 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { description = "", friendlyName = "", parentCollection = new { referenceName = "", + type = "", }, }); Response response = client.CreateOrUpdateCollection(content); 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 5ac94438c086f..cd76847a8f1a9 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); -RequestContent content = null; +using RequestContent content = null; Response response = await client.UpdateMetadataPolicyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -21,7 +21,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { name = "", id = "", @@ -73,6 +73,7 @@ RequestContent content = RequestContent.Create(new }, collection = new { + type = "", referenceName = "", }, parentCollectionName = "", @@ -113,7 +114,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); -RequestContent content = null; +using RequestContent content = null; Response response = client.UpdateMetadataPolicy("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -125,7 +126,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { name = "", id = "", @@ -177,6 +178,7 @@ RequestContent content = RequestContent.Create(new }, collection = new { + type = "", referenceName = "", }, parentCollectionName = "", @@ -311,6 +313,8 @@ 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. @@ -321,6 +325,29 @@ PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, " await foreach (BinaryData item in client.GetMetadataPoliciesAsync(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("effect").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("referenceName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("parentCollectionName").ToString()); } ]]> @@ -334,6 +361,8 @@ 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. @@ -344,6 +373,29 @@ PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, " foreach (BinaryData item in client.GetMetadataPolicies(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("effect").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("referenceName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("parentCollectionName").ToString()); } ]]> 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 806c32b02e551..a3152c57481bd 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,6 +11,8 @@ 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. @@ -21,6 +23,25 @@ PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, cre await foreach (BinaryData item in client.GetMetadataRolesAsync(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("provisioningState").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("roleType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("friendlyName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("version").ToString()); } ]]> @@ -34,6 +55,8 @@ 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. @@ -44,6 +67,25 @@ PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, cre foreach (BinaryData item in client.GetMetadataRoles(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("provisioningState").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("roleType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("friendlyName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("version").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 4e2e9530fe1a4..c56b282178cd4 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 @@ -227,7 +227,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -239,7 +239,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { advancedResourceSet = new { @@ -448,7 +448,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -460,7 +460,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { advancedResourceSet = new { diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/PurviewMetadataPolicyClient.cs b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/PurviewMetadataPolicyClient.cs index 4996088a24c7a..7fede29cadc65 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/PurviewMetadataPolicyClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/PurviewMetadataPolicyClient.cs @@ -195,7 +195,7 @@ public virtual AsyncPageable GetMetadataPoliciesAsync(RequestContext { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetadataPoliciesRequest(context); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetadataPoliciesNextPageRequest(nextLink, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "PurviewMetadataPolicyClient.GetMetadataPolicies", "value", "nextLink", context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "PurviewMetadataPolicyClient.GetMetadataPolicies", "values", "nextLink", context); } /// @@ -216,7 +216,7 @@ public virtual Pageable GetMetadataPolicies(RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetadataPoliciesRequest(context); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetadataPoliciesNextPageRequest(nextLink, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "PurviewMetadataPolicyClient.GetMetadataPolicies", "value", "nextLink", context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "PurviewMetadataPolicyClient.GetMetadataPolicies", "values", "nextLink", context); } internal HttpMessage CreateGetMetadataPoliciesRequest(RequestContext context) @@ -228,7 +228,7 @@ internal HttpMessage CreateGetMetadataPoliciesRequest(RequestContext context) uri.Reset(_endpoint); uri.AppendRaw("/policyStore", false); uri.AppendPath("/metadataPolicies", false); - uri.AppendQuery("api-version", "2021-07-01", true); + uri.AppendQuery("api-version", "2021-07-01-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; @@ -244,7 +244,7 @@ internal HttpMessage CreateUpdateMetadataPolicyRequest(string policyId, RequestC uri.AppendRaw("/policyStore", false); uri.AppendPath("/metadataPolicies/", false); uri.AppendPath(policyId, true); - uri.AppendQuery("api-version", "2021-07-01", true); + uri.AppendQuery("api-version", "2021-07-01-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); @@ -262,7 +262,7 @@ internal HttpMessage CreateGetMetadataPolicyRequest(string policyId, RequestCont uri.AppendRaw("/policyStore", false); uri.AppendPath("/metadataPolicies/", false); uri.AppendPath(policyId, true); - uri.AppendQuery("api-version", "2021-07-01", true); + uri.AppendQuery("api-version", "2021-07-01-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/PurviewMetadataRolesClient.cs b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/PurviewMetadataRolesClient.cs index 1aa5a9038a4e3..7463158a2a792 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/PurviewMetadataRolesClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/PurviewMetadataRolesClient.cs @@ -51,7 +51,7 @@ public virtual AsyncPageable GetMetadataRolesAsync(RequestContext co { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetadataRolesRequest(context); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetadataRolesNextPageRequest(nextLink, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "PurviewMetadataRolesClient.GetMetadataRoles", "value", "nextLink", context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "PurviewMetadataRolesClient.GetMetadataRoles", "values", "nextLink", context); } /// @@ -72,7 +72,7 @@ public virtual Pageable GetMetadataRoles(RequestContext context) { HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetadataRolesRequest(context); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetadataRolesNextPageRequest(nextLink, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "PurviewMetadataRolesClient.GetMetadataRoles", "value", "nextLink", context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "PurviewMetadataRolesClient.GetMetadataRoles", "values", "nextLink", context); } internal HttpMessage CreateGetMetadataRolesRequest(RequestContext context) @@ -84,7 +84,7 @@ internal HttpMessage CreateGetMetadataRolesRequest(RequestContext context) uri.Reset(_endpoint); uri.AppendRaw("/policyStore", false); uri.AppendPath("/metadataRoles", false); - uri.AppendQuery("api-version", "2021-07-01", true); + uri.AppendQuery("api-version", "2021-07-01-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md index 564a5dfe9cd5f..44b3da58b988d 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md @@ -5,8 +5,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ```yaml title: PurviewAdministration input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/b2bddfe2e59b5b14e559e0433b6e6d057bcff95d/specification/purview/data-plane/Azure.Analytics.Purview.Account/preview/2019-11-01-preview/account.json - - https://github.com/Azure/azure-rest-api-specs/blob/1424fc4a1f82af852a626c6ab6d1d296b5fe4df1/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/purviewMetadataPolicy.json + - https://github.com/Azure/azure-rest-api-specs/blob/0ebd4949e8e1cd9537ca5a07384c7661162cc7a6/specification/purview/data-plane/Azure.Analytics.Purview.Account/preview/2019-11-01-preview/account.json + - https://github.com/Azure/azure-rest-api-specs/blob/0ebd4949e8e1cd9537ca5a07384c7661162cc7a6/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01-preview/purviewMetadataPolicy.json namespace: Azure.Analytics.Purview.Administration modelerfour: lenient-model-deduplication: true 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 14a1f819f6b7a..94735190a4bd7 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 @@ -156,7 +156,7 @@ public void Example_UpdateAccountProperties_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -171,7 +171,7 @@ public async Task Example_UpdateAccountProperties_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -186,7 +186,7 @@ public void Example_UpdateAccountProperties_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -241,7 +241,7 @@ public async Task Example_UpdateAccountProperties_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { friendlyName = "", }); @@ -354,7 +354,7 @@ public void Example_RegenerateAccessKey_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -369,7 +369,7 @@ public async Task Example_RegenerateAccessKey_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -384,7 +384,7 @@ public void Example_RegenerateAccessKey_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { keyType = "PrimaryAtlasKafkaKey", }); @@ -403,7 +403,7 @@ public async Task Example_RegenerateAccessKey_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { keyType = "PrimaryAtlasKafkaKey", }); 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 6a684bcbf0510..e1de648828927 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 @@ -104,7 +104,7 @@ public void Example_CreateOrUpdateCollection_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -119,7 +119,7 @@ public async Task Example_CreateOrUpdateCollection_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -134,13 +134,14 @@ public void Example_CreateOrUpdateCollection_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { description = "", friendlyName = "", parentCollection = new { referenceName = "", + type = "", }, }); Response response = client.CreateOrUpdateCollection(content); @@ -168,13 +169,14 @@ public async Task Example_CreateOrUpdateCollection_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { description = "", friendlyName = "", parentCollection = new { referenceName = "", + type = "", }, }); Response response = await client.CreateOrUpdateCollectionAsync(content); 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 47446903eef4c..c526d2a15bac2 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 @@ -26,7 +26,7 @@ public void Example_UpdateMetadataPolicy_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - RequestContent content = null; + using RequestContent content = null; Response response = client.UpdateMetadataPolicy("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -41,7 +41,7 @@ public async Task Example_UpdateMetadataPolicy_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - RequestContent content = null; + using RequestContent content = null; Response response = await client.UpdateMetadataPolicyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -56,7 +56,7 @@ public void Example_UpdateMetadataPolicy_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { name = "", id = "", @@ -108,6 +108,7 @@ public void Example_UpdateMetadataPolicy_AllParameters() }, collection = new { + type = "", referenceName = "", }, parentCollectionName = "", @@ -148,7 +149,7 @@ public async Task Example_UpdateMetadataPolicy_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { name = "", id = "", @@ -200,6 +201,7 @@ public async Task Example_UpdateMetadataPolicy_AllParameters_Async() }, collection = new { + type = "", referenceName = "", }, parentCollectionName = "", @@ -340,6 +342,8 @@ public void Example_GetMetadataPolicies_ShortVersion() foreach (BinaryData item in client.GetMetadataPolicies(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } } @@ -353,6 +357,8 @@ 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()); } } @@ -366,6 +372,29 @@ public void Example_GetMetadataPolicies_AllParameters() foreach (BinaryData item in client.GetMetadataPolicies(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("effect").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("referenceName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("parentCollectionName").ToString()); } } @@ -379,6 +408,29 @@ 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.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("effect").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("decisionRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules")[0].GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("referenceName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("parentCollectionName").ToString()); } } } 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 74847864753f8..cbe8b7bfd0631 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,6 +6,7 @@ #nullable disable using System; +using System.Text.Json; using System.Threading.Tasks; using Azure.Analytics.Purview.Administration; using Azure.Core; @@ -26,6 +27,8 @@ public void Example_GetMetadataRoles_ShortVersion() foreach (BinaryData item in client.GetMetadataRoles(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } } @@ -39,6 +42,8 @@ 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()); } } @@ -52,6 +57,25 @@ public void Example_GetMetadataRoles_AllParameters() foreach (BinaryData item in client.GetMetadataRoles(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("provisioningState").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("roleType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("friendlyName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("version").ToString()); } } @@ -65,6 +89,25 @@ 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.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("provisioningState").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("roleType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("friendlyName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("cnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeName").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueIncludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludes").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("dnfCondition")[0][0].GetProperty("attributeValueExcludedIn")[0].ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("version").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 17fa92639c525..2480f29e4e28d 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 @@ -250,7 +250,7 @@ public void Example_CreateOrUpdateResourceSetRule_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -265,7 +265,7 @@ public async Task Example_CreateOrUpdateResourceSetRule_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -280,7 +280,7 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { advancedResourceSet = new { @@ -489,7 +489,7 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { advancedResourceSet = new { diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/tests/MetadataRolesClientTest.cs b/sdk/purview/Azure.Analytics.Purview.Administration/tests/MetadataRolesClientTest.cs index cddc2a496830c..8c51513e7aa19 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/tests/MetadataRolesClientTest.cs +++ b/sdk/purview/Azure.Analytics.Purview.Administration/tests/MetadataRolesClientTest.cs @@ -25,7 +25,7 @@ public async Task List() { using var jsonDocument = JsonDocument.Parse(item); JsonElement fetchBodyJson = jsonDocument.RootElement; - Assert.Equals(fetchBodyJson.GetProperty("id").ToString().StartsWith("purviewmetadatarole"), true); + Assert.AreEqual(fetchBodyJson.GetProperty("id").ToString().StartsWith("purviewmetadatarole"), true); } } 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 356fa88a35086..d651309ce3c3e 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.SearchAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -21,7 +21,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { keywords = "", offset = 1234, @@ -94,7 +94,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.Search(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -106,7 +106,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { keywords = "", offset = 1234, @@ -179,7 +179,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.SuggestAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -191,7 +191,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { keywords = "", limit = 1234, @@ -227,7 +227,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.Suggest(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -239,7 +239,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { keywords = "", limit = 1234, @@ -275,7 +275,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.BrowseAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -287,7 +287,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entityType = "", path = "", @@ -318,7 +318,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.Browse(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -330,7 +330,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entityType = "", path = "", @@ -361,7 +361,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.AutoCompleteAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -373,7 +373,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { keywords = "", limit = 1234, @@ -394,7 +394,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.AutoComplete(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -406,7 +406,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { keywords = "", limit = 1234, 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 2d4f6919dddf0..0a77618214848 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateEntityAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -21,7 +21,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entity = new { @@ -198,7 +198,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateEntity("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -210,7 +210,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entity = new { @@ -387,7 +387,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateEntityInBulkAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -399,7 +399,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entities = new object[] { @@ -579,7 +579,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateEntityInBulk("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -591,7 +591,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entities = new object[] { @@ -771,7 +771,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.MoveEntitiesToCollectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -783,7 +783,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entityGuids = new object[] { @@ -866,7 +866,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.MoveEntitiesToCollection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -878,7 +878,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { 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 c55dbe50ff178..45a3a1210015c 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -21,7 +21,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entity = new { @@ -198,7 +198,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -210,7 +210,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entity = new { @@ -607,7 +607,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateEntitiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -619,7 +619,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entities = new object[] { @@ -799,7 +799,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateEntities(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -811,7 +811,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entities = new object[] { @@ -1165,7 +1165,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.AddClassificationAsync(content); Console.WriteLine(response.Status); @@ -1176,7 +1176,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { classification = new { @@ -1222,7 +1222,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.AddClassification(content); Console.WriteLine(response.Status); @@ -1233,7 +1233,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { classification = new { @@ -1499,7 +1499,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1511,7 +1511,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1588,7 +1588,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.PartialUpdateEntityAttributeByGuid("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1600,7 +1600,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.PartialUpdateEntityAttributeByGuid("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2027,7 +2027,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -2041,7 +2041,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -2083,7 +2083,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -2097,7 +2097,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -2139,7 +2139,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -2153,7 +2153,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -2195,7 +2195,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -2209,7 +2209,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -2471,7 +2471,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2483,7 +2483,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entity = new { @@ -2660,7 +2660,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.PartialUpdateEntityByUniqueAttributes("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2672,7 +2672,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { entity = new { @@ -3069,7 +3069,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3083,7 +3083,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -3125,7 +3125,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3139,7 +3139,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -3181,7 +3181,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3195,7 +3195,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -3237,7 +3237,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3251,7 +3251,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -3293,7 +3293,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.SetClassificationsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -3305,7 +3305,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { guidHeaderMap = new { @@ -3395,7 +3395,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.SetClassifications(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -3407,7 +3407,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { guidHeaderMap = new { @@ -3827,7 +3827,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.DeleteBusinessMetadataAsync("", content); Console.WriteLine(response.Status); @@ -3838,7 +3838,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -3855,7 +3855,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.DeleteBusinessMetadata("", content); Console.WriteLine(response.Status); @@ -3866,7 +3866,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -3883,7 +3883,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.AddOrUpdateBusinessMetadataAsync("", content); Console.WriteLine(response.Status); @@ -3894,7 +3894,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -3911,7 +3911,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.AddOrUpdateBusinessMetadata("", content); Console.WriteLine(response.Status); @@ -3922,7 +3922,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -3939,7 +3939,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", content); Console.WriteLine(response.Status); @@ -3950,7 +3950,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -3967,7 +3967,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.DeleteBusinessMetadataAttributes("", "", content); Console.WriteLine(response.Status); @@ -3978,7 +3978,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -3995,7 +3995,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); Console.WriteLine(response.Status); @@ -4006,7 +4006,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -4023,7 +4023,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); Console.WriteLine(response.Status); @@ -4034,7 +4034,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -4113,7 +4113,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.ImportBusinessMetadataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4125,7 +4125,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.ImportBusinessMetadataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4147,7 +4147,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.ImportBusinessMetadata(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4159,7 +4159,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.ImportBusinessMetadata(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4181,7 +4181,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.DeleteLabelsAsync("", content); Console.WriteLine(response.Status); @@ -4192,7 +4192,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4209,7 +4209,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.DeleteLabels("", content); Console.WriteLine(response.Status); @@ -4220,7 +4220,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4237,7 +4237,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.SetLabelsAsync("", content); Console.WriteLine(response.Status); @@ -4248,7 +4248,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4265,7 +4265,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.SetLabels("", content); Console.WriteLine(response.Status); @@ -4276,7 +4276,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4293,7 +4293,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.AddLabelAsync("", content); Console.WriteLine(response.Status); @@ -4304,7 +4304,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4321,7 +4321,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.AddLabel("", content); Console.WriteLine(response.Status); @@ -4332,7 +4332,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4349,7 +4349,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.DeleteLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); @@ -4360,7 +4360,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4377,7 +4377,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.DeleteLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); @@ -4388,7 +4388,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4405,7 +4405,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.SetLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); @@ -4416,7 +4416,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4433,7 +4433,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.SetLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); @@ -4444,7 +4444,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4461,7 +4461,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = await client.AddLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); @@ -4472,7 +4472,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4489,7 +4489,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = null; +using RequestContent content = null; Response response = client.AddLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); @@ -4500,7 +4500,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); 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 45fd3f9508e45..03a9ef4d715b4 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 @@ -121,7 +121,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateGlossaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -133,7 +133,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { categories = new object[] { @@ -243,7 +243,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateGlossary(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -255,7 +255,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { categories = new object[] { @@ -365,7 +365,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using 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 object[] +using RequestContent content = RequestContent.Create(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 object[] +using 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 object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -641,7 +641,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateGlossaryCategoryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -653,7 +653,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { anchor = new { @@ -773,7 +773,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateGlossaryCategory(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -785,7 +785,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { anchor = new { @@ -1029,7 +1029,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateGlossaryCategoryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1041,7 +1041,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { anchor = new { @@ -1161,7 +1161,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateGlossaryCategory("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1173,7 +1173,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { anchor = new { @@ -1339,7 +1339,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -1354,7 +1354,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -1409,7 +1409,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -1424,7 +1424,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -1601,7 +1601,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateGlossaryTermAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1613,7 +1613,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { abbreviation = "", templateName = new object[] @@ -1964,7 +1964,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateGlossaryTerm(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1976,7 +1976,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { abbreviation = "", templateName = new object[] @@ -2683,7 +2683,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateGlossaryTermAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2695,7 +2695,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { abbreviation = "", templateName = new object[] @@ -3046,7 +3046,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateGlossaryTerm("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -3058,7 +3058,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { abbreviation = "", templateName = new object[] @@ -3455,7 +3455,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -3470,7 +3470,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -3641,7 +3641,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -3656,7 +3656,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -3827,7 +3827,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3842,7 +3842,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -4196,7 +4196,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4211,7 +4211,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -4635,7 +4635,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4649,7 +4649,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -4688,7 +4688,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4702,7 +4702,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -4741,7 +4741,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4755,7 +4755,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -4794,7 +4794,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4808,7 +4808,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -4847,7 +4847,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4861,7 +4861,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -4900,7 +4900,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4914,7 +4914,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { new { @@ -5129,7 +5129,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateGlossaryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -5141,7 +5141,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { categories = new object[] { @@ -5251,7 +5251,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateGlossary("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -5263,7 +5263,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { categories = new object[] { @@ -6097,7 +6097,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -6112,7 +6112,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -6161,7 +6161,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -6176,7 +6176,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { key = "", }); @@ -6709,7 +6709,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -6724,7 +6724,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -6742,7 +6742,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -6757,7 +6757,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(new object[] +using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -7131,7 +7131,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -7144,7 +7144,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; @@ -7167,7 +7167,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -7180,7 +7180,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; @@ -7203,7 +7203,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -7216,7 +7216,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; @@ -7239,7 +7239,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -7252,7 +7252,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; 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 6ea5e09d8e448..e80c6eac31eaf 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -21,7 +21,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { createTime = 123.45F, createdBy = "", @@ -81,7 +81,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.Create(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -93,7 +93,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { createTime = 123.45F, createdBy = "", @@ -153,7 +153,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -165,7 +165,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { createTime = 123.45F, createdBy = "", @@ -225,7 +225,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.Update(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -237,7 +237,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { createTime = 123.45F, createdBy = "", 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 ebdc9f82adb1a..7eca037706592 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 @@ -2717,7 +2717,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateTypeDefinitionsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2729,7 +2729,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { @@ -3388,7 +3388,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateTypeDefinitions(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -3400,7 +3400,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { @@ -4059,7 +4059,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateAtlasTypeDefinitionsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4071,7 +4071,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { @@ -4730,7 +4730,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateAtlasTypeDefinitions(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4742,7 +4742,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { @@ -5401,7 +5401,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.DeleteTypeDefinitionsAsync(content); Console.WriteLine(response.Status); @@ -5412,7 +5412,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { @@ -5738,7 +5738,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.DeleteTypeDefinitions(content); Console.WriteLine(response.Status); @@ -5749,7 +5749,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { 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 09aeb0e5786e9..59884bf38dcef 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 @@ -26,7 +26,7 @@ public void Example_Search_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.Search(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -41,7 +41,7 @@ public async Task Example_Search_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.SearchAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -56,7 +56,7 @@ public void Example_Search_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { keywords = "", offset = 1234, @@ -129,7 +129,7 @@ public async Task Example_Search_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { keywords = "", offset = 1234, @@ -202,7 +202,7 @@ public void Example_Suggest_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.Suggest(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -217,7 +217,7 @@ public async Task Example_Suggest_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.SuggestAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -232,7 +232,7 @@ public void Example_Suggest_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { keywords = "", limit = 1234, @@ -268,7 +268,7 @@ public async Task Example_Suggest_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { keywords = "", limit = 1234, @@ -304,7 +304,7 @@ public void Example_Browse_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.Browse(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -319,7 +319,7 @@ public async Task Example_Browse_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.BrowseAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -334,7 +334,7 @@ public void Example_Browse_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entityType = "", path = "", @@ -365,7 +365,7 @@ public async Task Example_Browse_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entityType = "", path = "", @@ -396,7 +396,7 @@ public void Example_AutoComplete_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.AutoComplete(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -411,7 +411,7 @@ public async Task Example_AutoComplete_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.AutoCompleteAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -426,7 +426,7 @@ public void Example_AutoComplete_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { keywords = "", limit = 1234, @@ -447,7 +447,7 @@ public async Task Example_AutoComplete_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { keywords = "", limit = 1234, 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 f880b055d3a52..f99523c2b7e3e 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 @@ -26,7 +26,7 @@ public void Example_CreateOrUpdateEntity_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateEntity("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -41,7 +41,7 @@ public async Task Example_CreateOrUpdateEntity_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateEntityAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -56,7 +56,7 @@ public void Example_CreateOrUpdateEntity_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entity = new { @@ -233,7 +233,7 @@ public async Task Example_CreateOrUpdateEntity_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entity = new { @@ -410,7 +410,7 @@ public void Example_CreateOrUpdateEntityInBulk_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateEntityInBulk("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -425,7 +425,7 @@ public async Task Example_CreateOrUpdateEntityInBulk_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateEntityInBulkAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -440,7 +440,7 @@ public void Example_CreateOrUpdateEntityInBulk_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entities = new object[] { @@ -620,7 +620,7 @@ public async Task Example_CreateOrUpdateEntityInBulk_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entities = new object[] { @@ -800,7 +800,7 @@ public void Example_MoveEntitiesToCollection_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.MoveEntitiesToCollection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -815,7 +815,7 @@ public async Task Example_MoveEntitiesToCollection_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.MoveEntitiesToCollectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -830,7 +830,7 @@ public void Example_MoveEntitiesToCollection_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entityGuids = new object[] { @@ -913,7 +913,7 @@ public async Task Example_MoveEntitiesToCollection_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entityGuids = new object[] { 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 0b28d91fbcb9a..b58ffa9460f13 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 @@ -27,7 +27,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -42,7 +42,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -57,7 +57,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entity = new { @@ -234,7 +234,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entity = new { @@ -637,7 +637,7 @@ public void Example_CreateOrUpdateEntities_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateEntities(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -652,7 +652,7 @@ public async Task Example_CreateOrUpdateEntities_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateEntitiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -667,7 +667,7 @@ public void Example_CreateOrUpdateEntities_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entities = new object[] { @@ -847,7 +847,7 @@ public async Task Example_CreateOrUpdateEntities_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entities = new object[] { @@ -1207,7 +1207,7 @@ public void Example_AddClassification_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.AddClassification(content); Console.WriteLine(response.Status); @@ -1221,7 +1221,7 @@ public async Task Example_AddClassification_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.AddClassificationAsync(content); Console.WriteLine(response.Status); @@ -1235,7 +1235,7 @@ public void Example_AddClassification_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { classification = new { @@ -1281,7 +1281,7 @@ public async Task Example_AddClassification_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { classification = new { @@ -1553,7 +1553,7 @@ public void Example_PartialUpdateEntityAttributeByGuid_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.PartialUpdateEntityAttributeByGuid("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1568,7 +1568,7 @@ public async Task Example_PartialUpdateEntityAttributeByGuid_ShortVersion_Async( TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1583,7 +1583,7 @@ public void Example_PartialUpdateEntityAttributeByGuid_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.PartialUpdateEntityAttributeByGuid("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1660,7 +1660,7 @@ public async Task Example_PartialUpdateEntityAttributeByGuid_AllParameters_Async TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2111,7 +2111,7 @@ public void Example_AddClassifications_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -2128,7 +2128,7 @@ public async Task Example_AddClassifications_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -2145,7 +2145,7 @@ public void Example_AddClassifications_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -2187,7 +2187,7 @@ public async Task Example_AddClassifications_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -2229,7 +2229,7 @@ public void Example_UpdateClassifications_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -2246,7 +2246,7 @@ public async Task Example_UpdateClassifications_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -2263,7 +2263,7 @@ public void Example_UpdateClassifications_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -2305,7 +2305,7 @@ public async Task Example_UpdateClassifications_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -2573,7 +2573,7 @@ public void Example_PartialUpdateEntityByUniqueAttributes_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.PartialUpdateEntityByUniqueAttributes("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2588,7 +2588,7 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_ShortVersion_Asy TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2603,7 +2603,7 @@ public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entity = new { @@ -2780,7 +2780,7 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_As TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { entity = new { @@ -3189,7 +3189,7 @@ public void Example_AddClassificationsByUniqueAttribute_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3206,7 +3206,7 @@ public async Task Example_AddClassificationsByUniqueAttribute_ShortVersion_Async TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3223,7 +3223,7 @@ public void Example_AddClassificationsByUniqueAttribute_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -3265,7 +3265,7 @@ public async Task Example_AddClassificationsByUniqueAttribute_AllParameters_Asyn TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -3307,7 +3307,7 @@ public void Example_UpdateClassificationsByUniqueAttribute_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3324,7 +3324,7 @@ public async Task Example_UpdateClassificationsByUniqueAttribute_ShortVersion_As TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3341,7 +3341,7 @@ public void Example_UpdateClassificationsByUniqueAttribute_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -3383,7 +3383,7 @@ public async Task Example_UpdateClassificationsByUniqueAttribute_AllParameters_A TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -3425,7 +3425,7 @@ public void Example_SetClassifications_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.SetClassifications(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -3440,7 +3440,7 @@ public async Task Example_SetClassifications_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.SetClassificationsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -3455,7 +3455,7 @@ public void Example_SetClassifications_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { guidHeaderMap = new { @@ -3545,7 +3545,7 @@ public async Task Example_SetClassifications_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { guidHeaderMap = new { @@ -3977,7 +3977,7 @@ public void Example_DeleteBusinessMetadata_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.DeleteBusinessMetadata("", content); Console.WriteLine(response.Status); @@ -3991,7 +3991,7 @@ public async Task Example_DeleteBusinessMetadata_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.DeleteBusinessMetadataAsync("", content); Console.WriteLine(response.Status); @@ -4005,7 +4005,7 @@ public void Example_DeleteBusinessMetadata_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -4022,7 +4022,7 @@ public async Task Example_DeleteBusinessMetadata_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -4039,7 +4039,7 @@ public void Example_AddOrUpdateBusinessMetadata_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.AddOrUpdateBusinessMetadata("", content); Console.WriteLine(response.Status); @@ -4053,7 +4053,7 @@ public async Task Example_AddOrUpdateBusinessMetadata_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.AddOrUpdateBusinessMetadataAsync("", content); Console.WriteLine(response.Status); @@ -4067,7 +4067,7 @@ public void Example_AddOrUpdateBusinessMetadata_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -4084,7 +4084,7 @@ public async Task Example_AddOrUpdateBusinessMetadata_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -4101,7 +4101,7 @@ public void Example_DeleteBusinessMetadataAttributes_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.DeleteBusinessMetadataAttributes("", "", content); Console.WriteLine(response.Status); @@ -4115,7 +4115,7 @@ public async Task Example_DeleteBusinessMetadataAttributes_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", content); Console.WriteLine(response.Status); @@ -4129,7 +4129,7 @@ public void Example_DeleteBusinessMetadataAttributes_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -4146,7 +4146,7 @@ public async Task Example_DeleteBusinessMetadataAttributes_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -4163,7 +4163,7 @@ public void Example_AddOrUpdateBusinessMetadataAttributes_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); Console.WriteLine(response.Status); @@ -4177,7 +4177,7 @@ public async Task Example_AddOrUpdateBusinessMetadataAttributes_ShortVersion_Asy TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); Console.WriteLine(response.Status); @@ -4191,7 +4191,7 @@ public void Example_AddOrUpdateBusinessMetadataAttributes_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -4208,7 +4208,7 @@ public async Task Example_AddOrUpdateBusinessMetadataAttributes_AllParameters_As TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = new object(), }); @@ -4293,7 +4293,7 @@ public void Example_ImportBusinessMetadata_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.ImportBusinessMetadata(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4308,7 +4308,7 @@ public async Task Example_ImportBusinessMetadata_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.ImportBusinessMetadataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4323,7 +4323,7 @@ public void Example_ImportBusinessMetadata_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.ImportBusinessMetadata(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4345,7 +4345,7 @@ public async Task Example_ImportBusinessMetadata_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.ImportBusinessMetadataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4367,7 +4367,7 @@ public void Example_DeleteLabels_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.DeleteLabels("", content); Console.WriteLine(response.Status); @@ -4381,7 +4381,7 @@ public async Task Example_DeleteLabels_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.DeleteLabelsAsync("", content); Console.WriteLine(response.Status); @@ -4395,7 +4395,7 @@ public void Example_DeleteLabels_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4412,7 +4412,7 @@ public async Task Example_DeleteLabels_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4429,7 +4429,7 @@ public void Example_SetLabels_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.SetLabels("", content); Console.WriteLine(response.Status); @@ -4443,7 +4443,7 @@ public async Task Example_SetLabels_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.SetLabelsAsync("", content); Console.WriteLine(response.Status); @@ -4457,7 +4457,7 @@ public void Example_SetLabels_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4474,7 +4474,7 @@ public async Task Example_SetLabels_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4491,7 +4491,7 @@ public void Example_AddLabel_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.AddLabel("", content); Console.WriteLine(response.Status); @@ -4505,7 +4505,7 @@ public async Task Example_AddLabel_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.AddLabelAsync("", content); Console.WriteLine(response.Status); @@ -4519,7 +4519,7 @@ public void Example_AddLabel_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4536,7 +4536,7 @@ public async Task Example_AddLabel_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4553,7 +4553,7 @@ public void Example_DeleteLabelsByUniqueAttribute_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.DeleteLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); @@ -4567,7 +4567,7 @@ public async Task Example_DeleteLabelsByUniqueAttribute_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.DeleteLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); @@ -4581,7 +4581,7 @@ public void Example_DeleteLabelsByUniqueAttribute_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4598,7 +4598,7 @@ public async Task Example_DeleteLabelsByUniqueAttribute_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4615,7 +4615,7 @@ public void Example_SetLabelsByUniqueAttribute_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.SetLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); @@ -4629,7 +4629,7 @@ public async Task Example_SetLabelsByUniqueAttribute_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.SetLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); @@ -4643,7 +4643,7 @@ public void Example_SetLabelsByUniqueAttribute_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4660,7 +4660,7 @@ public async Task Example_SetLabelsByUniqueAttribute_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4677,7 +4677,7 @@ public void Example_AddLabelsByUniqueAttribute_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = client.AddLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); @@ -4691,7 +4691,7 @@ public async Task Example_AddLabelsByUniqueAttribute_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = null; + using RequestContent content = null; Response response = await client.AddLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); @@ -4705,7 +4705,7 @@ public void Example_AddLabelsByUniqueAttribute_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -4722,7 +4722,7 @@ public async Task Example_AddLabelsByUniqueAttribute_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); 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 e98b46336ed41..675243c3c699e 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 @@ -145,7 +145,7 @@ public void Example_CreateGlossary_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateGlossary(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -160,7 +160,7 @@ public async Task Example_CreateGlossary_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateGlossaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -175,7 +175,7 @@ public void Example_CreateGlossary_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { categories = new object[] { @@ -285,7 +285,7 @@ public async Task Example_CreateGlossary_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { categories = new object[] { @@ -395,7 +395,7 @@ public void Example_CreateGlossaryCategories_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -413,7 +413,7 @@ public async Task Example_CreateGlossaryCategories_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -431,7 +431,7 @@ public void Example_CreateGlossaryCategories_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -554,7 +554,7 @@ public async Task Example_CreateGlossaryCategories_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -677,7 +677,7 @@ public void Example_CreateGlossaryCategory_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateGlossaryCategory(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -692,7 +692,7 @@ public async Task Example_CreateGlossaryCategory_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateGlossaryCategoryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -707,7 +707,7 @@ public void Example_CreateGlossaryCategory_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { anchor = new { @@ -827,7 +827,7 @@ public async Task Example_CreateGlossaryCategory_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { anchor = new { @@ -1077,7 +1077,7 @@ public void Example_UpdateGlossaryCategory_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateGlossaryCategory("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1092,7 +1092,7 @@ public async Task Example_UpdateGlossaryCategory_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateGlossaryCategoryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1107,7 +1107,7 @@ public void Example_UpdateGlossaryCategory_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { anchor = new { @@ -1227,7 +1227,7 @@ public async Task Example_UpdateGlossaryCategory_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { anchor = new { @@ -1399,7 +1399,7 @@ public void Example_PartialUpdateGlossaryCategory_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -1417,7 +1417,7 @@ public async Task Example_PartialUpdateGlossaryCategory_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -1435,7 +1435,7 @@ public void Example_PartialUpdateGlossaryCategory_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -1490,7 +1490,7 @@ public async Task Example_PartialUpdateGlossaryCategory_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -1679,7 +1679,7 @@ public void Example_CreateGlossaryTerm_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateGlossaryTerm(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1694,7 +1694,7 @@ public async Task Example_CreateGlossaryTerm_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateGlossaryTermAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -1709,7 +1709,7 @@ public void Example_CreateGlossaryTerm_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { abbreviation = "", templateName = new object[] @@ -2060,7 +2060,7 @@ public async Task Example_CreateGlossaryTerm_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { abbreviation = "", templateName = new object[] @@ -2773,7 +2773,7 @@ public void Example_UpdateGlossaryTerm_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateGlossaryTerm("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2788,7 +2788,7 @@ public async Task Example_UpdateGlossaryTerm_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateGlossaryTermAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2803,7 +2803,7 @@ public void Example_UpdateGlossaryTerm_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { abbreviation = "", templateName = new object[] @@ -3154,7 +3154,7 @@ public async Task Example_UpdateGlossaryTerm_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { abbreviation = "", templateName = new object[] @@ -3557,7 +3557,7 @@ public void Example_PartialUpdateGlossaryTerm_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -3575,7 +3575,7 @@ public async Task Example_PartialUpdateGlossaryTerm_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -3593,7 +3593,7 @@ public void Example_PartialUpdateGlossaryTerm_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -3764,7 +3764,7 @@ public async Task Example_PartialUpdateGlossaryTerm_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -3935,7 +3935,7 @@ public void Example_CreateGlossaryTerms_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3953,7 +3953,7 @@ public async Task Example_CreateGlossaryTerms_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -3971,7 +3971,7 @@ public void Example_CreateGlossaryTerms_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -4325,7 +4325,7 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -4755,7 +4755,7 @@ public void Example_AssignTermToEntities_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4772,7 +4772,7 @@ public async Task Example_AssignTermToEntities_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4789,7 +4789,7 @@ public void Example_AssignTermToEntities_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -4828,7 +4828,7 @@ public async Task Example_AssignTermToEntities_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -4867,7 +4867,7 @@ public void Example_RemoveTermAssignmentFromEntities_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4884,7 +4884,7 @@ public async Task Example_RemoveTermAssignmentFromEntities_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4901,7 +4901,7 @@ public void Example_RemoveTermAssignmentFromEntities_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -4940,7 +4940,7 @@ public async Task Example_RemoveTermAssignmentFromEntities_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -4979,7 +4979,7 @@ public void Example_DeleteTermAssignmentFromEntities_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -4996,7 +4996,7 @@ public async Task Example_DeleteTermAssignmentFromEntities_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new object() }); @@ -5013,7 +5013,7 @@ public void Example_DeleteTermAssignmentFromEntities_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -5052,7 +5052,7 @@ public async Task Example_DeleteTermAssignmentFromEntities_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { new { @@ -5279,7 +5279,7 @@ public void Example_UpdateGlossary_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateGlossary("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -5294,7 +5294,7 @@ public async Task Example_UpdateGlossary_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateGlossaryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -5309,7 +5309,7 @@ public void Example_UpdateGlossary_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { categories = new object[] { @@ -5419,7 +5419,7 @@ public async Task Example_UpdateGlossary_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { categories = new object[] { @@ -6277,7 +6277,7 @@ public void Example_PartialUpdateGlossary_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -6295,7 +6295,7 @@ public async Task Example_PartialUpdateGlossary_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -6313,7 +6313,7 @@ public void Example_PartialUpdateGlossary_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -6362,7 +6362,7 @@ public async Task Example_PartialUpdateGlossary_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { key = "", }); @@ -6913,7 +6913,7 @@ public void Example_ExportGlossaryTermsAsCsv_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -6931,7 +6931,7 @@ public async Task Example_ExportGlossaryTermsAsCsv_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -6949,7 +6949,7 @@ public void Example_ExportGlossaryTermsAsCsv_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -6967,7 +6967,7 @@ public async Task Example_ExportGlossaryTermsAsCsv_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(new object[] + using RequestContent content = RequestContent.Create(new object[] { "" }); @@ -7347,7 +7347,7 @@ public void Example_ImportGlossaryTermsViaCsv_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -7363,7 +7363,7 @@ public async Task Example_ImportGlossaryTermsViaCsv_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -7379,7 +7379,7 @@ public void Example_ImportGlossaryTermsViaCsv_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; @@ -7402,7 +7402,7 @@ public async Task Example_ImportGlossaryTermsViaCsv_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; @@ -7425,7 +7425,7 @@ public void Example_ImportGlossaryTermsViaCsvByGlossaryName_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -7441,7 +7441,7 @@ public async Task Example_ImportGlossaryTermsViaCsvByGlossaryName_ShortVersion_A TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; @@ -7457,7 +7457,7 @@ public void Example_ImportGlossaryTermsViaCsvByGlossaryName_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; @@ -7480,7 +7480,7 @@ public async Task Example_ImportGlossaryTermsViaCsvByGlossaryName_AllParameters_ TokenCredential credential = new DefaultAzureCredential(); PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Operation operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; 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 183127f1ee65c..c08bcd911d1d9 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 @@ -26,7 +26,7 @@ public void Example_Create_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.Create(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -41,7 +41,7 @@ public async Task Example_Create_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -56,7 +56,7 @@ public void Example_Create_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { createTime = 123.45F, createdBy = "", @@ -116,7 +116,7 @@ public async Task Example_Create_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { createTime = 123.45F, createdBy = "", @@ -176,7 +176,7 @@ public void Example_Update_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.Update(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -191,7 +191,7 @@ public async Task Example_Update_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -206,7 +206,7 @@ public void Example_Update_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { createTime = 123.45F, createdBy = "", @@ -266,7 +266,7 @@ public async Task Example_Update_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { createTime = 123.45F, createdBy = "", 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 3f9819fa1db73..6eec18ed658e1 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 @@ -2831,7 +2831,7 @@ public void Example_CreateTypeDefinitions_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateTypeDefinitions(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2846,7 +2846,7 @@ public async Task Example_CreateTypeDefinitions_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateTypeDefinitionsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2861,7 +2861,7 @@ public void Example_CreateTypeDefinitions_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { @@ -3520,7 +3520,7 @@ public async Task Example_CreateTypeDefinitions_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { @@ -4179,7 +4179,7 @@ public void Example_UpdateAtlasTypeDefinitions_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.UpdateAtlasTypeDefinitions(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4194,7 +4194,7 @@ public async Task Example_UpdateAtlasTypeDefinitions_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.UpdateAtlasTypeDefinitionsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -4209,7 +4209,7 @@ public void Example_UpdateAtlasTypeDefinitions_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { @@ -4868,7 +4868,7 @@ public async Task Example_UpdateAtlasTypeDefinitions_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { @@ -5527,7 +5527,7 @@ public void Example_DeleteTypeDefinitions_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.DeleteTypeDefinitions(content); Console.WriteLine(response.Status); @@ -5541,7 +5541,7 @@ public async Task Example_DeleteTypeDefinitions_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.DeleteTypeDefinitionsAsync(content); Console.WriteLine(response.Status); @@ -5555,7 +5555,7 @@ public void Example_DeleteTypeDefinitions_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { @@ -5881,7 +5881,7 @@ public async Task Example_DeleteTypeDefinitions_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { businessMetadataDefs = new object[] { 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 b7d63ec58bad2..aa26acd4cd1e2 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 @@ -63,7 +63,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(endpoint, "", credential); -RequestContent content = null; +using RequestContent content = null; Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -75,7 +75,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -101,7 +101,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(endpoint, "", credential); -RequestContent content = null; +using RequestContent content = null; Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -113,7 +113,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { 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 08ee3a9c81f2f..a81bcccac1e5b 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, "", credential); -RequestContent content = null; +using RequestContent content = null; Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -21,7 +21,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -77,7 +77,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, "", credential); -RequestContent content = null; +using RequestContent content = null; Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -89,7 +89,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { 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 d92e007880a2e..9fe2b62bc76ed 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 @@ -65,7 +65,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = null; +using RequestContent content = null; Response response = await client.CreateOrUpdateFilterAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -77,7 +77,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -108,7 +108,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = null; +using RequestContent content = null; Response response = client.CreateOrUpdateFilter(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -120,7 +120,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -151,7 +151,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { kind = "AzureSubscriptionCredential", }); @@ -166,7 +166,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -258,7 +258,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { kind = "AzureSubscriptionCredential", }); @@ -273,7 +273,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -799,7 +799,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateTriggerAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -811,7 +811,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -897,7 +897,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateTrigger(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -909,7 +909,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { 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 27cd9f15ed308..1df811d3b2c2f 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 @@ -65,7 +65,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateKeyVaultReferenceAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -77,7 +77,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -102,7 +102,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateKeyVaultReference("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -114,7 +114,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -255,7 +255,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); -RequestContent content = null; +using RequestContent content = null; Response response = await client.CreateOrUpdateScanRulesetAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -267,7 +267,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -303,7 +303,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); -RequestContent content = null; +using RequestContent content = null; Response response = client.CreateOrUpdateScanRuleset("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -315,7 +315,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { 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 65cfcf468adbb..499a08d17b2f9 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 @@ -86,7 +86,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(endpoint, "", credential); - RequestContent content = null; + using RequestContent content = null; Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -101,7 +101,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(endpoint, "", credential); - RequestContent content = null; + using RequestContent content = null; Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -116,7 +116,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -142,7 +142,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewClassificationRuleClient client = new PurviewClassificationRuleClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { 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 4aa89adf31d26..465be7f09bdf3 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 @@ -26,7 +26,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, "", credential); - RequestContent content = null; + using RequestContent content = null; Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -41,7 +41,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, "", credential); - RequestContent content = null; + using RequestContent content = null; Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -56,7 +56,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -112,7 +112,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewDataSourceClient client = new PurviewDataSourceClient(endpoint, "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { 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 c5e5cbe7ed1e1..7b942e530ef69 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 @@ -88,7 +88,7 @@ public void Example_CreateOrUpdateFilter_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = null; + using RequestContent content = null; Response response = client.CreateOrUpdateFilter(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -103,7 +103,7 @@ public async Task Example_CreateOrUpdateFilter_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = null; + using RequestContent content = null; Response response = await client.CreateOrUpdateFilterAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -118,7 +118,7 @@ public void Example_CreateOrUpdateFilter_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -149,7 +149,7 @@ public async Task Example_CreateOrUpdateFilter_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -180,7 +180,7 @@ public void Example_CreateOrUpdate_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { kind = "AzureSubscriptionCredential", }); @@ -198,7 +198,7 @@ public async Task Example_CreateOrUpdate_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { kind = "AzureSubscriptionCredential", }); @@ -216,7 +216,7 @@ public void Example_CreateOrUpdate_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -308,7 +308,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -864,7 +864,7 @@ public void Example_CreateOrUpdateTrigger_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateTrigger(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -879,7 +879,7 @@ public async Task Example_CreateOrUpdateTrigger_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateTriggerAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -894,7 +894,7 @@ public void Example_CreateOrUpdateTrigger_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -980,7 +980,7 @@ public async Task Example_CreateOrUpdateTrigger_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewScanClient client = new PurviewScanClient(endpoint, "", "", credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { 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 b532f6412a82e..3fb7d08727edf 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 @@ -88,7 +88,7 @@ public void Example_CreateOrUpdateKeyVaultReference_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CreateOrUpdateKeyVaultReference("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -103,7 +103,7 @@ public async Task Example_CreateOrUpdateKeyVaultReference_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CreateOrUpdateKeyVaultReferenceAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -118,7 +118,7 @@ public void Example_CreateOrUpdateKeyVaultReference_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -143,7 +143,7 @@ public async Task Example_CreateOrUpdateKeyVaultReference_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -296,7 +296,7 @@ public void Example_CreateOrUpdateScanRuleset_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); - RequestContent content = null; + using RequestContent content = null; Response response = client.CreateOrUpdateScanRuleset("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -311,7 +311,7 @@ public async Task Example_CreateOrUpdateScanRuleset_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); - RequestContent content = null; + using RequestContent content = null; Response response = await client.CreateOrUpdateScanRulesetAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -326,7 +326,7 @@ public void Example_CreateOrUpdateScanRuleset_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -362,7 +362,7 @@ public async Task Example_CreateOrUpdateScanRuleset_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewScanningServiceClient client = new PurviewScanningServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { 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 7845b87912885..00c6761d71a00 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 @@ -63,7 +63,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.ActivateTenantEmailRegistrationAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -75,7 +75,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -103,7 +103,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.ActivateTenantEmailRegistration(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -115,7 +115,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -323,7 +323,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new object(), shareKind = "InPlace", @@ -340,7 +340,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -382,7 +382,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new object(), shareKind = "InPlace", @@ -399,7 +399,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/SentSharesClient.xml b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/SentSharesClient.xml index 31e820f682dc8..638d6a15d01ef 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/SentSharesClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/SentSharesClient.xml @@ -117,7 +117,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -137,7 +137,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -164,7 +164,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -184,7 +184,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -381,7 +381,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -416,7 +416,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -463,7 +463,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { @@ -498,7 +498,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { properties = new { 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 071846c7360bc..2bd009fe91235 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 @@ -86,7 +86,7 @@ public void Example_ActivateTenantEmailRegistration_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.ActivateTenantEmailRegistration(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -101,7 +101,7 @@ public async Task Example_ActivateTenantEmailRegistration_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.ActivateTenantEmailRegistrationAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -116,7 +116,7 @@ public void Example_ActivateTenantEmailRegistration_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -144,7 +144,7 @@ public async Task Example_ActivateTenantEmailRegistration_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -370,7 +370,7 @@ public void Example_CreateOrReplaceReceivedShare_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new object(), shareKind = "InPlace", @@ -390,7 +390,7 @@ public async Task Example_CreateOrReplaceReceivedShare_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new object(), shareKind = "InPlace", @@ -410,7 +410,7 @@ public void Example_CreateOrReplaceReceivedShare_AllParameters() TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -452,7 +452,7 @@ public async Task Example_CreateOrReplaceReceivedShare_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); ReceivedSharesClient client = new ReceivedSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { 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 c6748e417c386..c73808158e051 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 @@ -146,7 +146,7 @@ public void Example_CreateSentShareInvitation_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -169,7 +169,7 @@ public async Task Example_CreateSentShareInvitation_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -192,7 +192,7 @@ public void Example_CreateSentShareInvitation_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -219,7 +219,7 @@ public async Task Example_CreateSentShareInvitation_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -434,7 +434,7 @@ public void Example_CreateOrReplaceSentShare_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -472,7 +472,7 @@ public async Task Example_CreateOrReplaceSentShare_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -510,7 +510,7 @@ public void Example_CreateOrReplaceSentShare_AllParameters() TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { @@ -557,7 +557,7 @@ public async Task Example_CreateOrReplaceSentShare_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); SentSharesClient client = new SentSharesClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { properties = new { 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 0cc917f9e5375..5b0152278dd03 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 @@ -93,7 +93,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { triggers = new object[] { @@ -122,7 +122,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { triggers = new object[] { @@ -165,7 +165,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { triggers = new object[] { @@ -194,7 +194,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { triggers = new object[] { @@ -283,7 +283,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { operations = new object[] { @@ -309,7 +309,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { operations = new object[] { @@ -341,7 +341,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { operations = new object[] { @@ -367,7 +367,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { operations = new object[] { @@ -481,7 +481,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.CancelWorkflowRunAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -492,7 +492,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -509,7 +509,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.CancelWorkflowRun(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -520,7 +520,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -639,7 +639,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.ApproveApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -650,7 +650,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -667,7 +667,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.ApproveApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -678,7 +678,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -695,7 +695,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.RejectApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -706,7 +706,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -723,7 +723,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.RejectApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -734,7 +734,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -751,7 +751,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = await client.ReassignWorkflowTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -762,7 +762,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { reassignments = new object[] { @@ -786,7 +786,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new object()); +using RequestContent content = RequestContent.Create(new object()); Response response = client.ReassignWorkflowTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -797,7 +797,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { reassignments = new object[] { @@ -821,7 +821,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { newStatus = "NotStarted", }); @@ -835,7 +835,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { newStatus = "NotStarted", comment = "", @@ -853,7 +853,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { newStatus = "NotStarted", }); @@ -867,7 +867,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { newStatus = "NotStarted", comment = "", 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 0572c91d33e6f..e52265b87b050 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 @@ -116,7 +116,7 @@ public void Example_CreateOrReplaceWorkflow_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { triggers = new object[] { @@ -148,7 +148,7 @@ public async Task Example_CreateOrReplaceWorkflow_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { triggers = new object[] { @@ -180,7 +180,7 @@ public void Example_CreateOrReplaceWorkflow_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { triggers = new object[] { @@ -223,7 +223,7 @@ public async Task Example_CreateOrReplaceWorkflow_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { triggers = new object[] { @@ -318,7 +318,7 @@ public void Example_SubmitUserRequests_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { operations = new object[] { @@ -347,7 +347,7 @@ public async Task Example_SubmitUserRequests_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { operations = new object[] { @@ -376,7 +376,7 @@ public void Example_SubmitUserRequests_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { operations = new object[] { @@ -408,7 +408,7 @@ public async Task Example_SubmitUserRequests_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { operations = new object[] { @@ -528,7 +528,7 @@ public void Example_CancelWorkflowRun_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.CancelWorkflowRun(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -542,7 +542,7 @@ public async Task Example_CancelWorkflowRun_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.CancelWorkflowRunAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -556,7 +556,7 @@ public void Example_CancelWorkflowRun_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -573,7 +573,7 @@ public async Task Example_CancelWorkflowRun_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -698,7 +698,7 @@ public void Example_ApproveApprovalTask_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.ApproveApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -712,7 +712,7 @@ public async Task Example_ApproveApprovalTask_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.ApproveApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -726,7 +726,7 @@ public void Example_ApproveApprovalTask_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -743,7 +743,7 @@ public async Task Example_ApproveApprovalTask_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -760,7 +760,7 @@ public void Example_RejectApprovalTask_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.RejectApprovalTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -774,7 +774,7 @@ public async Task Example_RejectApprovalTask_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.RejectApprovalTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -788,7 +788,7 @@ public void Example_RejectApprovalTask_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -805,7 +805,7 @@ public async Task Example_RejectApprovalTask_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { comment = "", }); @@ -822,7 +822,7 @@ public void Example_ReassignWorkflowTask_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = client.ReassignWorkflowTask(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -836,7 +836,7 @@ public async Task Example_ReassignWorkflowTask_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new object()); + using RequestContent content = RequestContent.Create(new object()); Response response = await client.ReassignWorkflowTaskAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); Console.WriteLine(response.Status); @@ -850,7 +850,7 @@ public void Example_ReassignWorkflowTask_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { reassignments = new object[] { @@ -874,7 +874,7 @@ public async Task Example_ReassignWorkflowTask_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { reassignments = new object[] { @@ -898,7 +898,7 @@ public void Example_UpdateTaskStatus_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { newStatus = "NotStarted", }); @@ -915,7 +915,7 @@ public async Task Example_UpdateTaskStatus_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { newStatus = "NotStarted", }); @@ -932,7 +932,7 @@ public void Example_UpdateTaskStatus_AllParameters() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { newStatus = "NotStarted", comment = "", @@ -950,7 +950,7 @@ public async Task Example_UpdateTaskStatus_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); PurviewWorkflowServiceClient client = new PurviewWorkflowServiceClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { newStatus = "NotStarted", comment = "", diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Custom/TenantResource.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Custom/TenantResource.cs index e6b885aa52275..6fadc0c8334a4 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Custom/TenantResource.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Custom/TenantResource.cs @@ -1,7 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using System.Threading; +using System.Threading.Tasks; using Azure.Core; using Azure.ResourceManager.Resources.Models; @@ -18,6 +20,8 @@ namespace Azure.ResourceManager.Resources [CodeGenSuppress("GetAvailableLocationsAsync", typeof(CancellationToken))] [CodeGenSuppress("GetTenants")] [CodeGenSuppress("CreateResourceIdentifier")] + [CodeGenSuppress("GetGenericResourceAsync", typeof(ResourceIdentifier), typeof(string), typeof(CancellationToken))] + [CodeGenSuppress("GetGenericResource", typeof(ResourceIdentifier), typeof(string), typeof(CancellationToken))] // [CodeGenSuppress("_tenantsRestClient")] // TODO: not working for private member public partial class TenantResource : ArmResource { @@ -83,5 +87,51 @@ public virtual Pageable GetTenantResourceProviders(int? { return GetTenantResourceProviders(expand, cancellationToken); } + + /// + /// Gets a resource by ID. + /// + /// + /// Request Path + /// /{resourceId} + /// + /// + /// Operation Id + /// Resources_GetById + /// + /// + /// + /// The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}. + /// The cancellation token to use. + /// is null. + // api-version is defined as method parameter in spec but used as client parameter for Resources_GetById to keep the contract unchaged + [ForwardsClientCalls] + public virtual async Task> GetGenericResourceAsync(ResourceIdentifier resourceId, CancellationToken cancellationToken = default) + { + return await GetGenericResources().GetAsync(resourceId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a resource by ID. + /// + /// + /// Request Path + /// /{resourceId} + /// + /// + /// Operation Id + /// Resources_GetById + /// + /// + /// + /// The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}. + /// The cancellation token to use. + /// is null. + // api-version is defined as method parameter in spec but used as client parameter for Resources_GetById to keep the contract unchaged + [ForwardsClientCalls] + public virtual Response GetGenericResource(ResourceIdentifier resourceId, CancellationToken cancellationToken = default) + { + return GetGenericResources().Get(resourceId, cancellationToken); + } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Custom/RestOperations/ResourcesRestOperations.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/RestOperations/ResourcesRestOperations.cs similarity index 79% rename from sdk/resourcemanager/Azure.ResourceManager/src/Resources/Custom/RestOperations/ResourcesRestOperations.cs rename to sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/RestOperations/ResourcesRestOperations.cs index 825b99923d712..5a55aaefd6ca6 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Custom/RestOperations/ResourcesRestOperations.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/RestOperations/ResourcesRestOperations.cs @@ -14,8 +14,6 @@ using Azure.Core.Pipeline; using Azure.ResourceManager.Resources.Models; -[assembly: CodeGenSuppressType("ResourcesRestOperations")] - namespace Azure.ResourceManager.Resources { internal partial class ResourcesRestOperations @@ -73,7 +71,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str /// Get all the resources for a resource group. /// The ID of the target subscription. /// The resource group with the resources to get. - /// The filter to apply on the operation.<br><br>The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.<br><br>For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'<br><br>You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)<br><br>You can link more than one substringof together by adding and/or operators.<br><br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each resource are not returned in the results.<br><br>You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. + /// The filter to apply on the operation.<br><br>The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.<br><br>For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'<br><br>You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)<br><br>You can link more than one substringof together by adding and/or operators.<br><br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each resource are not returned in the results.<br><br>You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. /// The number of results to return. If null is passed, returns all resources. /// The cancellation token to use. @@ -103,7 +101,7 @@ public async Task> ListByResourceGroupAsync(string /// Get all the resources for a resource group. /// The ID of the target subscription. /// The resource group with the resources to get. - /// The filter to apply on the operation.<br><br>The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.<br><br>For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'<br><br>You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)<br><br>You can link more than one substringof together by adding and/or operators.<br><br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each resource are not returned in the results.<br><br>You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. + /// The filter to apply on the operation.<br><br>The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.<br><br>For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'<br><br>You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)<br><br>You can link more than one substringof together by adding and/or operators.<br><br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each resource are not returned in the results.<br><br>You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. /// The number of results to return. If null is passed, returns all resources. /// The cancellation token to use. @@ -161,7 +159,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string filter, str /// Get all the resources in a subscription. /// The ID of the target subscription. - /// The filter to apply on the operation.<br><br>Filter comparison operators include `eq` (equals) and `ne` (not equals) and may be used with the following properties: `location`, `resourceType`, `name`, `resourceGroup`, `identity`, `identity/principalId`, `plan`, `plan/publisher`, `plan/product`, `plan/name`, `plan/version`, and `plan/promotionCode`.<br><br>For example, to filter by a resource type, use `$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`<br><br><br>`substringof(value, property)` can be used to filter for substrings of the following currently-supported properties: `name` and `resourceGroup`<br><br>For example, to get all resources with 'demo' anywhere in the resource name, use `$filter=substringof('demo', name)`<br><br>Multiple substring operations can also be combined using `and`/`or` operators.<br><br>Note that any truncated number of results queried via `$top` may also not be compatible when using a filter.<br><br><br>Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use `$filter=tagName eq 'tag1' and tagValue eq 'Value1'`. Note that when resources are filtered by tag name and value, <b>the original tags for each resource will not be returned in the results.</b> Any list of additional properties queried via `$expand` may also not be compatible when filtering by tag names/values. <br><br>For tag names only, resources can be filtered by prefix using the following syntax: `$filter=startswith(tagName, 'depart')`. This query will return all resources with a tag name prefixed by the phrase `depart` (i.e.`department`, `departureDate`, `departureTime`, etc.)<br><br><br>Note that some properties can be combined when filtering resources, which include the following: `substringof() and/or resourceType`, `plan and plan/publisher and plan/name`, and `identity and identity/principalId`. + /// The filter to apply on the operation.<br><br>Filter comparison operators include `eq` (equals) and `ne` (not equals) and may be used with the following properties: `location`, `resourceType`, `name`, `resourceGroup`, `identity`, `identity/principalId`, `plan`, `plan/publisher`, `plan/product`, `plan/name`, `plan/version`, and `plan/promotionCode`.<br><br>For example, to filter by a resource type, use `$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`<br><br><br>`substringof(value, property)` can be used to filter for substrings of the following currently-supported properties: `name` and `resourceGroup`<br><br>For example, to get all resources with 'demo' anywhere in the resource name, use `$filter=substringof('demo', name)`<br><br>Multiple substring operations can also be combined using `and`/`or` operators.<br><br>Note that any truncated number of results queried via `$top` may also not be compatible when using a filter.<br><br><br>Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use `$filter=tagName eq 'tag1' and tagValue eq 'Value1'`. Note that when resources are filtered by tag name and value, <b>the original tags for each resource will not be returned in the results.</b> Any list of additional properties queried via `$expand` may also not be compatible when filtering by tag names/values. <br><br>For tag names only, resources can be filtered by prefix using the following syntax: `$filter=startswith(tagName, 'depart')`. This query will return all resources with a tag name prefixed by the phrase `depart` (i.e.`department`, `departureDate`, `departureTime`, etc.)<br><br><br>Note that some properties can be combined when filtering resources, which include the following: `substringof() and/or resourceType`, `plan and plan/publisher and plan/name`, and `identity and identity/principalId`. /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. /// The number of recommendations per page if a paged version of this API is being used. /// The cancellation token to use. @@ -189,7 +187,7 @@ public async Task> ListAsync(string subscriptionId, /// Get all the resources in a subscription. /// The ID of the target subscription. - /// The filter to apply on the operation.<br><br>Filter comparison operators include `eq` (equals) and `ne` (not equals) and may be used with the following properties: `location`, `resourceType`, `name`, `resourceGroup`, `identity`, `identity/principalId`, `plan`, `plan/publisher`, `plan/product`, `plan/name`, `plan/version`, and `plan/promotionCode`.<br><br>For example, to filter by a resource type, use `$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`<br><br><br>`substringof(value, property)` can be used to filter for substrings of the following currently-supported properties: `name` and `resourceGroup`<br><br>For example, to get all resources with 'demo' anywhere in the resource name, use `$filter=substringof('demo', name)`<br><br>Multiple substring operations can also be combined using `and`/`or` operators.<br><br>Note that any truncated number of results queried via `$top` may also not be compatible when using a filter.<br><br><br>Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use `$filter=tagName eq 'tag1' and tagValue eq 'Value1'`. Note that when resources are filtered by tag name and value, <b>the original tags for each resource will not be returned in the results.</b> Any list of additional properties queried via `$expand` may also not be compatible when filtering by tag names/values. <br><br>For tag names only, resources can be filtered by prefix using the following syntax: `$filter=startswith(tagName, 'depart')`. This query will return all resources with a tag name prefixed by the phrase `depart` (i.e.`department`, `departureDate`, `departureTime`, etc.)<br><br><br>Note that some properties can be combined when filtering resources, which include the following: `substringof() and/or resourceType`, `plan and plan/publisher and plan/name`, and `identity and identity/principalId`. + /// The filter to apply on the operation.<br><br>Filter comparison operators include `eq` (equals) and `ne` (not equals) and may be used with the following properties: `location`, `resourceType`, `name`, `resourceGroup`, `identity`, `identity/principalId`, `plan`, `plan/publisher`, `plan/product`, `plan/name`, `plan/version`, and `plan/promotionCode`.<br><br>For example, to filter by a resource type, use `$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`<br><br><br>`substringof(value, property)` can be used to filter for substrings of the following currently-supported properties: `name` and `resourceGroup`<br><br>For example, to get all resources with 'demo' anywhere in the resource name, use `$filter=substringof('demo', name)`<br><br>Multiple substring operations can also be combined using `and`/`or` operators.<br><br>Note that any truncated number of results queried via `$top` may also not be compatible when using a filter.<br><br><br>Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use `$filter=tagName eq 'tag1' and tagValue eq 'Value1'`. Note that when resources are filtered by tag name and value, <b>the original tags for each resource will not be returned in the results.</b> Any list of additional properties queried via `$expand` may also not be compatible when filtering by tag names/values. <br><br>For tag names only, resources can be filtered by prefix using the following syntax: `$filter=startswith(tagName, 'depart')`. This query will return all resources with a tag name prefixed by the phrase `depart` (i.e.`department`, `departureDate`, `departureTime`, etc.)<br><br><br>Note that some properties can be combined when filtering resources, which include the following: `substringof() and/or resourceType`, `plan and plan/publisher and plan/name`, and `identity and identity/principalId`. /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. /// The number of recommendations per page if a paged version of this API is being used. /// The cancellation token to use. @@ -302,7 +300,7 @@ internal HttpMessage CreateCreateOrUpdateByIdRequest(string resourceId, string a /// The API version to use for the operation. /// Create or update resource parameters. /// The cancellation token to use. - /// or or is null. + /// , or is null. public async Task CreateOrUpdateByIdAsync(string resourceId, string apiVersion, GenericResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceId, nameof(resourceId)); @@ -327,7 +325,7 @@ public async Task CreateOrUpdateByIdAsync(string resourceId, string ap /// The API version to use for the operation. /// Create or update resource parameters. /// The cancellation token to use. - /// or or is null. + /// , or is null. public Response CreateOrUpdateById(string resourceId, string apiVersion, GenericResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceId, nameof(resourceId)); @@ -372,7 +370,7 @@ internal HttpMessage CreateUpdateByIdRequest(string resourceId, string apiVersio /// The API version to use for the operation. /// Update resource parameters. /// The cancellation token to use. - /// or or is null. + /// , or is null. public async Task UpdateByIdAsync(string resourceId, string apiVersion, GenericResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceId, nameof(resourceId)); @@ -396,7 +394,7 @@ public async Task UpdateByIdAsync(string resourceId, string apiVersion /// The API version to use for the operation. /// Update resource parameters. /// The cancellation token to use. - /// or or is null. + /// , or is null. public Response UpdateById(string resourceId, string apiVersion, GenericResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceId, nameof(resourceId)); @@ -505,7 +503,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// The URL to the next page of results. /// The ID of the target subscription. /// The resource group with the resources to get. - /// The filter to apply on the operation.<br><br>The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.<br><br>For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'<br><br>You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)<br><br>You can link more than one substringof together by adding and/or operators.<br><br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each resource are not returned in the results.<br><br>You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. + /// The filter to apply on the operation.<br><br>The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.<br><br>For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'<br><br>You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)<br><br>You can link more than one substringof together by adding and/or operators.<br><br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each resource are not returned in the results.<br><br>You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. /// The number of results to return. If null is passed, returns all resources. /// The cancellation token to use. @@ -537,7 +535,7 @@ public async Task> ListByResourceGroupNextPageAsync /// The URL to the next page of results. /// The ID of the target subscription. /// The resource group with the resources to get. - /// The filter to apply on the operation.<br><br>The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.<br><br>For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'<br><br>You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)<br><br>You can link more than one substringof together by adding and/or operators.<br><br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each resource are not returned in the results.<br><br>You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. + /// The filter to apply on the operation.<br><br>The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.<br><br>For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'<br><br>You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.<br><br>For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)<br><br>You can link more than one substringof together by adding and/or operators.<br><br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for each resource are not returned in the results.<br><br>You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. /// The number of results to return. If null is passed, returns all resources. /// The cancellation token to use. @@ -582,7 +580,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get all the resources in a subscription. /// The URL to the next page of results. /// The ID of the target subscription. - /// The filter to apply on the operation.<br><br>Filter comparison operators include `eq` (equals) and `ne` (not equals) and may be used with the following properties: `location`, `resourceType`, `name`, `resourceGroup`, `identity`, `identity/principalId`, `plan`, `plan/publisher`, `plan/product`, `plan/name`, `plan/version`, and `plan/promotionCode`.<br><br>For example, to filter by a resource type, use `$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`<br><br><br>`substringof(value, property)` can be used to filter for substrings of the following currently-supported properties: `name` and `resourceGroup`<br><br>For example, to get all resources with 'demo' anywhere in the resource name, use `$filter=substringof('demo', name)`<br><br>Multiple substring operations can also be combined using `and`/`or` operators.<br><br>Note that any truncated number of results queried via `$top` may also not be compatible when using a filter.<br><br><br>Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use `$filter=tagName eq 'tag1' and tagValue eq 'Value1'`. Note that when resources are filtered by tag name and value, <b>the original tags for each resource will not be returned in the results.</b> Any list of additional properties queried via `$expand` may also not be compatible when filtering by tag names/values. <br><br>For tag names only, resources can be filtered by prefix using the following syntax: `$filter=startswith(tagName, 'depart')`. This query will return all resources with a tag name prefixed by the phrase `depart` (i.e.`department`, `departureDate`, `departureTime`, etc.)<br><br><br>Note that some properties can be combined when filtering resources, which include the following: `substringof() and/or resourceType`, `plan and plan/publisher and plan/name`, and `identity and identity/principalId`. + /// The filter to apply on the operation.<br><br>Filter comparison operators include `eq` (equals) and `ne` (not equals) and may be used with the following properties: `location`, `resourceType`, `name`, `resourceGroup`, `identity`, `identity/principalId`, `plan`, `plan/publisher`, `plan/product`, `plan/name`, `plan/version`, and `plan/promotionCode`.<br><br>For example, to filter by a resource type, use `$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`<br><br><br>`substringof(value, property)` can be used to filter for substrings of the following currently-supported properties: `name` and `resourceGroup`<br><br>For example, to get all resources with 'demo' anywhere in the resource name, use `$filter=substringof('demo', name)`<br><br>Multiple substring operations can also be combined using `and`/`or` operators.<br><br>Note that any truncated number of results queried via `$top` may also not be compatible when using a filter.<br><br><br>Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use `$filter=tagName eq 'tag1' and tagValue eq 'Value1'`. Note that when resources are filtered by tag name and value, <b>the original tags for each resource will not be returned in the results.</b> Any list of additional properties queried via `$expand` may also not be compatible when filtering by tag names/values. <br><br>For tag names only, resources can be filtered by prefix using the following syntax: `$filter=startswith(tagName, 'depart')`. This query will return all resources with a tag name prefixed by the phrase `depart` (i.e.`department`, `departureDate`, `departureTime`, etc.)<br><br><br>Note that some properties can be combined when filtering resources, which include the following: `substringof() and/or resourceType`, `plan and plan/publisher and plan/name`, and `identity and identity/principalId`. /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. /// The number of recommendations per page if a paged version of this API is being used. /// The cancellation token to use. @@ -612,7 +610,7 @@ public async Task> ListNextPageAsync(string nextLin /// Get all the resources in a subscription. /// The URL to the next page of results. /// The ID of the target subscription. - /// The filter to apply on the operation.<br><br>Filter comparison operators include `eq` (equals) and `ne` (not equals) and may be used with the following properties: `location`, `resourceType`, `name`, `resourceGroup`, `identity`, `identity/principalId`, `plan`, `plan/publisher`, `plan/product`, `plan/name`, `plan/version`, and `plan/promotionCode`.<br><br>For example, to filter by a resource type, use `$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`<br><br><br>`substringof(value, property)` can be used to filter for substrings of the following currently-supported properties: `name` and `resourceGroup`<br><br>For example, to get all resources with 'demo' anywhere in the resource name, use `$filter=substringof('demo', name)`<br><br>Multiple substring operations can also be combined using `and`/`or` operators.<br><br>Note that any truncated number of results queried via `$top` may also not be compatible when using a filter.<br><br><br>Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use `$filter=tagName eq 'tag1' and tagValue eq 'Value1'`. Note that when resources are filtered by tag name and value, <b>the original tags for each resource will not be returned in the results.</b> Any list of additional properties queried via `$expand` may also not be compatible when filtering by tag names/values. <br><br>For tag names only, resources can be filtered by prefix using the following syntax: `$filter=startswith(tagName, 'depart')`. This query will return all resources with a tag name prefixed by the phrase `depart` (i.e.`department`, `departureDate`, `departureTime`, etc.)<br><br><br>Note that some properties can be combined when filtering resources, which include the following: `substringof() and/or resourceType`, `plan and plan/publisher and plan/name`, and `identity and identity/principalId`. + /// The filter to apply on the operation.<br><br>Filter comparison operators include `eq` (equals) and `ne` (not equals) and may be used with the following properties: `location`, `resourceType`, `name`, `resourceGroup`, `identity`, `identity/principalId`, `plan`, `plan/publisher`, `plan/product`, `plan/name`, `plan/version`, and `plan/promotionCode`.<br><br>For example, to filter by a resource type, use `$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`<br><br><br>`substringof(value, property)` can be used to filter for substrings of the following currently-supported properties: `name` and `resourceGroup`<br><br>For example, to get all resources with 'demo' anywhere in the resource name, use `$filter=substringof('demo', name)`<br><br>Multiple substring operations can also be combined using `and`/`or` operators.<br><br>Note that any truncated number of results queried via `$top` may also not be compatible when using a filter.<br><br><br>Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use `$filter=tagName eq 'tag1' and tagValue eq 'Value1'`. Note that when resources are filtered by tag name and value, <b>the original tags for each resource will not be returned in the results.</b> Any list of additional properties queried via `$expand` may also not be compatible when filtering by tag names/values. <br><br>For tag names only, resources can be filtered by prefix using the following syntax: `$filter=startswith(tagName, 'depart')`. This query will return all resources with a tag name prefixed by the phrase `depart` (i.e.`department`, `departureDate`, `departureTime`, etc.)<br><br><br>Note that some properties can be combined when filtering resources, which include the following: `substringof() and/or resourceType`, `plan and plan/publisher and plan/name`, and `identity and identity/principalId`. /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. /// The number of recommendations per page if a paged version of this API is being used. /// The cancellation token to use. diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantResource.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantResource.cs index c8df1f118ef59..8092739348b06 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantResource.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantResource.cs @@ -87,50 +87,6 @@ public virtual GenericResourceCollection GetGenericResources() return GetCachedClient(Client => new GenericResourceCollection(Client, Id)); } - /// - /// Gets a resource by ID. - /// - /// - /// Request Path - /// /{resourceId} - /// - /// - /// Operation Id - /// Resources_GetById - /// - /// - /// - /// The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}. - /// The cancellation token to use. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetGenericResourceAsync(ResourceIdentifier resourceId, CancellationToken cancellationToken = default) - { - return await GetGenericResources().GetAsync(resourceId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a resource by ID. - /// - /// - /// Request Path - /// /{resourceId} - /// - /// - /// Operation Id - /// Resources_GetById - /// - /// - /// - /// The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}. - /// The cancellation token to use. - /// is null. - [ForwardsClientCalls] - public virtual Response GetGenericResource(ResourceIdentifier resourceId, CancellationToken cancellationToken = default) - { - return GetGenericResources().Get(resourceId, cancellationToken); - } - /// Gets a collection of TenantPolicyDefinitionResources in the Tenant. /// An object representing collection of TenantPolicyDefinitionResources and their operations over a TenantPolicyDefinitionResource. public virtual TenantPolicyDefinitionCollection GetTenantPolicyDefinitions() diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index deff7b7f2131b..a50e6a3462dd7 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -77,7 +77,7 @@ trigger: - sdk/eventgrid/Azure.ResourceManager.EventGrid - sdk/eventhub/Azure.ResourceManager.EventHubs - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations - - sdk/fleet/Azure.ResourceManager.DatabaseFleetManager + - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet - sdk/fluidrelay/Azure.ResourceManager.FluidRelay - sdk/frontdoor/Azure.ResourceManager.FrontDoor - sdk/grafana/Azure.ResourceManager.Grafana @@ -259,7 +259,7 @@ pr: - sdk/eventgrid/Azure.ResourceManager.EventGrid - sdk/eventhub/Azure.ResourceManager.EventHubs - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations - - sdk/fleet/Azure.ResourceManager.DatabaseFleetManager + - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet - sdk/fluidrelay/Azure.ResourceManager.FluidRelay - sdk/frontdoor/Azure.ResourceManager.FrontDoor - sdk/grafana/Azure.ResourceManager.Grafana diff --git a/sdk/search/Azure.Search.Documents/CHANGELOG.md b/sdk/search/Azure.Search.Documents/CHANGELOG.md index 4241197376949..647732bb0f963 100644 --- a/sdk/search/Azure.Search.Documents/CHANGELOG.md +++ b/sdk/search/Azure.Search.Documents/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 11.5.0-beta.6 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 11.5.0-beta.5 (2023-10-09) ### Features Added diff --git a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj index c0763ea55935e..dda7cee86e787 100644 --- a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj +++ b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj @@ -1,7 +1,7 @@ Microsoft Azure.Search.Documents client library - 11.5.0-beta.5 + 11.5.0-beta.6 11.4.0 diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md index 17f0c99a9828c..b5d6bac99f404 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md @@ -1,13 +1,12 @@ # Release History -## 7.17.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 7.16.2 (2023-10-11) ### Bugs Fixed +- Fixed issue where `ActivitySource` activities were not being created even when the experimental + flag was set. + ### Other Changes - The reference for the AMQP transport library, `Microsoft.Azure.Amqp`, has been bumped to 2.6.3. This fixes an issue with timeout duration calculations during link creation and includes several efficiency improvements. diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj index 30f4a4876210a..6baa5eb77d66c 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj @@ -1,7 +1,7 @@ Azure Service Bus is a fully managed enterprise integration message broker. Service Bus can decouple applications and services. Service Bus offers a reliable and secure platform for asynchronous transfer of data and state. This client library allows for both sending and receiving messages using Azure Service Bus. For more information about Service Bus, see https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview - 7.17.0-beta.1 + 7.16.2 7.16.1 Azure;Service Bus;ServiceBus;.NET;AMQP;$(PackageCommonTags) diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/api/Azure.Storage.DataMovement.Blobs.net6.0.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/api/Azure.Storage.DataMovement.Blobs.net6.0.cs index 2326f9d10ffd5..71ae2c4706fd3 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/api/Azure.Storage.DataMovement.Blobs.net6.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/api/Azure.Storage.DataMovement.Blobs.net6.0.cs @@ -31,7 +31,7 @@ public BlobsStorageResourceProvider(Azure.Storage.DataMovement.Blobs.BlobsStorag public BlobsStorageResourceProvider(Azure.Storage.DataMovement.Blobs.BlobsStorageResourceProvider.GetStorageSharedKeyCredential getStorageSharedKeyCredentialAsync) { } public BlobsStorageResourceProvider(Azure.Storage.DataMovement.Blobs.BlobsStorageResourceProvider.GetTokenCredential getTokenCredentialAsync) { } public BlobsStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential credential) { } - protected override string TypeId { get { throw null; } } + protected override string ProviderId { get { throw null; } } public Azure.Storage.DataMovement.StorageResource FromBlob(string blobUri, Azure.Storage.DataMovement.Blobs.BlobStorageResourceOptions options = null) { throw null; } public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.BlobContainerClient client, Azure.Storage.DataMovement.Blobs.BlobStorageResourceContainerOptions options = null) { throw null; } public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.Specialized.AppendBlobClient client, Azure.Storage.DataMovement.Blobs.AppendBlobStorageResourceOptions options = null) { throw null; } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/api/Azure.Storage.DataMovement.Blobs.netstandard2.0.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/api/Azure.Storage.DataMovement.Blobs.netstandard2.0.cs index 2326f9d10ffd5..71ae2c4706fd3 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/api/Azure.Storage.DataMovement.Blobs.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/api/Azure.Storage.DataMovement.Blobs.netstandard2.0.cs @@ -31,7 +31,7 @@ public BlobsStorageResourceProvider(Azure.Storage.DataMovement.Blobs.BlobsStorag public BlobsStorageResourceProvider(Azure.Storage.DataMovement.Blobs.BlobsStorageResourceProvider.GetStorageSharedKeyCredential getStorageSharedKeyCredentialAsync) { } public BlobsStorageResourceProvider(Azure.Storage.DataMovement.Blobs.BlobsStorageResourceProvider.GetTokenCredential getTokenCredentialAsync) { } public BlobsStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential credential) { } - protected override string TypeId { get { throw null; } } + protected override string ProviderId { get { throw null; } } public Azure.Storage.DataMovement.StorageResource FromBlob(string blobUri, Azure.Storage.DataMovement.Blobs.BlobStorageResourceOptions options = null) { throw null; } public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.BlobContainerClient client, Azure.Storage.DataMovement.Blobs.BlobStorageResourceContainerOptions options = null) { throw null; } public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.Specialized.AppendBlobClient client, Azure.Storage.DataMovement.Blobs.AppendBlobStorageResourceOptions options = null) { throw null; } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs index 6eaf526aaf438..80c85f3ffa618 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs @@ -20,16 +20,12 @@ internal class AppendBlobStorageResource : StorageResourceItemInternal internal long? _length; internal ETag? _etagDownloadLock = default; - /// - /// The identifier for the type of storage resource. - /// protected override string ResourceId => "AppendBlob"; - /// - /// Gets the Uri of the Storage Resource - /// public override Uri Uri => BlobClient.Uri; + public override string ProviderId => "blob"; + /// /// Defines the recommended Transfer Type for the storage resource. /// diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobStorageResourceContainer.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobStorageResourceContainer.cs index 5d12996b35e45..e07d9bfdce039 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobStorageResourceContainer.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobStorageResourceContainer.cs @@ -29,6 +29,8 @@ internal class BlobStorageResourceContainer : StorageResourceContainerInternal /// public override Uri Uri => _uri; + public override string ProviderId => "blob"; + /// /// The constructor to create an instance of the BlobStorageResourceContainer. /// diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobsStorageResourceProvider.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobsStorageResourceProvider.cs index 05956dcf7426c..b658f90426320 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobsStorageResourceProvider.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobsStorageResourceProvider.cs @@ -66,7 +66,7 @@ private enum CredentialType } /// - protected override string TypeId => "blob"; + protected override string ProviderId => "blob"; private readonly CredentialType _credentialType; private readonly GetStorageSharedKeyCredential _getStorageSharedKeyCredential; diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs index e89c631f015ff..b9810b23c2ee4 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs @@ -30,16 +30,12 @@ internal class BlockBlobStorageResource : StorageResourceItemInternal /// private ConcurrentDictionary _blocks; - /// - /// The identifier for the type of storage resource. - /// protected override string ResourceId => "BlockBlob"; - /// - /// Gets the Uri of the StorageResource - /// public override Uri Uri => BlobClient.Uri; + public override string ProviderId => "blob"; + /// /// Defines the recommended Transfer Type of the storage resource. /// diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs index 88737b707e989..6b7710fa25ec3 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs @@ -20,16 +20,12 @@ internal class PageBlobStorageResource : StorageResourceItemInternal internal long? _length; internal ETag? _etagDownloadLock = default; - /// - /// The identifier for the type of storage resource. - /// protected override string ResourceId => "PageBlob"; - /// - /// Gets the Uri of the Storage Resource - /// public override Uri Uri => BlobClient.Uri; + public override string ProviderId => "blob"; + /// /// Defines the recommended Transfer Type for the storage resource. /// diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/RehydrateBlobResourceTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/RehydrateBlobResourceTests.cs index 0ff2fd389c6c7..ea0c01252138e 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/RehydrateBlobResourceTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/RehydrateBlobResourceTests.cs @@ -41,6 +41,18 @@ private static string ToResourceId(StorageResourceType type) }; } + private static string ToProviderId(StorageResourceType type) + { + return type switch + { + StorageResourceType.BlockBlob => "blob", + StorageResourceType.PageBlob => "blob", + StorageResourceType.AppendBlob => "blob", + StorageResourceType.Local => "local", + _ => throw new NotImplementedException(), + }; + } + private static Mock GetProperties( string checkpointerPath, string transferId, @@ -48,6 +60,8 @@ private static Mock GetProperties( string destinationPath, string sourceResourceId, string destinationResourceId, + string sourceProviderId, + string destinationProviderId, bool isContainer) { var mock = new Mock(MockBehavior.Strict); @@ -57,6 +71,8 @@ private static Mock GetProperties( mock.Setup(p => p.DestinationPath).Returns(destinationPath); mock.Setup(p => p.SourceTypeId).Returns(sourceResourceId); mock.Setup(p => p.DestinationTypeId).Returns(destinationResourceId); + mock.Setup(p => p.SourceProviderId).Returns(sourceProviderId); + mock.Setup(p => p.DestinationProviderId).Returns(destinationProviderId); mock.Setup(p => p.IsContainer).Returns(isContainer); return mock; } @@ -112,8 +128,10 @@ private async Task AddJobPartToCheckpointer( // Use mock resources that don't correspond to correct paths var sourceMock = new Mock(); sourceMock.Setup(s => s.Uri).Returns(new Uri(CheckpointerTesting.DefaultWebSourcePath)); + sourceMock.Setup(s => s.ProviderId).Returns(ToProviderId(sourceType)); var destMock = new Mock(); destMock.Setup(s => s.Uri).Returns(new Uri(CheckpointerTesting.DefaultWebDestinationPath)); + destMock.Setup(s => s.ProviderId).Returns(ToProviderId(destinationType)); await checkpointer.AddNewJobAsync(transferId, sourceMock.Object, destMock.Object); for (int currentPart = 0; currentPart < partCount; currentPart++) @@ -159,6 +177,8 @@ public async Task RehydrateBlockBlob( destinationPath, ToResourceId(sourceType), ToResourceId(destinationType), + ToProviderId(sourceType), + ToProviderId(destinationType), isContainer: false).Object; await AddJobPartToCheckpointer( @@ -196,6 +216,8 @@ public async Task RehydrateBlockBlob_Options() destinationPath, ToResourceId(sourceType), ToResourceId(destinationType), + ToProviderId(sourceType), + ToProviderId(destinationType), isContainer: false).Object; IDictionary metadata = DataProvider.BuildMetadata(); @@ -250,6 +272,8 @@ public async Task RehydratePageBlob( destinationPath, ToResourceId(sourceType), ToResourceId(destinationType), + ToProviderId(sourceType), + ToProviderId(destinationType), isContainer: false).Object; await AddJobPartToCheckpointer( @@ -287,6 +311,8 @@ public async Task RehydratePageBlob_Options() destinationPath, ToResourceId(sourceType), ToResourceId(destinationType), + ToProviderId(sourceType), + ToProviderId(destinationType), isContainer: false).Object; IDictionary metadata = DataProvider.BuildMetadata(); @@ -341,6 +367,8 @@ public async Task RehydrateAppendBlob( destinationPath, ToResourceId(sourceType), ToResourceId(destinationType), + ToProviderId(sourceType), + ToProviderId(destinationType), isContainer: false).Object; await AddJobPartToCheckpointer( @@ -378,6 +406,8 @@ public async Task RehydrateAppendBlob_Options() destinationPath, ToResourceId(sourceType), ToResourceId(destinationType), + ToProviderId(sourceType), + ToProviderId(destinationType), isContainer: false).Object; IDictionary metadata = DataProvider.BuildMetadata(); @@ -441,6 +471,8 @@ public async Task RehydrateBlobContainer( destinationParentPath, ToResourceId(sourceType), ToResourceId(destinationType), + ToProviderId(sourceType), + ToProviderId(destinationType), isContainer: true).Object; await AddJobPartToCheckpointer( diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs index 955bcdbd3f424..2c7c6cc1fad59 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs @@ -15,7 +15,7 @@ public ShareFilesStorageResourceProvider(Azure.Storage.DataMovement.Files.Shares public ShareFilesStorageResourceProvider(Azure.Storage.DataMovement.Files.Shares.ShareFilesStorageResourceProvider.GetStorageSharedKeyCredential getStorageSharedKeyCredentialAsync) { } public ShareFilesStorageResourceProvider(Azure.Storage.DataMovement.Files.Shares.ShareFilesStorageResourceProvider.GetTokenCredential getTokenCredentialAsync) { } public ShareFilesStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential credential) { } - protected override string TypeId { get { throw null; } } + protected override string ProviderId { get { throw null; } } public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Files.Shares.ShareDirectoryClient client, Azure.Storage.DataMovement.Files.Shares.ShareFileStorageResourceOptions options = null) { throw null; } public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Files.Shares.ShareFileClient client, Azure.Storage.DataMovement.Files.Shares.ShareFileStorageResourceOptions options = null) { throw null; } protected override System.Threading.Tasks.Task FromDestinationAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs index 955bcdbd3f424..2c7c6cc1fad59 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs @@ -15,7 +15,7 @@ public ShareFilesStorageResourceProvider(Azure.Storage.DataMovement.Files.Shares public ShareFilesStorageResourceProvider(Azure.Storage.DataMovement.Files.Shares.ShareFilesStorageResourceProvider.GetStorageSharedKeyCredential getStorageSharedKeyCredentialAsync) { } public ShareFilesStorageResourceProvider(Azure.Storage.DataMovement.Files.Shares.ShareFilesStorageResourceProvider.GetTokenCredential getTokenCredentialAsync) { } public ShareFilesStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential credential) { } - protected override string TypeId { get { throw null; } } + protected override string ProviderId { get { throw null; } } public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Files.Shares.ShareDirectoryClient client, Azure.Storage.DataMovement.Files.Shares.ShareFileStorageResourceOptions options = null) { throw null; } public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Files.Shares.ShareFileClient client, Azure.Storage.DataMovement.Files.Shares.ShareFileStorageResourceOptions options = null) { throw null; } protected override System.Threading.Tasks.Task FromDestinationAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs index 9a3ca0124f4ea..161024ebb0fa8 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs @@ -20,6 +20,8 @@ internal class ShareDirectoryStorageResourceContainer : StorageResourceContainer public override Uri Uri => ShareDirectoryClient.Uri; + public override string ProviderId => "share"; + internal ShareDirectoryStorageResourceContainer(ShareDirectoryClient shareDirectoryClient, ShareFileStorageResourceOptions options) { ShareDirectoryClient = shareDirectoryClient; diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs index 60262de884cef..819a094e74a4c 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs @@ -22,6 +22,8 @@ internal class ShareFileStorageResource : StorageResourceItemInternal public override Uri Uri => ShareFileClient.Uri; + public override string ProviderId => "share"; + protected override string ResourceId => "ShareFile"; protected override DataTransferOrder TransferType => DataTransferOrder.Sequential; diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFilesStorageResourceProvider.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFilesStorageResourceProvider.cs index c832b48d3e27c..9735d98f3d669 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFilesStorageResourceProvider.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFilesStorageResourceProvider.cs @@ -64,7 +64,7 @@ private enum CredentialType } /// - protected override string TypeId => "share"; + protected override string ProviderId => "share"; private readonly CredentialType _credentialType; private readonly GetStorageSharedKeyCredential _getStorageSharedKeyCredential; diff --git a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs index 8e529a84e8588..b021e5acfcdb4 100644 --- a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs @@ -64,9 +64,11 @@ public partial class DataTransferProperties protected internal DataTransferProperties() { } public virtual Azure.Storage.DataMovement.TransferCheckpointStoreOptions Checkpointer { get { throw null; } } public virtual string DestinationPath { get { throw null; } } + public virtual string DestinationProviderId { get { throw null; } } public virtual string DestinationTypeId { get { throw null; } } public virtual bool IsContainer { get { throw null; } } public virtual string SourcePath { get { throw null; } } + public virtual string SourceProviderId { get { throw null; } } public virtual string SourceTypeId { get { throw null; } } public virtual string TransferId { get { throw null; } } } @@ -97,7 +99,7 @@ protected internal DataTransferStatus(Azure.Storage.DataMovement.DataTransferSta public partial class LocalFilesStorageResourceProvider : Azure.Storage.DataMovement.StorageResourceProvider { public LocalFilesStorageResourceProvider() { } - protected internal override string TypeId { get { throw null; } } + protected internal override string ProviderId { get { throw null; } } protected internal override System.Threading.Tasks.Task FromDestinationAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; } public Azure.Storage.DataMovement.StorageResourceContainer FromDirectory(string directoryPath) { throw null; } public Azure.Storage.DataMovement.StorageResourceItem FromFile(string filePath) { throw null; } @@ -113,6 +115,7 @@ public abstract partial class StorageResource { protected StorageResource() { } protected internal abstract bool IsContainer { get; } + public abstract string ProviderId { get; } public abstract System.Uri Uri { get; } } public abstract partial class StorageResourceCheckpointData @@ -168,7 +171,7 @@ public StorageResourceProperties(System.DateTimeOffset lastModified, System.Date public abstract partial class StorageResourceProvider { protected StorageResourceProvider() { } - protected internal abstract string TypeId { get; } + protected internal abstract string ProviderId { get; } protected internal abstract System.Threading.Tasks.Task FromDestinationAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken); protected internal abstract System.Threading.Tasks.Task FromSourceAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken); } diff --git a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs index 8e529a84e8588..b021e5acfcdb4 100644 --- a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs @@ -64,9 +64,11 @@ public partial class DataTransferProperties protected internal DataTransferProperties() { } public virtual Azure.Storage.DataMovement.TransferCheckpointStoreOptions Checkpointer { get { throw null; } } public virtual string DestinationPath { get { throw null; } } + public virtual string DestinationProviderId { get { throw null; } } public virtual string DestinationTypeId { get { throw null; } } public virtual bool IsContainer { get { throw null; } } public virtual string SourcePath { get { throw null; } } + public virtual string SourceProviderId { get { throw null; } } public virtual string SourceTypeId { get { throw null; } } public virtual string TransferId { get { throw null; } } } @@ -97,7 +99,7 @@ protected internal DataTransferStatus(Azure.Storage.DataMovement.DataTransferSta public partial class LocalFilesStorageResourceProvider : Azure.Storage.DataMovement.StorageResourceProvider { public LocalFilesStorageResourceProvider() { } - protected internal override string TypeId { get { throw null; } } + protected internal override string ProviderId { get { throw null; } } protected internal override System.Threading.Tasks.Task FromDestinationAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; } public Azure.Storage.DataMovement.StorageResourceContainer FromDirectory(string directoryPath) { throw null; } public Azure.Storage.DataMovement.StorageResourceItem FromFile(string filePath) { throw null; } @@ -113,6 +115,7 @@ public abstract partial class StorageResource { protected StorageResource() { } protected internal abstract bool IsContainer { get; } + public abstract string ProviderId { get; } public abstract System.Uri Uri { get; } } public abstract partial class StorageResourceCheckpointData @@ -168,7 +171,7 @@ public StorageResourceProperties(System.DateTimeOffset lastModified, System.Date public abstract partial class StorageResourceProvider { protected StorageResourceProvider() { } - protected internal abstract string TypeId { get; } + protected internal abstract string ProviderId { get; } protected internal abstract System.Threading.Tasks.Task FromDestinationAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken); protected internal abstract System.Threading.Tasks.Task FromSourceAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken); } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/CheckpointerExtensions.cs b/sdk/storage/Azure.Storage.DataMovement/src/CheckpointerExtensions.cs index 21aa786e8cd89..436b3efe1f20e 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/CheckpointerExtensions.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/CheckpointerExtensions.cs @@ -44,14 +44,20 @@ internal static async Task GetDataTransferPropertiesAsyn string transferId, CancellationToken cancellationToken) { + JobPlanHeader header; + using (Stream stream = await checkpointer.ReadJobPlanFileAsync( + transferId, + offset: 0, + length: 0, // Read whole file + cancellationToken).ConfigureAwait(false)) + { + header = JobPlanHeader.Deserialize(stream); + } + (string sourceResourceId, string destResourceId) = await checkpointer.GetResourceIdsAsync( transferId, cancellationToken).ConfigureAwait(false); - (string sourcePath, string destPath) = await checkpointer.GetResourcePathsAsync( - transferId, - cancellationToken).ConfigureAwait(false); - bool isContainer = (await checkpointer.CurrentJobPartCountAsync(transferId, cancellationToken).ConfigureAwait(false)) > 1; @@ -59,9 +65,11 @@ internal static async Task GetDataTransferPropertiesAsyn { TransferId = transferId, SourceTypeId = sourceResourceId, - SourcePath = sourcePath, + SourcePath = header.ParentSourcePath, + SourceProviderId = header.SourceProviderId, DestinationTypeId = destResourceId, - DestinationPath = destPath, + DestinationPath = header.ParentDestinationPath, + DestinationProviderId = header.DestinationProviderId, IsContainer = isContainer, }; } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/DataTransferProperties.cs b/sdk/storage/Azure.Storage.DataMovement/src/DataTransferProperties.cs index 369887dd736a4..fafbe32a17887 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/DataTransferProperties.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/DataTransferProperties.cs @@ -28,6 +28,11 @@ public class DataTransferProperties /// public virtual string SourcePath { get; internal set; } + /// + /// A string ID for the source resource provider that should be used for rehydration. + /// + public virtual string SourceProviderId { get; internal set; } + /// /// Contains the Source Scheme of the Storage Resource to rehydrate the StorageResource from. /// @@ -38,6 +43,11 @@ public class DataTransferProperties /// public virtual string DestinationPath { get; internal set; } + /// + /// A string ID for the destination resource provider that should be used for rehydration. + /// + public virtual string DestinationProviderId { get; internal set; } + /// /// Defines whether or not this was a container transfer, in order to rehydrate the StorageResource. /// diff --git a/sdk/storage/Azure.Storage.DataMovement/src/LocalDirectoryStorageResourceContainer.cs b/sdk/storage/Azure.Storage.DataMovement/src/LocalDirectoryStorageResourceContainer.cs index 8180061e17a10..4afa49c03daea 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/LocalDirectoryStorageResourceContainer.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/LocalDirectoryStorageResourceContainer.cs @@ -6,7 +6,6 @@ using System.IO; using System.Runtime.CompilerServices; using System.Threading; -using System.Threading.Tasks; using Azure.Core; namespace Azure.Storage.DataMovement @@ -18,11 +17,10 @@ internal class LocalDirectoryStorageResourceContainer : StorageResourceContainer { private Uri _uri; - /// - /// Gets the path - /// public override Uri Uri => _uri; + public override string ProviderId => "local"; + /// /// Constructor /// diff --git a/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs index 9501b4eaa07fb..4afabe93e51c6 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs @@ -16,16 +16,12 @@ internal class LocalFileStorageResource : StorageResourceItem { private Uri _uri; - /// - /// The identifier for the type of storage resource. - /// protected internal override string ResourceId => "LocalFile"; - /// - /// Gets the Uri of the resource. - /// public override Uri Uri => _uri; + public override string ProviderId => "local"; + /// /// Defines the recommended Transfer Type of the resource /// diff --git a/sdk/storage/Azure.Storage.DataMovement/src/LocalFilesStorageResourceProvider.cs b/sdk/storage/Azure.Storage.DataMovement/src/LocalFilesStorageResourceProvider.cs index 610004e094618..0630517ea7ef6 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/LocalFilesStorageResourceProvider.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/LocalFilesStorageResourceProvider.cs @@ -14,7 +14,7 @@ namespace Azure.Storage.DataMovement public class LocalFilesStorageResourceProvider : StorageResourceProvider { /// - protected internal override string TypeId => "LocalFile"; + protected internal override string ProviderId => "local"; /// /// Default constructor. diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs index 45a72ffaefa00..d1f08f199e3c4 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs @@ -72,12 +72,16 @@ internal static class JobPlanFile internal const int VersionStrLength = 2; internal const int VersionStrNumBytes = VersionStrLength * 2; + internal const int ProviderIdMaxLength = 5; + internal const int ProviderIdNumBytes = ProviderIdMaxLength * 2; internal const int VersionIndex = 0; internal const int TransferIdIndex = VersionIndex + VersionStrNumBytes; internal const int CrateTimeIndex = TransferIdIndex + GuidSizeInBytes; internal const int OperationTypeIndex = CrateTimeIndex + LongSizeInBytes; - internal const int EnumerationCompleteIndex = OperationTypeIndex + OneByte; + internal const int SourceProviderIdIndex = OperationTypeIndex + OneByte; + internal const int DestinationProviderIdIndex = SourceProviderIdIndex + ProviderIdNumBytes; + internal const int EnumerationCompleteIndex = DestinationProviderIdIndex + ProviderIdNumBytes; internal const int JobStatusIndex = EnumerationCompleteIndex + OneByte; internal const int ParentSourcePathOffsetIndex = JobStatusIndex + IntSizeInBytes; internal const int ParentSourcePathLengthIndex = ParentSourcePathOffsetIndex + IntSizeInBytes; diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/Errors.DataMovement.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/Errors.DataMovement.cs index d29515d58494a..69a9fd5bf724c 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/Errors.DataMovement.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/Errors.DataMovement.cs @@ -124,5 +124,9 @@ public static InvalidOperationException InvalidTransferResourceTypes() public static ArgumentException ResourceUriInvalid(string parameterResource) => new ArgumentException($"Could not perform operation because {parameterResource} was expected to be not a Local Storage Resource."); + + public static ArgumentException NoResourceProviderFound(bool isSource, string providerId) + => new ArgumentException($"Unable to find resource provider for transfer {(isSource ? "source" : "destination")} with provider id: {providerId}. " + + $"Please ensure you have registered the required resource provider with TransferManagerOptions.ResumeProviders."); } } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/JobPlan/JobPlanHeader.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/JobPlan/JobPlanHeader.cs index b8e4ffebecd23..e87e6f5456521 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/JobPlan/JobPlanHeader.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/JobPlan/JobPlanHeader.cs @@ -30,6 +30,16 @@ internal class JobPlanHeader /// public JobPlanOperation OperationType; + /// + /// A string ID of the source resource provider to use for rehydration. + /// + public string SourceProviderId; + + /// + /// A string ID of the destination resource provider to use for rehydration. + /// + public string DestinationProviderId; + /// /// Whether or not the enumeration of the parent container has completed. /// @@ -55,6 +65,8 @@ public JobPlanHeader( string transferId, DateTimeOffset createTime, JobPlanOperation operationType, + string sourceProviderId, + string destinationProviderId, bool enumerationComplete, DataTransferStatus jobStatus, string parentSourcePath, @@ -62,14 +74,27 @@ public JobPlanHeader( { Argument.AssertNotNull(version, nameof(version)); Argument.AssertNotNullOrEmpty(transferId, nameof(transferId)); + Argument.AssertNotNullOrEmpty(sourceProviderId, nameof(sourceProviderId)); + Argument.AssertNotNullOrEmpty(destinationProviderId, nameof(destinationProviderId)); Argument.AssertNotNull(createTime, nameof(createTime)); Argument.AssertNotNullOrEmpty(parentSourcePath, nameof(parentSourcePath)); Argument.AssertNotNullOrEmpty(parentDestinationPath, nameof(parentDestinationPath)); + if (sourceProviderId.Length > DataMovementConstants.JobPlanFile.ProviderIdMaxLength) + { + throw new ArgumentException("The provided sourceProviderId is too long."); + } + if (destinationProviderId.Length > DataMovementConstants.JobPlanFile.ProviderIdMaxLength) + { + throw new ArgumentException("The provided destinationProviderId is too long."); + } + Version = version; TransferId = transferId; CreateTime = createTime; OperationType = operationType; + SourceProviderId = sourceProviderId; + DestinationProviderId = destinationProviderId; EnumerationComplete = enumerationComplete; JobStatus = jobStatus; ParentSourcePath = parentSourcePath; @@ -96,6 +121,12 @@ public void Serialize(Stream stream) // OperationType writer.Write((byte)OperationType); + // SourceProviderId + WritePaddedString(writer, SourceProviderId, DataMovementConstants.JobPlanFile.ProviderIdNumBytes); + + // DestinationProviderId + WritePaddedString(writer, DestinationProviderId, DataMovementConstants.JobPlanFile.ProviderIdNumBytes); + // EnumerationComplete writer.Write(Convert.ToByte(EnumerationComplete)); @@ -143,6 +174,12 @@ public static JobPlanHeader Deserialize(Stream stream) byte operationTypeByte = reader.ReadByte(); JobPlanOperation operationType = (JobPlanOperation)operationTypeByte; + // SourceProviderId + string sourceProviderId = ReadPaddedString(reader, DataMovementConstants.JobPlanFile.ProviderIdNumBytes); + + // DestinationProviderId + string destProviderId = ReadPaddedString(reader, DataMovementConstants.JobPlanFile.ProviderIdNumBytes); + // EnumerationComplete byte enumerationCompleteByte = reader.ReadByte(); bool enumerationComplete = Convert.ToBoolean(enumerationCompleteByte); @@ -185,6 +222,8 @@ public static JobPlanHeader Deserialize(Stream stream) transferId, createTime, operationType, + sourceProviderId, + destProviderId, enumerationComplete, jobPlanStatus.ToDataTransferStatus(), parentSourcePath, @@ -204,6 +243,12 @@ private static void WritePaddedString(BinaryWriter writer, string value, int set } } + private static string ReadPaddedString(BinaryReader reader, int numBytes) + { + byte[] stringBytes = reader.ReadBytes(numBytes); + return stringBytes.ToString(numBytes).TrimEnd('\0'); + } + private static void CheckSchemaVersion(string version) { if (version != DataMovementConstants.JobPlanFile.SchemaVersion) diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/JobPlanExtensions.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/JobPlanExtensions.cs index 59101bfbf9387..12e9c86b4e8ec 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/JobPlanExtensions.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/JobPlanExtensions.cs @@ -46,51 +46,6 @@ internal static JobPartPlanHeader GetJobPartPlanHeader(this JobPartPlanFileName return result; } - internal static async Task<(string Source, string Destination)> GetResourcePathsAsync( - this TransferCheckpointer checkpointer, - string transferId, - CancellationToken cancellationToken) - { - int startIndex = DataMovementConstants.JobPlanFile.ParentSourcePathOffsetIndex; - - string parentSourcePath = default; - string parentDestinationPath = default; - using (Stream stream = await checkpointer.ReadJobPlanFileAsync( - transferId: transferId, - offset: startIndex, - length: 0, // Read to the end - cancellationToken: cancellationToken).ConfigureAwait(false)) - { - BinaryReader reader = new BinaryReader(stream); - - // ParentSourcePath offset/length - int parentSourcePathOffset = reader.ReadInt32() - startIndex; - int parentSourcePathLength = reader.ReadInt32(); - - // ParentDestinationPath offset/length - int parentDestinationPathOffset = reader.ReadInt32() - startIndex; - int parentDestinationPathLength = reader.ReadInt32(); - - // ParentSourcePath - if (parentSourcePathOffset > 0) - { - reader.BaseStream.Position = parentSourcePathOffset; - byte[] parentSourcePathBytes = reader.ReadBytes(parentSourcePathLength); - parentSourcePath = parentSourcePathBytes.ToString(parentSourcePathLength); - } - - // ParentDestinationPath - if (parentDestinationPathOffset > 0) - { - reader.BaseStream.Position = parentDestinationPathOffset; - byte[] parentDestinationPathBytes = reader.ReadBytes(parentDestinationPathLength); - parentDestinationPath = parentDestinationPathBytes.ToString(parentDestinationPathLength); - } - } - - return (parentSourcePath, parentDestinationPath); - } - internal static async Task<(string Source, string Destination)> GetResourceIdsAsync( this TransferCheckpointer checkpointer, string transferId, diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/LocalTransferCheckpointer.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/LocalTransferCheckpointer.cs index 8de5ea3ab7bf6..1cb7dfc86488a 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/LocalTransferCheckpointer.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/LocalTransferCheckpointer.cs @@ -72,6 +72,8 @@ public override async Task AddNewJobAsync( transferId, DateTimeOffset.UtcNow, GetOperationType(source, destination), + source.ProviderId, + destination.ProviderId, false, /* enumerationComplete */ new DataTransferStatusInternal(), source.Uri.AbsoluteUri, diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/TransferManager.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/TransferManager.cs index b5e6dc45a9524..94d625a21ea64 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/TransferManager.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/TransferManager.cs @@ -371,7 +371,7 @@ bool TryGetStorageResourceProvider(DataTransferProperties properties, bool getSo { foreach (StorageResourceProvider provider in _resumeProviders) { - if (provider.TypeId == (getSource ? properties.SourceTypeId : properties.DestinationTypeId)) + if (provider.ProviderId == (getSource ? properties.SourceProviderId : properties.DestinationProviderId)) { resourceProvider = provider; return true; @@ -392,11 +392,11 @@ bool TryGetStorageResourceProvider(DataTransferProperties properties, bool getSo if (!TryGetStorageResourceProvider(dataTransferProperties, getSource: true, out StorageResourceProvider sourceProvider)) { - throw new Exception(); + throw Errors.NoResourceProviderFound(true, dataTransferProperties.SourceProviderId); } if (!TryGetStorageResourceProvider(dataTransferProperties, getSource: false, out StorageResourceProvider destinationProvider)) { - throw new Exception(); + throw Errors.NoResourceProviderFound(false, dataTransferProperties.DestinationProviderId); } DataTransfer dataTransfer = await BuildAndAddTransferJobAsync( diff --git a/sdk/storage/Azure.Storage.DataMovement/src/StorageResource.cs b/sdk/storage/Azure.Storage.DataMovement/src/StorageResource.cs index 566c5f8dd85b7..cc04d0c37eece 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/StorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/StorageResource.cs @@ -26,5 +26,11 @@ protected StorageResource() /// Gets the Uri of the Storage Resource. /// public abstract Uri Uri { get; } + + /// + /// A string ID for the resource provider that should be used for rehydration. + /// NOTE: Must be no more than 5 characters long. + /// + public abstract string ProviderId { get; } } } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs index 7442e51567e1f..fb9f0d2bbbf05 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs @@ -4,7 +4,6 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -using Azure.Storage.DataMovement.JobPlan; namespace Azure.Storage.DataMovement { diff --git a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceProvider.cs b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceProvider.cs index ac2280e59b773..76e3120de714e 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceProvider.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceProvider.cs @@ -12,9 +12,9 @@ namespace Azure.Storage.DataMovement public abstract class StorageResourceProvider { /// - /// Type ID. For DataMovement to query in selecting appropirate provider on resume. + /// Provider ID. For DataMovement to query in selecting appropriate provider on resume. /// - protected internal abstract string TypeId { get; } + protected internal abstract string ProviderId { get; } /// /// Gets a source resource from the given transfer properties. diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/GetTransfersTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/GetTransfersTests.cs index 27b7430b2b9dd..fbbcf80c57a20 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/GetTransfersTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/GetTransfersTests.cs @@ -243,11 +243,11 @@ public async Task GetResumableTransfers_LocalCheckpointer() // Build expected results first to use to populate checkpointer DataTransferProperties[] expectedResults = new DataTransferProperties[] { - new DataTransferProperties { TransferId = Guid.NewGuid().ToString(), SourceTypeId = "LocalFile", SourcePath = parentLocalPath1 + "file1", DestinationTypeId = "BlockBlob", DestinationPath = parentRemotePath + "file1", IsContainer = false }, - new DataTransferProperties { TransferId = Guid.NewGuid().ToString(), SourceTypeId = "BlockBlob", SourcePath = parentRemotePath + "file2/", DestinationTypeId = "LocalFile", DestinationPath = parentLocalPath1 + "file2/", IsContainer = false }, - new DataTransferProperties { TransferId = Guid.NewGuid().ToString(), SourceTypeId = "BlockBlob", SourcePath = parentRemotePath + "file3", DestinationTypeId = "BlockBlob", DestinationPath = parentRemotePath + "file3", IsContainer = false }, - new DataTransferProperties { TransferId = Guid.NewGuid().ToString(), SourceTypeId = "BlockBlob", SourcePath = parentRemotePath, DestinationTypeId = "LocalFile", DestinationPath = parentLocalPath1, IsContainer = true }, - new DataTransferProperties { TransferId = Guid.NewGuid().ToString(), SourceTypeId = "LocalFile", SourcePath = parentLocalPath2, DestinationTypeId = "AppendBlob", DestinationPath = parentRemotePath, IsContainer = true }, + new DataTransferProperties { TransferId = Guid.NewGuid().ToString(), SourceProviderId = "local", SourceTypeId = "LocalFile", SourcePath = parentLocalPath1 + "file1", DestinationProviderId = "blob", DestinationTypeId = "BlockBlob", DestinationPath = parentRemotePath + "file1", IsContainer = false }, + new DataTransferProperties { TransferId = Guid.NewGuid().ToString(), SourceProviderId = "blob", SourceTypeId = "BlockBlob", SourcePath = parentRemotePath + "file2/", DestinationProviderId = "local", DestinationTypeId = "LocalFile", DestinationPath = parentLocalPath1 + "file2/", IsContainer = false }, + new DataTransferProperties { TransferId = Guid.NewGuid().ToString(), SourceProviderId = "blob", SourceTypeId = "BlockBlob", SourcePath = parentRemotePath + "file3", DestinationProviderId = "blob", DestinationTypeId = "BlockBlob", DestinationPath = parentRemotePath + "file3", IsContainer = false }, + new DataTransferProperties { TransferId = Guid.NewGuid().ToString(), SourceProviderId = "blob", SourceTypeId = "BlockBlob", SourcePath = parentRemotePath, DestinationProviderId = "local", DestinationTypeId = "LocalFile", DestinationPath = parentLocalPath1, IsContainer = true }, + new DataTransferProperties { TransferId = Guid.NewGuid().ToString(), SourceProviderId = "local", SourceTypeId = "LocalFile", SourcePath = parentLocalPath2, DestinationProviderId = "blob", DestinationTypeId = "AppendBlob", DestinationPath = parentRemotePath, IsContainer = true }, }; // Add a transfer for each expected result @@ -320,7 +320,9 @@ private void AddTransferFromDataTransferProperties( checkpointerPath, properties.TransferId, parentSourcePath: properties.SourcePath, - parentDestinationPath: properties.DestinationPath); + parentDestinationPath: properties.DestinationPath, + sourceProviderId: properties.SourceProviderId, + destinationProviderId: properties.DestinationProviderId); if (properties.IsContainer) { @@ -368,8 +370,10 @@ private void AddTransferFromDataTransferProperties( private void AssertTransferProperties(DataTransferProperties expected, DataTransferProperties actual) { Assert.AreEqual(expected.TransferId, actual.TransferId); + Assert.AreEqual(expected.SourceProviderId, actual.SourceProviderId); Assert.AreEqual(expected.SourceTypeId, actual.SourceTypeId); Assert.AreEqual(expected.SourcePath.TrimEnd('\\', '/'), actual.SourcePath.TrimEnd('\\', '/')); + Assert.AreEqual(expected.DestinationProviderId, actual.DestinationProviderId); Assert.AreEqual(expected.DestinationTypeId, actual.DestinationTypeId); Assert.AreEqual(expected.DestinationPath.TrimEnd('\\', '/'), actual.DestinationPath.TrimEnd('\\', '/')); Assert.AreEqual(expected.IsContainer, actual.IsContainer); diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/JobPlanHeaderTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/JobPlanHeaderTests.cs index 147476562e1fb..156a3879b2ad7 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/JobPlanHeaderTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/JobPlanHeaderTests.cs @@ -23,6 +23,8 @@ public void Ctor() Assert.AreEqual(DefaultTransferId, header.TransferId); Assert.AreEqual(DefaultCreateTime, header.CreateTime); Assert.AreEqual(DefaultJobPlanOperation, header.OperationType); + Assert.AreEqual(DefaultSourceProviderId, header.SourceProviderId); + Assert.AreEqual(DefaultDestinationProviderId, header.DestinationProviderId); Assert.AreEqual(false, header.EnumerationComplete); Assert.AreEqual(DefaultJobStatus, header.JobStatus); Assert.AreEqual(DefaultSourcePath, header.ParentSourcePath); @@ -41,7 +43,7 @@ public void Serialize() header.Serialize(headerStream); BinaryReader reader = new(fileStream); - byte[] expected = reader.ReadBytes((int) fileStream.Length); + byte[] expected = reader.ReadBytes((int)fileStream.Length); byte[] actual = headerStream.ToArray(); CollectionAssert.AreEqual(expected, actual); @@ -77,6 +79,8 @@ private void DeserializeAndVerify(Stream stream, string version) Assert.AreEqual(DefaultTransferId, deserialized.TransferId); Assert.AreEqual(DefaultCreateTime, deserialized.CreateTime); Assert.AreEqual(DefaultJobPlanOperation, deserialized.OperationType); + Assert.AreEqual(DefaultSourceProviderId, deserialized.SourceProviderId); + Assert.AreEqual(DefaultDestinationProviderId, deserialized.DestinationProviderId); Assert.AreEqual(false, deserialized.EnumerationComplete); Assert.AreEqual(DefaultJobStatus, deserialized.JobStatus); Assert.AreEqual(DefaultSourcePath, deserialized.ParentSourcePath); diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/LocalTransferCheckpointerFactory.cs b/sdk/storage/Azure.Storage.DataMovement/tests/LocalTransferCheckpointerFactory.cs index e5956e9804c5b..73e7533bf5a54 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/LocalTransferCheckpointerFactory.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/LocalTransferCheckpointerFactory.cs @@ -17,9 +17,11 @@ internal class LocalTransferCheckpointerFactory internal const long _testPartNumber = 5; internal static readonly DateTimeOffset _testStartTime = new DateTimeOffset(2023, 03, 13, 15, 24, 6, default); + internal const string _testSourceProviderId = "test"; internal const string _testSourceResourceId = "LocalFile"; internal const string _testSourcePath = "C:/sample-source"; internal const string _testSourceQuery = "sourcequery"; + internal const string _testDestinationProviderId = "test"; internal const string _testDestinationResourceId = "LocalFile"; internal const string _testDestinationPath = "C:/sample-destination"; internal const string _testDestinationQuery = "destquery"; @@ -148,6 +150,8 @@ internal void CreateStubJobPlanFile( string transferId, string parentSourcePath = _testSourcePath, string parentDestinationPath = _testDestinationPath, + string sourceProviderId = _testSourceProviderId, + string destinationProviderId = _testDestinationProviderId, DataTransferStatus status = default) { status ??= new DataTransferStatus(); @@ -156,6 +160,8 @@ internal void CreateStubJobPlanFile( transferId, DateTimeOffset.UtcNow, JobPlanOperation.ServiceToService, + sourceProviderId, + destinationProviderId, false, /* enumerationComplete */ status, parentSourcePath, diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResource.cs index fa38f02fd31fb..fafdd03f10fad 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResource.cs @@ -16,6 +16,8 @@ internal class MockStorageResource : StorageResourceItem public override Uri Uri => _uri; + public override string ProviderId => "mock"; + protected internal override string ResourceId => "Mock"; protected internal override DataTransferOrder TransferType => DataTransferOrder.Sequential; diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Resources/SampleJobPlanFile.b1.ndm b/sdk/storage/Azure.Storage.DataMovement/tests/Resources/SampleJobPlanFile.b1.ndm index 2ce5cb307dbf2..07cf481e1571d 100644 Binary files a/sdk/storage/Azure.Storage.DataMovement/tests/Resources/SampleJobPlanFile.b1.ndm and b/sdk/storage/Azure.Storage.DataMovement/tests/Resources/SampleJobPlanFile.b1.ndm differ diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/CheckpointerTesting.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/CheckpointerTesting.cs index f9b335ea9fe4e..2235d0d96a4c1 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/CheckpointerTesting.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/CheckpointerTesting.cs @@ -26,10 +26,12 @@ internal class CheckpointerTesting internal const long DefaultPartNumber = 5; internal static readonly DateTimeOffset DefaultStartTime = new DateTimeOffset(2023, 03, 13, 15, 24, 6, default); + internal const string DefaultSourceProviderId = "test"; internal const string DefaultSourceResourceId = "LocalFile"; internal const string DefaultSourcePath = "C:/sample-source"; internal const string DefaultWebSourcePath = "https://example.com/source"; internal const string DefaultSourceQuery = "sourcequery"; + internal const string DefaultDestinationProviderId = "test"; internal const string DefaultDestinationResourceId = "LocalFile"; internal const string DefaultDestinationPath = "C:/sample-destination"; internal const string DefaultWebDestinationPath = "https://example.com/destination"; @@ -181,6 +183,8 @@ internal static JobPlanHeader CreateDefaultJobHeader( string transferId = DefaultTransferId, DateTimeOffset createTime = default, JobPlanOperation operationType = DefaultJobPlanOperation, + string sourceProviderId = DefaultSourceProviderId, + string destinationProviderId = DefaultDestinationProviderId, bool enumerationComplete = false, DataTransferStatus jobStatus = default, string parentSourcePath = DefaultSourcePath, @@ -197,6 +201,8 @@ internal static JobPlanHeader CreateDefaultJobHeader( transferId, createTime, operationType, + sourceProviderId, + destinationProviderId, enumerationComplete, jobStatus, parentSourcePath, diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceContainer.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceContainer.cs index 227f3faf37813..f40571647fc9c 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceContainer.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceContainer.cs @@ -18,6 +18,8 @@ internal class MemoryStorageResourceContainer : StorageResourceContainer public override Uri Uri { get; } + public override string ProviderId => "mock"; + public MemoryStorageResourceContainer(Uri uri) { Uri = uri ?? new Uri($"memory://localhost/mycontainer/mypath-{Guid.NewGuid()}/resource-item-{Guid.NewGuid()}"); diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs index eae69e6cc9b0b..7363eaba93d16 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs @@ -14,6 +14,8 @@ internal class MemoryStorageResourceItem : StorageResourceItem public override Uri Uri { get; } + public override string ProviderId => "mock"; + protected internal override string ResourceId => "MemoryBuffer"; protected internal override DataTransferOrder TransferType => DataTransferOrder.Unordered; 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 47435c6698806..5c7232cf34cb1 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 @@ -9,7 +9,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { subject = new { @@ -36,7 +36,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { subject = new { @@ -76,7 +76,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { subject = new { @@ -103,7 +103,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { subject = new { @@ -203,7 +203,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { roleId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", @@ -220,7 +220,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { roleId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", @@ -245,7 +245,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { roleId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", @@ -262,7 +262,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); -RequestContent content = RequestContent.Create(new +using RequestContent content = RequestContent.Create(new { roleId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", 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 ecc5065fd2878..623b2187a3ef4 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 @@ -26,7 +26,7 @@ public void Example_CheckPrincipalAccess_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { subject = new { @@ -56,7 +56,7 @@ public async Task Example_CheckPrincipalAccess_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { subject = new { @@ -86,7 +86,7 @@ public void Example_CheckPrincipalAccess_AllParameters() TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { subject = new { @@ -126,7 +126,7 @@ public async Task Example_CheckPrincipalAccess_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { subject = new { @@ -232,7 +232,7 @@ public void Example_CreateRoleAssignment_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { roleId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", @@ -252,7 +252,7 @@ public async Task Example_CreateRoleAssignment_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { roleId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", @@ -272,7 +272,7 @@ public void Example_CreateRoleAssignment_AllParameters() TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { roleId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", @@ -297,7 +297,7 @@ public async Task Example_CreateRoleAssignment_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); RoleAssignmentsClient client = new RoleAssignmentsClient(endpoint, credential); - RequestContent content = RequestContent.Create(new + using RequestContent content = RequestContent.Create(new { roleId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", principalId = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/api/Azure.Messaging.WebPubSub.Client.netstandard2.0.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/api/Azure.Messaging.WebPubSub.Client.netstandard2.0.cs index 0110be1c4dc3d..fd548ce588fc0 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/api/Azure.Messaging.WebPubSub.Client.netstandard2.0.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/api/Azure.Messaging.WebPubSub.Client.netstandard2.0.cs @@ -152,7 +152,7 @@ public WebPubSubJsonProtocol() { } public override string Name { get { throw null; } } public override Azure.Messaging.WebPubSub.Clients.WebPubSubProtocolMessageType WebSocketMessageType { get { throw null; } } public override System.ReadOnlyMemory GetMessageBytes(Azure.Messaging.WebPubSub.Clients.WebPubSubMessage message) { throw null; } - public override Azure.Messaging.WebPubSub.Clients.WebPubSubMessage ParseMessage(System.Buffers.ReadOnlySequence input) { throw null; } + public override System.Collections.Generic.IReadOnlyList ParseMessage(System.Buffers.ReadOnlySequence input) { throw null; } public override void WriteMessage(Azure.Messaging.WebPubSub.Clients.WebPubSubMessage message, System.Buffers.IBufferWriter output) { } } public partial class WebPubSubJsonReliableProtocol : Azure.Messaging.WebPubSub.Clients.WebPubSubProtocol @@ -162,7 +162,7 @@ public WebPubSubJsonReliableProtocol() { } public override string Name { get { throw null; } } public override Azure.Messaging.WebPubSub.Clients.WebPubSubProtocolMessageType WebSocketMessageType { get { throw null; } } public override System.ReadOnlyMemory GetMessageBytes(Azure.Messaging.WebPubSub.Clients.WebPubSubMessage message) { throw null; } - public override Azure.Messaging.WebPubSub.Clients.WebPubSubMessage ParseMessage(System.Buffers.ReadOnlySequence input) { throw null; } + public override System.Collections.Generic.IReadOnlyList ParseMessage(System.Buffers.ReadOnlySequence input) { throw null; } public override void WriteMessage(Azure.Messaging.WebPubSub.Clients.WebPubSubMessage message, System.Buffers.IBufferWriter output) { } } public abstract partial class WebPubSubMessage @@ -176,7 +176,7 @@ protected WebPubSubProtocol() { } public abstract string Name { get; } public abstract Azure.Messaging.WebPubSub.Clients.WebPubSubProtocolMessageType WebSocketMessageType { get; } public abstract System.ReadOnlyMemory GetMessageBytes(Azure.Messaging.WebPubSub.Clients.WebPubSubMessage message); - public abstract Azure.Messaging.WebPubSub.Clients.WebPubSubMessage ParseMessage(System.Buffers.ReadOnlySequence input); + public abstract System.Collections.Generic.IReadOnlyList ParseMessage(System.Buffers.ReadOnlySequence input); public abstract void WriteMessage(Azure.Messaging.WebPubSub.Clients.WebPubSubMessage message, System.Buffers.IBufferWriter output); } public enum WebPubSubProtocolMessageType diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonProtocol.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonProtocol.cs index e8dcab7c3dbf3..fc54a90b7d0a3 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonProtocol.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonProtocol.cs @@ -46,7 +46,7 @@ public override ReadOnlyMemory GetMessageBytes(WebPubSubMessage message) /// /// The serialized representation of the message. /// A - public override WebPubSubMessage ParseMessage(ReadOnlySequence input) + public override IReadOnlyList ParseMessage(ReadOnlySequence input) { return _processor.ParseMessage(input); } diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonProtocolBase.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonProtocolBase.cs index e3109c2172daa..49cc0152a92d2 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonProtocolBase.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonProtocolBase.cs @@ -67,7 +67,7 @@ public ReadOnlyMemory GetMessageBytes(WebPubSubMessage message) return new Memory(writer.ToArray()); } - public virtual WebPubSubMessage ParseMessage(ReadOnlySequence input) + public virtual IReadOnlyList ParseMessage(ReadOnlySequence input) { try { @@ -264,7 +264,7 @@ public virtual WebPubSubMessage ParseMessage(ReadOnlySequence input) case DownstreamEventType.Ack: AssertNotNull(ackId, AckIdPropertyName); AssertNotNull(success, SuccessPropertyName); - return new AckMessage(ackId.Value, success.Value, errorDetail); + return new List { new AckMessage(ackId.Value, success.Value, errorDetail) }; case DownstreamEventType.Message: AssertNotNull(from, FromPropertyName); @@ -273,10 +273,10 @@ public virtual WebPubSubMessage ParseMessage(ReadOnlySequence input) switch (fromType) { case FromType.Server: - return new ServerDataMessage(dataType, data, sequenceId); + return new List { new ServerDataMessage(dataType, data, sequenceId) }; case FromType.Group: AssertNotNull(group, GroupPropertyName); - return new GroupDataMessage(group, dataType, data, sequenceId, fromUserId); + return new List { new GroupDataMessage(group, dataType, data, sequenceId, fromUserId) }; // Forward compatible default: return null; @@ -288,9 +288,9 @@ public virtual WebPubSubMessage ParseMessage(ReadOnlySequence input) switch (systemEventType) { case SystemEventType.Connected: - return new ConnectedMessage(userId, connectionId, reconnectionToken); + return new List { new ConnectedMessage(userId, connectionId, reconnectionToken) }; case SystemEventType.Disconnected: - return new DisconnectedMessage(message); + return new List { new DisconnectedMessage(message) }; // Forward compatible default: return null; diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonReliableProtocol.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonReliableProtocol.cs index 019d6e6a8fcc2..c9db9f8e2afb2 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonReliableProtocol.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubJsonReliableProtocol.cs @@ -46,7 +46,7 @@ public override ReadOnlyMemory GetMessageBytes(WebPubSubMessage message) /// /// The serialized representation of the message. /// A - public override WebPubSubMessage ParseMessage(ReadOnlySequence input) + public override IReadOnlyList ParseMessage(ReadOnlySequence input) { return _processor.ParseMessage(input); } diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubProtocol.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubProtocol.cs index ee27741d6701b..b4ffd0d9fd519 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubProtocol.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/Protocols/WebPubSubProtocol.cs @@ -29,7 +29,7 @@ public abstract class WebPubSubProtocol /// /// The serialized representation of the message. /// A - public abstract WebPubSubMessage ParseMessage(ReadOnlySequence input); + public abstract IReadOnlyList ParseMessage(ReadOnlySequence input); /// /// Writes the specified to a writer. diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/WebPubSubClient.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/WebPubSubClient.cs index a6ba69596bab4..e85c9621ed824 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/WebPubSubClient.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/src/WebPubSubClient.cs @@ -514,8 +514,10 @@ private async Task ListenLoop(IWebSocketClient client, CancellationToken token) { try { - var message = _protocol.ParseMessage(result.Payload); - await HandleMessageAsync(message, token).ConfigureAwait(false); + foreach (var message in _protocol.ParseMessage(result.Payload)) + { + await HandleMessageAsync(message, token).ConfigureAwait(false); + } } catch (Exception ex) { diff --git a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/tests/Protocols/JsonProtocolTests.cs b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/tests/Protocols/JsonProtocolTests.cs index c2ca7e1214170..1d6dc80882683 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/tests/Protocols/JsonProtocolTests.cs +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/tests/Protocols/JsonProtocolTests.cs @@ -4,6 +4,7 @@ using System; using System.Buffers; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.Json; using System.Text.Json.Serialization; @@ -152,7 +153,7 @@ public void ParseMessageTest(byte[] payload, Action messageAss { var protocol = new WebPubSubJsonProtocol(); var resolvedMessage = protocol.ParseMessage(new ReadOnlySequence(payload)); - messageAssert(resolvedMessage); + messageAssert(resolvedMessage[0]); } [TestCaseSource(nameof(GetSerializingTestData))] 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 c928a57924733..a2a774ba576c4 100644 --- a/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/Docs/WebPubSubServiceClient.xml +++ b/sdk/webpubsub/Azure.Messaging.WebPubSub/src/Generated/Docs/WebPubSubServiceClient.xml @@ -45,7 +45,7 @@ This sample shows how to call SendToAllAsync. ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToAllAsync(content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -54,7 +54,7 @@ This sample shows how to call SendToAllAsync with all parameters and request con ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToAllAsync(content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); Console.WriteLine(response.Status); @@ -66,7 +66,7 @@ This sample shows how to call SendToAll. ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToAll(content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -75,7 +75,7 @@ This sample shows how to call SendToAll with all parameters and request content. ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToAll(content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); Console.WriteLine(response.Status); @@ -125,7 +125,7 @@ This sample shows how to call SendToConnectionAsync. ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToConnectionAsync("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -134,7 +134,7 @@ This sample shows how to call SendToConnectionAsync with all parameters and requ ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToConnectionAsync("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -146,7 +146,7 @@ This sample shows how to call SendToConnection. ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToConnection("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -155,7 +155,7 @@ This sample shows how to call SendToConnection with all parameters and request c ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToConnection("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -243,7 +243,7 @@ This sample shows how to call SendToGroupAsync. ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToGroupAsync("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -252,7 +252,7 @@ This sample shows how to call SendToGroupAsync with all parameters and request c ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToGroupAsync("", content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); Console.WriteLine(response.Status); @@ -264,7 +264,7 @@ This sample shows how to call SendToGroup. ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToGroup("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -273,7 +273,7 @@ This sample shows how to call SendToGroup with all parameters and request conten ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToGroup("", content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); Console.WriteLine(response.Status); @@ -399,7 +399,7 @@ This sample shows how to call SendToUserAsync. ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToUserAsync("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -408,7 +408,7 @@ This sample shows how to call SendToUserAsync with all parameters and request co ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToUserAsync("", content, new ContentType("application/json"), filter: ""); Console.WriteLine(response.Status); @@ -420,7 +420,7 @@ This sample shows how to call SendToUser. ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToUser("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -429,7 +429,7 @@ This sample shows how to call SendToUser with all parameters and request content ", ""); -RequestContent content = RequestContent.Create(File.OpenRead("")); +using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToUser("", content, new ContentType("application/json"), filter: ""); 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 b1c5f2d1303b1..c8e0b3b862308 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 @@ -68,7 +68,7 @@ public void Example_SendToAll_ShortVersion() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToAll(content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -80,7 +80,7 @@ public async Task Example_SendToAll_ShortVersion_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToAllAsync(content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -92,7 +92,7 @@ public void Example_SendToAll_AllParameters() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToAll(content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); Console.WriteLine(response.Status); @@ -104,7 +104,7 @@ public async Task Example_SendToAll_AllParameters_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToAllAsync(content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); Console.WriteLine(response.Status); @@ -160,7 +160,7 @@ public void Example_SendToConnection_ShortVersion() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToConnection("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -172,7 +172,7 @@ public async Task Example_SendToConnection_ShortVersion_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToConnectionAsync("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -184,7 +184,7 @@ public void Example_SendToConnection_AllParameters() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToConnection("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -196,7 +196,7 @@ public async Task Example_SendToConnection_AllParameters_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToConnectionAsync("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -296,7 +296,7 @@ public void Example_SendToGroup_ShortVersion() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToGroup("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -308,7 +308,7 @@ public async Task Example_SendToGroup_ShortVersion_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToGroupAsync("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -320,7 +320,7 @@ public void Example_SendToGroup_AllParameters() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToGroup("", content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); Console.WriteLine(response.Status); @@ -332,7 +332,7 @@ public async Task Example_SendToGroup_AllParameters_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToGroupAsync("", content, new ContentType("application/json"), excluded: new string[] { "" }, filter: ""); Console.WriteLine(response.Status); @@ -476,7 +476,7 @@ public void Example_SendToUser_ShortVersion() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToUser("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -488,7 +488,7 @@ public async Task Example_SendToUser_ShortVersion_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToUserAsync("", content, new ContentType("application/json")); Console.WriteLine(response.Status); @@ -500,7 +500,7 @@ public void Example_SendToUser_AllParameters() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = client.SendToUser("", content, new ContentType("application/json"), filter: ""); Console.WriteLine(response.Status); @@ -512,7 +512,7 @@ public async Task Example_SendToUser_AllParameters_Async() { WebPubSubServiceClient client = new WebPubSubServiceClient("", ""); - RequestContent content = RequestContent.Create(File.OpenRead("")); + using RequestContent content = RequestContent.Create(File.OpenRead("")); Response response = await client.SendToUserAsync("", content, new ContentType("application/json"), filter: ""); Console.WriteLine(response.Status);