From f934b2e3146c65b6b37cfff500d978f3c7ff7abe Mon Sep 17 00:00:00 2001
From: azure-powershell-bot
<65331932+azure-powershell-bot@users.noreply.github.com>
Date: Mon, 21 Apr 2025 02:29:24 +0000
Subject: [PATCH] [skip ci] Archive a8ae44c6d3aa550bb832d3554250948b5d70d9c8
---
.../HealthBot.Autorest/Az.HealthBot.csproj | 2 +-
.../Az.HealthBot.format.ps1xml | 130 +-
.../HealthBot.Autorest/Az.HealthBot.psd1 | 3 +-
.../Properties/AssemblyInfo.cs | 30 +-
.../HealthBot.Autorest/check-dependencies.ps1 | 6 +-
.../exports/Get-AzHealthBot.ps1 | 21 +-
.../exports/New-AzHealthBot.ps1 | 50 +-
.../exports/ProxyCmdletDefinitions.ps1 | 141 +-
.../exports/Remove-AzHealthBot.ps1 | 17 +-
.../exports/Update-AzHealthBot.ps1 | 53 +-
.../HealthBot.Autorest/generate-info.json | 2 +-
.../HealthBot.Autorest/generated/Module.cs | 27 +-
.../generated/api/HealthBot.cs | 2174 +++++++++++++----
.../generated/api/Models/Any.PowerShell.cs | 24 +-
.../generated/api/Models/Any.cs | 6 +-
.../generated/api/Models/Any.json.cs | 2 +-
.../Api20201208/HealthBot.PowerShell.cs | 272 ---
.../AvailableOperations.PowerShell.cs | 48 +-
.../AvailableOperations.TypeConverter.cs | 6 +-
.../{Api20201208 => }/AvailableOperations.cs | 22 +-
.../AvailableOperations.json.cs | 12 +-
.../BotResponseList.PowerShell.cs | 48 +-
.../BotResponseList.TypeConverter.cs | 6 +-
.../{Api20201208 => }/BotResponseList.cs | 26 +-
.../{Api20201208 => }/BotResponseList.json.cs | 16 +-
.../{Api20201208 => }/Error.PowerShell.cs | 64 +-
.../{Api20201208 => }/Error.TypeConverter.cs | 6 +-
.../api/Models/{Api20201208 => }/Error.cs | 61 +-
.../Models/{Api20201208 => }/Error.json.cs | 12 +-
...ted.PowerShell.cs => Error1.PowerShell.cs} | 80 +-
...peConverter.cs => Error1.TypeConverter.cs} | 31 +-
.../ErrorAutoGenerated.cs => Error1.cs} | 61 +-
...orAutoGenerated.json.cs => Error1.json.cs} | 42 +-
.../ErrorAdditionalInfo.PowerShell.cs | 48 +-
.../ErrorAdditionalInfo.TypeConverter.cs | 6 +-
.../{Api20201208 => }/ErrorAdditionalInfo.cs | 16 +-
.../ErrorAdditionalInfo.json.cs | 16 +-
.../api/Models/HealthBot.PowerShell.cs | 292 +++
.../HealthBot.TypeConverter.cs | 6 +-
.../api/Models/{Api20201208 => }/HealthBot.cs | 106 +-
.../{Api20201208 => }/HealthBot.json.cs | 16 +-
.../Models/HealthBotIdentity.PowerShell.cs | 20 +
.../generated/api/Models/HealthBotIdentity.cs | 12 +
.../api/Models/HealthBotIdentity.json.cs | 8 +-
.../HealthBotProperties.PowerShell.cs | 48 +-
.../HealthBotProperties.TypeConverter.cs | 6 +-
.../{Api20201208 => }/HealthBotProperties.cs | 16 +-
.../HealthBotProperties.json.cs | 16 +-
.../HealthBotUpdateParameters.PowerShell.cs | 54 +-
...HealthBotUpdateParameters.TypeConverter.cs | 6 +-
.../HealthBotUpdateParameters.cs | 40 +-
.../HealthBotUpdateParameters.json.cs | 12 +-
...ealthBotUpdateParametersTags.PowerShell.cs | 42 +-
...thBotUpdateParametersTags.TypeConverter.cs | 6 +-
.../HealthBotUpdateParametersTags.cs | 6 +-
...ealthBotUpdateParametersTags.dictionary.cs | 4 +-
.../HealthBotUpdateParametersTags.json.cs | 8 +-
.../OperationDetail.PowerShell.cs | 76 +-
.../OperationDetail.TypeConverter.cs | 6 +-
.../{Api20201208 => }/OperationDetail.cs | 46 +-
.../{Api20201208 => }/OperationDetail.json.cs | 18 +-
.../OperationDisplay.PowerShell.cs | 56 +-
.../OperationDisplay.TypeConverter.cs | 6 +-
.../{Api20201208 => }/OperationDisplay.cs | 18 +-
.../OperationDisplay.json.cs | 16 +-
.../{Api20201208 => }/Resource.PowerShell.cs | 80 +-
.../Resource.TypeConverter.cs | 6 +-
.../api/Models/{Api20201208 => }/Resource.cs | 87 +-
.../Models/{Api20201208 => }/Resource.json.cs | 26 +-
.../{Api20201208 => }/Sku.PowerShell.cs | 44 +-
.../{Api20201208 => }/Sku.TypeConverter.cs | 6 +-
.../api/Models/{Api20201208 => }/Sku.cs | 21 +-
.../api/Models/{Api20201208 => }/Sku.json.cs | 12 +-
.../SystemData.PowerShell.cs | 64 +-
.../SystemData.TypeConverter.cs | 6 +-
.../Models/{Api20201208 => }/SystemData.cs | 60 +-
.../{Api20201208 => }/SystemData.json.cs | 34 +-
.../TrackedResource.PowerShell.cs | 88 +-
.../TrackedResource.TypeConverter.cs | 6 +-
.../{Api20201208 => }/TrackedResource.cs | 73 +-
.../{Api20201208 => }/TrackedResource.json.cs | 19 +-
.../TrackedResourceTags.PowerShell.cs | 40 +-
.../TrackedResourceTags.TypeConverter.cs | 6 +-
.../{Api20201208 => }/TrackedResourceTags.cs | 6 +-
.../TrackedResourceTags.dictionary.cs | 4 +-
.../TrackedResourceTags.json.cs | 8 +-
.../ValidationResult.PowerShell.cs | 44 +-
.../ValidationResult.TypeConverter.cs | 6 +-
.../{Api20201208 => }/ValidationResult.cs | 9 +-
.../ValidationResult.json.cs | 10 +-
.../api/Support/IdentityType.Completer.cs | 47 -
.../api/Support/IdentityType.TypeConverter.cs | 59 -
.../generated/api/Support/IdentityType.cs | 102 -
.../api/Support/SkuName.Completer.cs | 43 -
.../api/Support/SkuName.TypeConverter.cs | 59 -
.../generated/api/Support/SkuName.cs | 100 -
.../cmdlets/GetAzHealthBotOperation_List.cs | 112 +-
.../generated/cmdlets/GetAzHealthBot_Get.cs | 112 +-
.../cmdlets/GetAzHealthBot_GetViaIdentity.cs | 105 +-
.../generated/cmdlets/GetAzHealthBot_List.cs | 121 +-
.../generated/cmdlets/GetAzHealthBot_List1.cs | 119 +-
.../cmdlets/NewAzHealthBot_CreateExpanded.cs | 148 +-
.../NewAzHealthBot_CreateViaJsonFilePath.cs | 607 +++++
.../NewAzHealthBot_CreateViaJsonString.cs | 605 +++++
.../cmdlets/RemoveAzHealthBot_Delete.cs | 98 +-
.../RemoveAzHealthBot_DeleteViaIdentity.cs | 91 +-
.../UpdateAzHealthBot_UpdateExpanded.cs | 156 +-
...teAzHealthBot_UpdateViaIdentityExpanded.cs | 155 +-
...UpdateAzHealthBot_UpdateViaJsonFilePath.cs | 578 +++++
.../UpdateAzHealthBot_UpdateViaJsonString.cs | 576 +++++
.../Attributes/ExternalDocsAttribute.cs | 30 +
.../PSArgumentCompleterAttribute.cs | 52 +
.../BuildTime/Cmdlets/ExportFormatPs1xml.cs | 6 +-
.../BuildTime/Cmdlets/ExportModelSurface.cs | 2 +-
.../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 4 +-
.../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 8 +-
.../BuildTime/Cmdlets/ExportTestStub.cs | 211 +-
.../runtime/BuildTime/MarkdownRenderer.cs | 2 +-
.../BuildTime/Models/PsMarkdownTypes.cs | 43 +-
.../BuildTime/Models/PsProxyOutputs.cs | 60 +-
.../runtime/BuildTime/Models/PsProxyTypes.cs | 56 +-
.../runtime/BuildTime/PsAttributes.cs | 15 +
.../runtime/BuildTime/PsExtensions.cs | 7 +
.../generated/runtime/BuildTime/PsHelpers.cs | 4 +-
.../generated/runtime/Context.cs | 33 +
.../generated/runtime/Events.cs | 4 +-
.../generated/runtime/ISendAsync.cs | 113 +
.../generated/runtime/InfoAttribute.cs | 4 +
.../generated/runtime/InputHandler.cs | 22 +
.../runtime/Nodes/Collections/XNodeArray.cs | 5 +
.../generated/runtime/SerializationMode.cs | 8 +-
.../runtime/TypeConverterExtensions.cs | 50 +
.../internal/Get-AzHealthBotOperation.ps1 | 10 +-
.../internal/ProxyCmdletDefinitions.ps1 | 10 +-
.../HealthBot.Autorest/resources/README.md | 11 +
.../HealthBot.Autorest/test-module.ps1 | 10 +-
136 files changed, 7622 insertions(+), 2469 deletions(-)
delete mode 100644 generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/HealthBot.PowerShell.cs
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/AvailableOperations.PowerShell.cs (70%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/AvailableOperations.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/AvailableOperations.cs (75%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/AvailableOperations.json.cs (90%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/BotResponseList.PowerShell.cs (70%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/BotResponseList.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/BotResponseList.cs (69%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/BotResponseList.json.cs (89%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Error.PowerShell.cs (61%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Error.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Error.cs (56%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Error.json.cs (93%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208/ErrorAutoGenerated.PowerShell.cs => Error1.PowerShell.cs} (58%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208/ErrorAutoGenerated.TypeConverter.cs => Error1.TypeConverter.cs} (84%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208/ErrorAutoGenerated.cs => Error1.cs} (63%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208/ErrorAutoGenerated.json.cs => Error1.json.cs} (78%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/ErrorAdditionalInfo.PowerShell.cs (73%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/ErrorAdditionalInfo.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/ErrorAdditionalInfo.cs (82%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/ErrorAdditionalInfo.json.cs (92%)
create mode 100644 generated/HealthBot/HealthBot.Autorest/generated/api/Models/HealthBot.PowerShell.cs
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBot.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBot.cs (51%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBot.json.cs (91%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotProperties.PowerShell.cs (75%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotProperties.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotProperties.cs (85%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotProperties.json.cs (92%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotUpdateParameters.PowerShell.cs (68%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotUpdateParameters.TypeConverter.cs (96%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotUpdateParameters.cs (56%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotUpdateParameters.json.cs (92%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotUpdateParametersTags.PowerShell.cs (80%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotUpdateParametersTags.TypeConverter.cs (96%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotUpdateParametersTags.cs (78%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotUpdateParametersTags.dictionary.cs (95%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/HealthBotUpdateParametersTags.json.cs (94%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/OperationDetail.PowerShell.cs (59%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/OperationDetail.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/OperationDetail.cs (78%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/OperationDetail.json.cs (93%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/OperationDisplay.PowerShell.cs (69%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/OperationDisplay.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/OperationDisplay.cs (90%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/OperationDisplay.json.cs (93%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Resource.PowerShell.cs (56%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Resource.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Resource.cs (66%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Resource.json.cs (89%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Sku.PowerShell.cs (78%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Sku.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Sku.cs (67%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/Sku.json.cs (93%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/SystemData.PowerShell.cs (63%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/SystemData.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/SystemData.cs (73%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/SystemData.json.cs (89%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/TrackedResource.PowerShell.cs (54%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/TrackedResource.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/TrackedResource.cs (55%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/TrackedResource.json.cs (87%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/TrackedResourceTags.PowerShell.cs (81%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/TrackedResourceTags.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/TrackedResourceTags.cs (78%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/TrackedResourceTags.dictionary.cs (95%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/TrackedResourceTags.json.cs (95%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/ValidationResult.PowerShell.cs (77%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/ValidationResult.TypeConverter.cs (97%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/ValidationResult.cs (86%)
rename generated/HealthBot/HealthBot.Autorest/generated/api/Models/{Api20201208 => }/ValidationResult.json.cs (94%)
delete mode 100644 generated/HealthBot/HealthBot.Autorest/generated/api/Support/IdentityType.Completer.cs
delete mode 100644 generated/HealthBot/HealthBot.Autorest/generated/api/Support/IdentityType.TypeConverter.cs
delete mode 100644 generated/HealthBot/HealthBot.Autorest/generated/api/Support/IdentityType.cs
delete mode 100644 generated/HealthBot/HealthBot.Autorest/generated/api/Support/SkuName.Completer.cs
delete mode 100644 generated/HealthBot/HealthBot.Autorest/generated/api/Support/SkuName.TypeConverter.cs
delete mode 100644 generated/HealthBot/HealthBot.Autorest/generated/api/Support/SkuName.cs
create mode 100644 generated/HealthBot/HealthBot.Autorest/generated/cmdlets/NewAzHealthBot_CreateViaJsonFilePath.cs
create mode 100644 generated/HealthBot/HealthBot.Autorest/generated/cmdlets/NewAzHealthBot_CreateViaJsonString.cs
create mode 100644 generated/HealthBot/HealthBot.Autorest/generated/cmdlets/UpdateAzHealthBot_UpdateViaJsonFilePath.cs
create mode 100644 generated/HealthBot/HealthBot.Autorest/generated/cmdlets/UpdateAzHealthBot_UpdateViaJsonString.cs
create mode 100644 generated/HealthBot/HealthBot.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs
create mode 100644 generated/HealthBot/HealthBot.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs
create mode 100644 generated/HealthBot/HealthBot.Autorest/generated/runtime/Context.cs
create mode 100644 generated/HealthBot/HealthBot.Autorest/generated/runtime/InputHandler.cs
create mode 100644 generated/HealthBot/HealthBot.Autorest/resources/README.md
diff --git a/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.csproj b/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.csproj
index d8539550b660..3a5c5b91cfde 100644
--- a/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.csproj
+++ b/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.csproj
@@ -2,9 +2,9 @@
HealthBot
HealthBot
+ HealthBot.Autorest
-
diff --git a/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.format.ps1xml b/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.format.ps1xml
index 7bef62ed409a..ad5b802f5516 100644
--- a/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.format.ps1xml
+++ b/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.format.ps1xml
@@ -2,43 +2,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBotIdentity
-
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBotIdentity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BotName
-
-
- ResourceGroupName
-
-
- SubscriptionId
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.AvailableOperations
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.AvailableOperations
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.AvailableOperations
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.AvailableOperations#Multiple
@@ -58,9 +24,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.BotResponseList
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.BotResponseList
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.BotResponseList
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.BotResponseList#Multiple
@@ -80,9 +46,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error1
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAutoGenerated
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error1#Multiple
@@ -114,9 +80,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBot
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBot
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot#Multiple
@@ -144,6 +110,9 @@
+
+
+
@@ -172,15 +141,52 @@
SystemDataLastModifiedByType
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBotIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBotIdentity#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BotName
+
+
+ ResourceGroupName
+
+
+ SubscriptionId
+
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBotProperties
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBotProperties
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBotProperties
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBotProperties#Multiple
@@ -206,9 +212,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBotUpdateParametersTags
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBotUpdateParametersTags
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBotUpdateParametersTags
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBotUpdateParametersTags#Multiple
@@ -228,9 +234,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.OperationDetail
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.OperationDetail
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.OperationDetail
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.OperationDetail#Multiple
@@ -262,9 +268,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.OperationDisplay
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.OperationDisplay#Multiple
@@ -302,9 +308,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Resource
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Resource#Multiple
@@ -324,9 +330,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Sku
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Sku
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Sku
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Sku#Multiple
@@ -346,9 +352,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.SystemData
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.SystemData#Multiple
@@ -398,9 +404,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.TrackedResource
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.TrackedResource
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.TrackedResource
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.TrackedResource#Multiple
@@ -462,9 +468,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.TrackedResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.TrackedResourceTags
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.TrackedResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.TrackedResourceTags#Multiple
@@ -484,9 +490,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ValidationResult
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ValidationResult
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ValidationResult
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ValidationResult#Multiple
diff --git a/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.psd1 b/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.psd1
index 60f15fab8420..6f027cf3704e 100644
--- a/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.psd1
+++ b/generated/HealthBot/HealthBot.Autorest/Az.HealthBot.psd1
@@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.HealthBot.private.dll'
FormatsToProcess = './Az.HealthBot.format.ps1xml'
- FunctionsToExport = 'Get-AzHealthBot', 'New-AzHealthBot', 'Remove-AzHealthBot', 'Update-AzHealthBot', '*'
- AliasesToExport = '*'
+ FunctionsToExport = 'Get-AzHealthBot', 'New-AzHealthBot', 'Remove-AzHealthBot', 'Update-AzHealthBot'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'HealthBot'
diff --git a/generated/HealthBot/HealthBot.Autorest/Properties/AssemblyInfo.cs b/generated/HealthBot/HealthBot.Autorest/Properties/AssemblyInfo.cs
index e8972afb8bbe..9c238698cb40 100644
--- a/generated/HealthBot/HealthBot.Autorest/Properties/AssemblyInfo.cs
+++ b/generated/HealthBot/HealthBot.Autorest/Properties/AssemblyInfo.cs
@@ -1,28 +1,26 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
+// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-// ----------------------------------------------------------------------------------
+// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+// is regenerated.
using System;
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-[assembly: AssemblyTitle("Microsoft Azure Powershell - HealthBot")]
-[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
-[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
-[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
-
-[assembly: ComVisible(false)]
-[assembly: CLSCompliant(false)]
-[assembly: Guid("b9695b5d-c3f7-4953-a756-af80e7772759")]
-[assembly: AssemblyVersion("0.1.2")]
-[assembly: AssemblyFileVersion("0.1.2")]
+[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
+[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
+[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
+[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - HealthBot")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.2")]
+[assembly: System.Reflection.AssemblyVersionAttribute("0.1.2")]
+[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
+[assembly: System.CLSCompliantAttribute(false)]
diff --git a/generated/HealthBot/HealthBot.Autorest/check-dependencies.ps1 b/generated/HealthBot/HealthBot.Autorest/check-dependencies.ps1
index c29591c7bfe1..90ca9867ae40 100644
--- a/generated/HealthBot/HealthBot.Autorest/check-dependencies.ps1
+++ b/generated/HealthBot/HealthBot.Autorest/check-dependencies.ps1
@@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
$ErrorActionPreference = 'Stop'
-if(-not $Isolated) {
+if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
- & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}
diff --git a/generated/HealthBot/HealthBot.Autorest/exports/Get-AzHealthBot.ps1 b/generated/HealthBot/HealthBot.Autorest/exports/Get-AzHealthBot.ps1
index a3c88c81143b..3201c9c530fb 100644
--- a/generated/HealthBot/HealthBot.Autorest/exports/Get-AzHealthBot.ps1
+++ b/generated/HealthBot/HealthBot.Autorest/exports/Get-AzHealthBot.ps1
@@ -32,7 +32,7 @@ Get-AzHealthBot -InputObject $getAzHealthBot
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot
+Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -47,7 +47,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.healthbot/get-azhealthbot
#>
function Get-AzHealthBot {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -77,7 +77,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -136,6 +135,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -160,9 +168,7 @@ begin {
List = 'Az.HealthBot.private\Get-AzHealthBot_List';
List1 = 'Az.HealthBot.private\Get-AzHealthBot_List1';
}
- if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -176,6 +182,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/HealthBot/HealthBot.Autorest/exports/New-AzHealthBot.ps1 b/generated/HealthBot/HealthBot.Autorest/exports/New-AzHealthBot.ps1
index 70845f06a8df..749f356aaf88 100644
--- a/generated/HealthBot/HealthBot.Autorest/exports/New-AzHealthBot.ps1
+++ b/generated/HealthBot/HealthBot.Autorest/exports/New-AzHealthBot.ps1
@@ -16,19 +16,19 @@
<#
.Synopsis
-Create a new HealthBot.
+create a new HealthBot.
.Description
-Create a new HealthBot.
+create a new HealthBot.
.Example
New-AzHealthBot -Name yourihealthbot1 -ResourceGroupName youriTest -Location eastus -Sku F0
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot
+Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot
.Link
https://learn.microsoft.com/powershell/module/az.healthbot/new-azhealthbot
#>
function New-AzHealthBot {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -51,26 +51,38 @@ param(
# Azure Subscription ID.
${SubscriptionId},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
[System.String]
# The geo-location where the resource lives
${Location},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PSArgumentCompleterAttribute("F0", "S1", "C0")]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName]
+ [System.String]
# The name of the HealthBot SKU
${Sku},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -139,6 +151,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -159,10 +180,10 @@ begin {
$mapping = @{
CreateExpanded = 'Az.HealthBot.private\New-AzHealthBot_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.HealthBot.private\New-AzHealthBot_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.HealthBot.private\New-AzHealthBot_CreateViaJsonString';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -176,6 +197,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/HealthBot/HealthBot.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/HealthBot/HealthBot.Autorest/exports/ProxyCmdletDefinitions.ps1
index 940feef9a9c0..a977d2d72a1c 100644
--- a/generated/HealthBot/HealthBot.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/generated/HealthBot/HealthBot.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -32,7 +32,7 @@ Get-AzHealthBot -InputObject $getAzHealthBot
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot
+Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -47,7 +47,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.healthbot/get-azhealthbot
#>
function Get-AzHealthBot {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -77,7 +77,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -136,6 +135,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -160,9 +168,7 @@ begin {
List = 'Az.HealthBot.private\Get-AzHealthBot_List';
List1 = 'Az.HealthBot.private\Get-AzHealthBot_List1';
}
- if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -176,6 +182,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -221,19 +230,19 @@ end {
<#
.Synopsis
-Create a new HealthBot.
+create a new HealthBot.
.Description
-Create a new HealthBot.
+create a new HealthBot.
.Example
New-AzHealthBot -Name yourihealthbot1 -ResourceGroupName youriTest -Location eastus -Sku F0
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot
+Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot
.Link
https://learn.microsoft.com/powershell/module/az.healthbot/new-azhealthbot
#>
function New-AzHealthBot {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -256,26 +265,38 @@ param(
# Azure Subscription ID.
${SubscriptionId},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
[System.String]
# The geo-location where the resource lives
${Location},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PSArgumentCompleterAttribute("F0", "S1", "C0")]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName]
+ [System.String]
# The name of the HealthBot SKU
${Sku},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -344,6 +365,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -364,10 +394,10 @@ begin {
$mapping = @{
CreateExpanded = 'Az.HealthBot.private\New-AzHealthBot_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.HealthBot.private\New-AzHealthBot_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.HealthBot.private\New-AzHealthBot_CreateViaJsonString';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -381,6 +411,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -480,7 +513,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -557,6 +589,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -579,9 +620,7 @@ begin {
Delete = 'Az.HealthBot.private\Remove-AzHealthBot_Delete';
DeleteViaIdentity = 'Az.HealthBot.private\Remove-AzHealthBot_DeleteViaIdentity';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -595,6 +634,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -652,7 +694,7 @@ Update-AzHealthBot -InputObject $getHealth -Sku F0
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot
+Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -667,10 +709,12 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.healthbot/update-azhealthbot
#>
function Update-AzHealthBot {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Alias('BotName')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[System.String]
@@ -678,12 +722,16 @@ param(
${Name},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[System.String]
# The name of the Bot resource group in the user subscription.
${ResourceGroupName},
[Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath')]
+ [Parameter(ParameterSetName='UpdateViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -694,23 +742,36 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName])]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PSArgumentCompleterAttribute("F0", "S1", "C0")]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName]
+ [System.String]
# The name of the HealthBot SKU
${Sku},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotUpdateParametersTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotUpdateParametersTags]))]
[System.Collections.Hashtable]
# Tags for a HealthBot.
${Tag},
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -767,6 +828,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -788,10 +858,10 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.HealthBot.private\Update-AzHealthBot_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.HealthBot.private\Update-AzHealthBot_UpdateViaIdentityExpanded';
+ UpdateViaJsonFilePath = 'Az.HealthBot.private\Update-AzHealthBot_UpdateViaJsonFilePath';
+ UpdateViaJsonString = 'Az.HealthBot.private\Update-AzHealthBot_UpdateViaJsonString';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -805,6 +875,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/HealthBot/HealthBot.Autorest/exports/Remove-AzHealthBot.ps1 b/generated/HealthBot/HealthBot.Autorest/exports/Remove-AzHealthBot.ps1
index 508306885533..445e56b9aabd 100644
--- a/generated/HealthBot/HealthBot.Autorest/exports/Remove-AzHealthBot.ps1
+++ b/generated/HealthBot/HealthBot.Autorest/exports/Remove-AzHealthBot.ps1
@@ -70,7 +70,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -147,6 +146,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -169,9 +177,7 @@ begin {
Delete = 'Az.HealthBot.private\Remove-AzHealthBot_Delete';
DeleteViaIdentity = 'Az.HealthBot.private\Remove-AzHealthBot_DeleteViaIdentity';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -185,6 +191,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/HealthBot/HealthBot.Autorest/exports/Update-AzHealthBot.ps1 b/generated/HealthBot/HealthBot.Autorest/exports/Update-AzHealthBot.ps1
index ef877647778e..619039fd0a1e 100644
--- a/generated/HealthBot/HealthBot.Autorest/exports/Update-AzHealthBot.ps1
+++ b/generated/HealthBot/HealthBot.Autorest/exports/Update-AzHealthBot.ps1
@@ -28,7 +28,7 @@ Update-AzHealthBot -InputObject $getHealth -Sku F0
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot
+Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -43,10 +43,12 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.healthbot/update-azhealthbot
#>
function Update-AzHealthBot {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Alias('BotName')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[System.String]
@@ -54,12 +56,16 @@ param(
${Name},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[System.String]
# The name of the Bot resource group in the user subscription.
${ResourceGroupName},
[Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath')]
+ [Parameter(ParameterSetName='UpdateViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -70,23 +76,36 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName])]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PSArgumentCompleterAttribute("F0", "S1", "C0")]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName]
+ [System.String]
# The name of the HealthBot SKU
${Sku},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotUpdateParametersTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotUpdateParametersTags]))]
[System.Collections.Hashtable]
# Tags for a HealthBot.
${Tag},
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -143,6 +162,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -164,10 +192,10 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.HealthBot.private\Update-AzHealthBot_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.HealthBot.private\Update-AzHealthBot_UpdateViaIdentityExpanded';
+ UpdateViaJsonFilePath = 'Az.HealthBot.private\Update-AzHealthBot_UpdateViaJsonFilePath';
+ UpdateViaJsonString = 'Az.HealthBot.private\Update-AzHealthBot_UpdateViaJsonString';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -181,6 +209,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/HealthBot/HealthBot.Autorest/generate-info.json b/generated/HealthBot/HealthBot.Autorest/generate-info.json
index 6c9bf8bc4c3f..38fac4d1e6be 100644
--- a/generated/HealthBot/HealthBot.Autorest/generate-info.json
+++ b/generated/HealthBot/HealthBot.Autorest/generate-info.json
@@ -1,3 +1,3 @@
{
- "generate_Id": "7ec6008b-0bc9-4b6b-b9b9-43f5b0c804b2"
+ "generate_Id": "972c94ec-5075-4922-b820-f403c356763c"
}
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/Module.cs b/generated/HealthBot/HealthBot.Autorest/generated/Module.cs
index 75cabd8865ea..65bb3e3854cd 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/Module.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/Module.cs
@@ -28,12 +28,20 @@ public partial class Module
public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler();
+ private static bool _init = false;
+
+ private static readonly global::System.Object _initLock = new global::System.Object();
+
+ private static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Module _instance;
+
/// the ISendAsync pipeline instance
private Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.HttpPipeline _pipeline;
/// the ISendAsync pipeline instance (when proxy is enabled)
private Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.HttpPipeline _pipelineWithProxy;
+ private static readonly global::System.Object _singletonLock = new global::System.Object();
+
public bool _useProxy = false;
public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy();
@@ -56,11 +64,8 @@ public partial class Module
/// The delegate to get the telemetry info.
public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; }
- /// Backing field for property.
- private static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Module _instance;
-
/// the singleton of this module class
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Module());
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } }
/// The Name of this module
public string Name => @"Az.HealthBot";
@@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.HttpPipeline CreateP
/// Initialization steps performed after the module is loaded.
public void Init()
{
- OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
- OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
- CustomInit();
+ if (_init == false)
+ {
+ lock (_initLock) {
+ if (_init == false) {
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
+ CustomInit();
+ _init = true;
+ }
+ }
+ }
}
/// Creates the module instance.
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/HealthBot.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/HealthBot.cs
index 4f0e98433eb4..33d8f8780ba7 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/HealthBot.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/HealthBot.cs
@@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot
public partial class HealthBot
{
- /// Create a new HealthBot.
+ /// create a new HealthBot.
/// Azure Subscription ID.
/// The name of the Bot resource group in the user subscription.
/// The name of the Bot resource.
@@ -25,10 +25,11 @@ public partial class HealthBot
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsCreate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsCreate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
@@ -55,15 +56,15 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.BotsCreate_Call(request,onOk,onDefault,eventListener,sender);
+ await this.BotsCreate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Create a new HealthBot.
+ /// create a new HealthBot.
///
/// The parameters to provide for the created bot.
/// a delegate that is called when the remote service returns 200 (OK).
@@ -71,10 +72,11 @@ public partial class HealthBot
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
@@ -113,16 +115,76 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.BotsCreate_Call(request,onOk,onDefault,eventListener,sender);
+ await this.BotsCreate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
- /// the prepared HttpRequestMessage to send.
+ /// create a new HealthBot.
+ ///
+ /// The parameters to provide for the created bot.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// A that
+ /// will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot body, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeUpdate)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var botName = _match.Groups["botName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + botName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.BotsCreateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// create a new HealthBot.
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// Json string supplied to the BotsCreate operation
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
@@ -131,31 +193,164 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsCreateViaJsonString(string subscriptionId, string resourceGroupName, string botName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + global::System.Uri.EscapeDataString(botName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.BotsCreate_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// create a new HealthBot.
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// Json string supplied to the BotsCreate operation
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that
+ /// will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string botName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + global::System.Uri.EscapeDataString(botName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.BotsCreateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// create a new HealthBot.
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// The parameters to provide for the created bot.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// A that
+ /// will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsCreateWithResult(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot body, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeUpdate)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + global::System.Uri.EscapeDataString(botName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.BotsCreateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that
+ /// will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BotsCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
// declared final-state-via: azure-async-operation
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
-
- // get the delay before polling. (default to 30 seconds if not present)
- int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // start the delay timer (we'll await later...)
- var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
// while we wait, let's grab the headers and get ready to poll.
if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
@@ -164,62 +359,61 @@ public partial class HealthBot
if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
location = _response.GetFirstHeader(@"Location");
}
- var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get);
// and let's look at the current response body and see if we have some information we can give back to the listener
var content = await _response.Content.ReadAsStringAsync();
- await waiting;
-
- // check for cancellation
- if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // if we got back an OK, take a peek inside and see if it's done
- if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
- {
- var error = false;
- try {
- if( Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json)
- {
- var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
- if( state is null )
- {
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
- }
-
- switch( state?.ToString()?.ToLower() )
- {
- case "failed":
- error = true;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
break;
- case "succeeded":
- case "canceled":
- // we're done polling.
- break;
-
- default:
- // need to keep polling!
- _response.StatusCode = global::System.Net.HttpStatusCode.Created;
- continue;
- }
- }
- } catch {
- // if we run into a problem peeking into the result,
- // we really don't want to do anything special.
- }
- if (error) {
- throw new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.UndeclaredResponseException(_response);
- }
- }
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.UndeclaredResponseException(_response);
+ }
+ }
// check for terminal status code
if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
@@ -235,9 +429,770 @@ public partial class HealthBot
// make the final call
_response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
break;
}
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BotsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // declared final-state-via: azure-async-operation
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation events
+ /// back.
+ ///
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// The parameters to provide for the created bot.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BotsCreate_Validate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot body, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,2);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,64);
+ await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
+ await eventListener.AssertNotNull(nameof(botName),botName);
+ await eventListener.AssertMinimumLength(nameof(botName),botName,2);
+ await eventListener.AssertMaximumLength(nameof(botName),botName,64);
+ await eventListener.AssertRegEx(nameof(botName), botName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ /// Delete a HealthBot.
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsDelete(string subscriptionId, string resourceGroupName, string botName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + global::System.Uri.EscapeDataString(botName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.BotsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Delete a HealthBot.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var botName = _match.Groups["botName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + botName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.BotsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BotsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // declared final-state-via: default
+ var _finalUri = _response.GetFirstHeader(@"Location");
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ if (!string.IsNullOrWhiteSpace(_finalUri))
+ {
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response);
+ break;
+ }
+ case global::System.Net.HttpStatusCode.NoContent:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onNoContent(_response);
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation events
+ /// back.
+ ///
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BotsDelete_Validate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,2);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,64);
+ await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
+ await eventListener.AssertNotNull(nameof(botName),botName);
+ await eventListener.AssertMinimumLength(nameof(botName),botName,2);
+ await eventListener.AssertMaximumLength(nameof(botName),botName,64);
+ await eventListener.AssertRegEx(nameof(botName), botName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
+ }
+ }
+
+ /// Get a HealthBot.
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsGet(string subscriptionId, string resourceGroupName, string botName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + global::System.Uri.EscapeDataString(botName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.BotsGet_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Get a HealthBot.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var botName = _match.Groups["botName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + botName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.BotsGet_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Get a HealthBot.
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that
+ /// will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var botName = _match.Groups["botName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + botName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.BotsGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Get a HealthBot.
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that
+ /// will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsGetWithResult(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + global::System.Uri.EscapeDataString(botName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.BotsGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that
+ /// will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BotsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BotsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -245,13 +1200,13 @@ public partial class HealthBot
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -267,18 +1222,17 @@ public partial class HealthBot
}
///
- /// Validation method for method. Call this like the actual call, but you will get validation events
+ /// Validation method for method. Call this like the actual call, but you will get validation events
/// back.
///
/// Azure Subscription ID.
/// The name of the Bot resource group in the user subscription.
/// The name of the Bot resource.
- /// The parameters to provide for the created bot.
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsCreate_Validate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot body, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task BotsGet_Validate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -286,22 +1240,17 @@ public partial class HealthBot
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,2);
await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,64);
- await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
+ await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
await eventListener.AssertNotNull(nameof(botName),botName);
await eventListener.AssertMinimumLength(nameof(botName),botName,2);
await eventListener.AssertMaximumLength(nameof(botName),botName,64);
- await eventListener.AssertRegEx(nameof(botName),botName,@"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
- await eventListener.AssertNotNull(nameof(body), body);
- await eventListener.AssertObjectIsValid(nameof(body), body);
+ await eventListener.AssertRegEx(nameof(botName), botName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
}
}
- /// Delete a HealthBot.
+ /// Returns all the resources of a particular type belonging to a subscription.
/// Azure Subscription ID.
- /// The name of the Bot resource group in the user subscription.
- /// The name of the Bot resource.
/// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -309,7 +1258,7 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsDelete(string subscriptionId, string resourceGroupName, string botName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
@@ -319,10 +1268,7 @@ public partial class HealthBot
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
- + "/resourceGroups/"
- + global::System.Uri.EscapeDataString(resourceGroupName)
- + "/providers/Microsoft.HealthBot/healthBots/"
- + global::System.Uri.EscapeDataString(botName)
+ + "/providers/Microsoft.HealthBot/healthBots"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -331,19 +1277,19 @@ public partial class HealthBot
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Delete, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.BotsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ await this.BotsList_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Delete a HealthBot.
- ///
+ /// Returns all the resources of a particular type belonging to a resource group
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
/// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -351,32 +1297,19 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
-
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
- {
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}'");
- }
-
- // replace URI parameters with values from identity
- var subscriptionId = _match.Groups["subscriptionId"].Value;
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var botName = _match.Groups["botName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
- + resourceGroupName
- + "/providers/Microsoft.HealthBot/healthBots/"
- + botName
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HealthBot/healthBots"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -385,19 +1318,18 @@ public partial class HealthBot
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Delete, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.BotsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ await this.BotsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
- /// the prepared HttpRequestMessage to send.
+ /// Returns all the resources of a particular type belonging to a resource group
+ ///
/// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -405,204 +1337,30 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
- {
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- // this operation supports x-ms-long-running-operation
- var _originalUri = request.RequestUri.AbsoluteUri;
- // declared final-state-via: default
- var _finalUri = _response.GetFirstHeader(@"Location");
- var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
- var location = _response.GetFirstHeader(@"Location");
- while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
-
- // get the delay before polling. (default to 30 seconds if not present)
- int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // start the delay timer (we'll await later...)
- var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
-
- // while we wait, let's grab the headers and get ready to poll.
- if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
- asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
- }
- if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
- location = _response.GetFirstHeader(@"Location");
- }
- var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
- request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get);
-
- // and let's look at the current response body and see if we have some information we can give back to the listener
- var content = await _response.Content.ReadAsStringAsync();
- await waiting;
-
- // check for cancellation
- if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // drop the old response
- _response?.Dispose();
-
- // make the polling call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // if we got back an OK, take a peek inside and see if it's done
- if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
- {
- var error = false;
- try {
- if( Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json)
- {
- var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
- if( state is null )
- {
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
- }
-
- switch( state?.ToString()?.ToLower() )
- {
- case "failed":
- error = true;
- break;
- case "succeeded":
- case "canceled":
- // we're done polling.
- break;
-
- default:
- // need to keep polling!
- _response.StatusCode = global::System.Net.HttpStatusCode.Created;
- continue;
- }
- }
- } catch {
- // if we run into a problem peeking into the result,
- // we really don't want to do anything special.
- }
- if (error) {
- throw new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.UndeclaredResponseException(_response);
- }
- }
-
- // check for terminal status code
- if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
- continue;
- }
- // we are done polling, do a request on final target?
- if (!string.IsNullOrWhiteSpace(_finalUri))
- {
- // create a new request with the final uri
- request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get);
-
- // drop the old response
- _response?.Dispose();
-
- // make the final call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- break;
- }
- }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
+ // verify that Identity format is an exact match for uri
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response);
- break;
- }
- case global::System.Net.HttpStatusCode.NoContent:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onNoContent(_response);
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
- }
- finally
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
{
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots'");
}
- }
- }
-
- ///
- /// Validation method for method. Call this like the actual call, but you will get validation events
- /// back.
- ///
- /// Azure Subscription ID.
- /// The name of the Bot resource group in the user subscription.
- /// The name of the Bot resource.
- /// an instance that will receive events.
- ///
- /// A that will be complete when handling of the response is completed.
- ///
- internal async global::System.Threading.Tasks.Task BotsDelete_Validate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
- {
- using( NoSynchronizationContext )
- {
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,2);
- await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,64);
- await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
- await eventListener.AssertNotNull(nameof(botName),botName);
- await eventListener.AssertMinimumLength(nameof(botName),botName,2);
- await eventListener.AssertMaximumLength(nameof(botName),botName,64);
- await eventListener.AssertRegEx(nameof(botName),botName,@"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
- }
- }
- /// Get a HealthBot.
- /// Azure Subscription ID.
- /// The name of the Bot resource group in the user subscription.
- /// The name of the Bot resource.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
- /// an instance that will receive events.
- /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
- ///
- /// A that will be complete when handling of the response is completed.
- ///
- public async global::System.Threading.Tasks.Task BotsGet(string subscriptionId, string resourceGroupName, string botName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
- {
- var apiVersion = @"2020-12-08";
- // Constant Parameters
- using( NoSynchronizationContext )
- {
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + global::System.Uri.EscapeDataString(subscriptionId)
+ + subscriptionId
+ "/resourceGroups/"
- + global::System.Uri.EscapeDataString(resourceGroupName)
- + "/providers/Microsoft.HealthBot/healthBots/"
- + global::System.Uri.EscapeDataString(botName)
+ + resourceGroupName
+ + "/providers/Microsoft.HealthBot/healthBots"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -616,21 +1374,19 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.BotsGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.BotsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Get a HealthBot.
+ /// Returns all the resources of a particular type belonging to a resource group
///
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
@@ -638,42 +1394,139 @@ public partial class HealthBot
{
// verify that Identity format is an exact match for uri
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
if (!_match.Success)
{
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}'");
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots'");
}
// replace URI parameters with values from identity
var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var botName = _match.Groups["botName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
- + "/providers/Microsoft.HealthBot/healthBots/"
- + botName
+ + "/providers/Microsoft.HealthBot/healthBots"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.BotsListByResourceGroupWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Returns all the resources of a particular type belonging to a resource group
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HealthBot/healthBots"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.BotsGet_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.BotsListByResourceGroupWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BotsListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.BotResponseList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -683,7 +1536,7 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task BotsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -694,6 +1547,7 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -701,13 +1555,13 @@ public partial class HealthBot
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.BotResponseList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -723,17 +1577,16 @@ public partial class HealthBot
}
///
- /// Validation method for method. Call this like the actual call, but you will get validation events
- /// back.
+ /// Validation method for method. Call this like the actual call, but you will get
+ /// validation events back.
///
/// Azure Subscription ID.
/// The name of the Bot resource group in the user subscription.
- /// The name of the Bot resource.
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsGet_Validate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task BotsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -741,16 +1594,12 @@ public partial class HealthBot
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,2);
await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,64);
- await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
- await eventListener.AssertNotNull(nameof(botName),botName);
- await eventListener.AssertMinimumLength(nameof(botName),botName,2);
- await eventListener.AssertMaximumLength(nameof(botName),botName,64);
- await eventListener.AssertRegEx(nameof(botName),botName,@"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
+ await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
}
}
/// Returns all the resources of a particular type belonging to a subscription.
- /// Azure Subscription ID.
+ ///
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
@@ -759,16 +1608,26 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
using( NoSynchronizationContext )
{
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.HealthBot/healthBots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/healthBots'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + global::System.Uri.EscapeDataString(subscriptionId)
+ + subscriptionId
+ "/providers/Microsoft.HealthBot/healthBots"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
@@ -783,103 +1642,153 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.BotsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.BotsList_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Returns all the resources of a particular type belonging to a resource group
- /// The name of the Bot resource group in the user subscription.
- /// Azure Subscription ID.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Returns all the resources of a particular type belonging to a subscription.
+ ///
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsListByResourceGroup(string resourceGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
using( NoSynchronizationContext )
{
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.HealthBot/healthBots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/healthBots'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + global::System.Uri.EscapeDataString(subscriptionId)
- + "/resourceGroups/"
- + global::System.Uri.EscapeDataString(resourceGroupName)
+ + subscriptionId
+ "/providers/Microsoft.HealthBot/healthBots"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.BotsListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.BotsListWithResult_Call (request, eventListener,sender);
}
}
- /// Returns all the resources of a particular type belonging to a resource group
- ///
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Returns all the resources of a particular type belonging to a subscription.
+ /// Azure Subscription ID.
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
-
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
- {
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots'");
- }
-
- // replace URI parameters with values from identity
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
- + "/resourceGroups/"
- + resourceGroupName
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ "/providers/Microsoft.HealthBot/healthBots"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.BotsListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.BotsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BotsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.BotResponseList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -889,7 +1798,7 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task BotsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -900,6 +1809,7 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -907,13 +1817,13 @@ public partial class HealthBot
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.BotResponseList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.BotResponseList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -929,58 +1839,51 @@ public partial class HealthBot
}
///
- /// Validation method for method. Call this like the actual call, but you will get
- /// validation events back.
+ /// Validation method for method. Call this like the actual call, but you will get validation events
+ /// back.
///
- /// The name of the Bot resource group in the user subscription.
/// Azure Subscription ID.
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsListByResourceGroup_Validate(string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task BotsList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,2);
- await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,64);
- await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
}
}
- /// Returns all the resources of a particular type belonging to a subscription.
- ///
+ /// Patch a HealthBot.
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// The parameters to provide for the required bot.
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 201 (Created).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsUpdate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
-
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.HealthBot/healthBots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
- {
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/healthBots'");
- }
-
- // replace URI parameters with values from identity
- var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
- + "/providers/Microsoft.HealthBot/healthBots"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + global::System.Uri.EscapeDataString(botName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -989,78 +1892,133 @@ public partial class HealthBot
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Patch, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.BotsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.BotsUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
- /// the prepared HttpRequestMessage to send.
+ /// Patch a HealthBot.
+ ///
+ /// The parameters to provide for the required bot.
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 201 (Created).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeUpdate)
{
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
- {
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
+ // verify that Identity format is an exact match for uri
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.BotResponseList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
- }
- finally
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
{
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}'");
}
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var botName = _match.Groups["botName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + botName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.BotsUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender);
}
}
- ///
- /// Validation method for method. Call this like the actual call, but you will get validation events
- /// back.
- ///
- /// Azure Subscription ID.
+ /// Patch a HealthBot.
+ ///
+ /// The parameters to provide for the required bot.
/// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
- /// A that will be complete when handling of the response is completed.
+ /// A that
+ /// will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
+ public async global::System.Threading.Tasks.Task BotsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeUpdate)
{
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var botName = _match.Groups["botName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + botName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.BotsUpdateWithResult_Call (request, eventListener,sender);
}
}
@@ -1068,7 +2026,7 @@ public partial class HealthBot
/// Azure Subscription ID.
/// The name of the Bot resource group in the user subscription.
/// The name of the Bot resource.
- /// The parameters to provide for the required bot.
+ /// Json string supplied to the BotsUpdate operation
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns 201 (Created).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -1078,7 +2036,7 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsUpdate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string botName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
@@ -1105,74 +2063,174 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.BotsUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender);
+ await this.BotsUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender);
}
}
/// Patch a HealthBot.
- ///
- /// The parameters to provide for the required bot.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 201 (Created).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// Json string supplied to the BotsUpdate operation
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that
+ /// will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BotsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BotsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string botName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HealthBot/healthBots/"
+ + global::System.Uri.EscapeDataString(botName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HealthBot/healthBots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
- {
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}'");
- }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- // replace URI parameters with values from identity
- var subscriptionId = _match.Groups["subscriptionId"].Value;
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var botName = _match.Groups["botName"].Value;
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.BotsUpdateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Patch a HealthBot.
+ /// Azure Subscription ID.
+ /// The name of the Bot resource group in the user subscription.
+ /// The name of the Bot resource.
+ /// The parameters to provide for the required bot.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// A that
+ /// will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task BotsUpdateWithResult(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeUpdate)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
- + resourceGroupName
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.HealthBot/healthBots/"
- + botName
+ + global::System.Uri.EscapeDataString(botName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.BotsUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender);
+ return await this.BotsUpdateWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that
+ /// will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task BotsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ case global::System.Net.HttpStatusCode.Created:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns 201 (Created).
@@ -1183,7 +2241,7 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task BotsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -1194,6 +2252,7 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1201,19 +2260,19 @@ public partial class HealthBot
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
case global::System.Net.HttpStatusCode.Created:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -1240,7 +2299,7 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BotsUpdate_Validate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task BotsUpdate_Validate(string subscriptionId, string resourceGroupName, string botName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -1248,11 +2307,11 @@ public partial class HealthBot
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,2);
await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,64);
- await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
+ await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
await eventListener.AssertNotNull(nameof(botName),botName);
await eventListener.AssertMinimumLength(nameof(botName),botName,2);
await eventListener.AssertMaximumLength(nameof(botName),botName,64);
- await eventListener.AssertRegEx(nameof(botName),botName,@"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
+ await eventListener.AssertRegEx(nameof(botName), botName, @"^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
await eventListener.AssertNotNull(nameof(body), body);
await eventListener.AssertObjectIsValid(nameof(body), body);
}
@@ -1267,7 +2326,7 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
@@ -1289,7 +2348,7 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender);
}
}
@@ -1303,7 +2362,7 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
var apiVersion = @"2020-12-08";
// Constant Parameters
@@ -1334,11 +2393,147 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Lists all the available HealthBot operations.
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.HealthBot/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.HealthBot/operations'");
+ }
+
+ // replace URI parameters with values from identity
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.HealthBot/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.OperationsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Lists all the available HealthBot operations.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-12-08";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.HealthBot/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.OperationsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.AvailableOperations.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -1348,7 +2543,7 @@ public partial class HealthBot
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -1359,6 +2554,7 @@ public partial class HealthBot
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1366,13 +2562,13 @@ public partial class HealthBot
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.AvailableOperations.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.AvailableOperations.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.PowerShell.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.PowerShell.cs
index b98cbf8dd5ed..9324ca653926 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.PowerShell.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.PowerShell.cs
@@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PowerShell;
- /// Any object
+ /// Anything
[System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))]
public partial class Any
{
@@ -54,6 +54,14 @@ public partial class Any
partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
///
/// Deserializes a into a new instance of .
@@ -125,8 +133,20 @@ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAny Deseriali
/// a containing this model serialized to JSON text.
public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
}
- /// Any object
+ /// Anything
[System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))]
public partial interface IAny
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.cs
index 3277c22f5f65..cdb8dc64e9a7 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.cs
@@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Extensions;
- /// Any object
+ /// Anything
public partial class Any :
Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAny,
Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAnyInternal
@@ -19,13 +19,13 @@ public Any()
}
}
- /// Any object
+ /// Anything
public partial interface IAny :
Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IJsonSerializable
{
}
- /// Any object
+ /// Anything
internal partial interface IAnyInternal
{
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.json.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.json.cs
index 36d59db89578..0d6fc5ea4367 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.json.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Any.json.cs
@@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Extensions;
- /// Any object
+ /// Anything
public partial class Any
{
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/HealthBot.PowerShell.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/HealthBot.PowerShell.cs
deleted file mode 100644
index 71f4ea5172be..000000000000
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/HealthBot.PowerShell.cs
+++ /dev/null
@@ -1,272 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
-{
- using Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PowerShell;
-
- /// HealthBot resource definition
- [System.ComponentModel.TypeConverter(typeof(HealthBotTypeConverter))]
- public partial class HealthBot
- {
-
- ///
- /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
- /// object before it is returned. Implement this method in a partial class to enable this behavior
- ///
- /// The global::System.Collections.IDictionary content that should be used.
-
- partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
-
- ///
- /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
- /// before it is returned. Implement this method in a partial class to enable this behavior
- ///
- /// The global::System.Management.Automation.PSObject content that should be used.
-
- partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
-
- ///
- /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
- /// of the object before it is deserialized.
- /// If you wish to disable the default deserialization entirely, return true in the output
- /// parameter.
- /// Implement this method in a partial class to enable this behavior.
- ///
- /// The global::System.Collections.IDictionary content that should be used.
- /// Determines if the rest of the serialization should be processed, or if the method should return
- /// instantly.
-
- partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
-
- ///
- /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
- /// of the object before it is deserialized.
- /// If you wish to disable the default deserialization entirely, return true in the output
- /// parameter.
- /// Implement this method in a partial class to enable this behavior.
- ///
- /// The global::System.Management.Automation.PSObject content that should be used.
- /// Determines if the rest of the serialization should be processed, or if the method should return
- /// instantly.
-
- partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
-
- ///
- /// Deserializes a into an instance of .
- ///
- /// The global::System.Collections.IDictionary content that should be used.
- ///
- /// an instance of .
- ///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot DeserializeFromDictionary(global::System.Collections.IDictionary content)
- {
- return new HealthBot(content);
- }
-
- ///
- /// Deserializes a into an instance of .
- ///
- /// The global::System.Management.Automation.PSObject content that should be used.
- ///
- /// an instance of .
- ///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
- {
- return new HealthBot(content);
- }
-
- ///
- /// Creates a new instance of , deserializing the content from a json string.
- ///
- /// a string containing a JSON serialized instance of this model.
- /// an instance of the model class.
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(jsonText));
-
- ///
- /// Deserializes a into a new instance of .
- ///
- /// The global::System.Collections.IDictionary content that should be used.
- internal HealthBot(global::System.Collections.IDictionary content)
- {
- bool returnNow = false;
- BeforeDeserializeDictionary(content, ref returnNow);
- if (returnNow)
- {
- return;
- }
- // actually deserialize
- if (content.Contains("Sku"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.SkuTypeConverter.ConvertFrom);
- }
- if (content.Contains("Property"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBotPropertiesTypeConverter.ConvertFrom);
- }
- if (content.Contains("SystemDataCreatedBy"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
- }
- if (content.Contains("SystemDataCreatedAt"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
- }
- if (content.Contains("SystemDataCreatedByType"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.IdentityType.CreateFrom);
- }
- if (content.Contains("SystemDataLastModifiedBy"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
- }
- if (content.Contains("SystemDataLastModifiedByType"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.IdentityType.CreateFrom);
- }
- if (content.Contains("SystemDataLastModifiedAt"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
- }
- if (content.Contains("SystemData"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.SystemDataTypeConverter.ConvertFrom);
- }
- if (content.Contains("Id"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Id, global::System.Convert.ToString);
- }
- if (content.Contains("Name"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Name, global::System.Convert.ToString);
- }
- if (content.Contains("Type"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Type, global::System.Convert.ToString);
- }
- if (content.Contains("Tag"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.TrackedResourceTagsTypeConverter.ConvertFrom);
- }
- if (content.Contains("Location"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
- }
- if (content.Contains("SkuName"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName.CreateFrom);
- }
- if (content.Contains("ProvisioningState"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).ProvisioningState, global::System.Convert.ToString);
- }
- if (content.Contains("BotManagementPortalLink"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).BotManagementPortalLink = (string) content.GetValueForProperty("BotManagementPortalLink",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).BotManagementPortalLink, global::System.Convert.ToString);
- }
- AfterDeserializeDictionary(content);
- }
-
- ///
- /// Deserializes a into a new instance of .
- ///
- /// The global::System.Management.Automation.PSObject content that should be used.
- internal HealthBot(global::System.Management.Automation.PSObject content)
- {
- bool returnNow = false;
- BeforeDeserializePSObject(content, ref returnNow);
- if (returnNow)
- {
- return;
- }
- // actually deserialize
- if (content.Contains("Sku"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.SkuTypeConverter.ConvertFrom);
- }
- if (content.Contains("Property"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBotPropertiesTypeConverter.ConvertFrom);
- }
- if (content.Contains("SystemDataCreatedBy"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
- }
- if (content.Contains("SystemDataCreatedAt"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
- }
- if (content.Contains("SystemDataCreatedByType"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.IdentityType.CreateFrom);
- }
- if (content.Contains("SystemDataLastModifiedBy"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
- }
- if (content.Contains("SystemDataLastModifiedByType"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.IdentityType.CreateFrom);
- }
- if (content.Contains("SystemDataLastModifiedAt"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
- }
- if (content.Contains("SystemData"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.SystemDataTypeConverter.ConvertFrom);
- }
- if (content.Contains("Id"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Id, global::System.Convert.ToString);
- }
- if (content.Contains("Name"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Name, global::System.Convert.ToString);
- }
- if (content.Contains("Type"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IResourceInternal)this).Type, global::System.Convert.ToString);
- }
- if (content.Contains("Tag"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.TrackedResourceTagsTypeConverter.ConvertFrom);
- }
- if (content.Contains("Location"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
- }
- if (content.Contains("SkuName"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName.CreateFrom);
- }
- if (content.Contains("ProvisioningState"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).ProvisioningState, global::System.Convert.ToString);
- }
- if (content.Contains("BotManagementPortalLink"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).BotManagementPortalLink = (string) content.GetValueForProperty("BotManagementPortalLink",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBotInternal)this).BotManagementPortalLink, global::System.Convert.ToString);
- }
- AfterDeserializePSObject(content);
- }
-
- /// Serializes this instance to a json string.
-
- /// a containing this model serialized to JSON text.
- public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeAll)?.ToString();
- }
- /// HealthBot resource definition
- [System.ComponentModel.TypeConverter(typeof(HealthBotTypeConverter))]
- public partial interface IHealthBot
-
- {
-
- }
-}
\ No newline at end of file
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.PowerShell.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.PowerShell.cs
similarity index 70%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.PowerShell.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.PowerShell.cs
index ffb373b1fff7..982aea793f66 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.PowerShell.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.PowerShell.cs
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PowerShell;
@@ -55,7 +55,15 @@ public partial class AvailableOperations
partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
///
- /// Deserializes a into a new instance of OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
///
/// The global::System.Collections.IDictionary content that should be used.
@@ -70,17 +78,17 @@ internal AvailableOperations(global::System.Collections.IDictionary content)
// actually deserialize
if (content.Contains("Value"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperationsInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IOperationDetail[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperationsInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.OperationDetailTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperationsInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperationsInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.OperationDetailTypeConverter.ConvertFrom));
}
if (content.Contains("NextLink"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperationsInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperationsInternal)this).NextLink, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperationsInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperationsInternal)this).NextLink, global::System.Convert.ToString);
}
AfterDeserializeDictionary(content);
}
///
- /// Deserializes a into a new instance of into a new instance of .
///
/// The global::System.Management.Automation.PSObject content that should be used.
@@ -95,37 +103,37 @@ internal AvailableOperations(global::System.Management.Automation.PSObject conte
// actually deserialize
if (content.Contains("Value"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperationsInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IOperationDetail[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperationsInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.OperationDetailTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperationsInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperationsInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.OperationDetailTypeConverter.ConvertFrom));
}
if (content.Contains("NextLink"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperationsInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperationsInternal)this).NextLink, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperationsInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperationsInternal)this).NextLink, global::System.Convert.ToString);
}
AfterDeserializePSObject(content);
}
///
- /// Deserializes a into an instance of into an instance of .
///
/// The global::System.Collections.IDictionary content that should be used.
///
- /// an instance of .
+ /// an instance of .
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperations DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperations DeserializeFromDictionary(global::System.Collections.IDictionary content)
{
return new AvailableOperations(content);
}
///
- /// Deserializes a into an instance of into an instance of .
///
/// The global::System.Management.Automation.PSObject content that should be used.
///
- /// an instance of .
+ /// an instance of .
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperations DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperations DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
{
return new AvailableOperations(content);
}
@@ -135,12 +143,24 @@ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IA
///
/// a string containing a JSON serialized instance of this model.
/// an instance of the model class.
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(jsonText));
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(jsonText));
/// Serializes this instance to a json string.
/// a containing this model serialized to JSON text.
public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
}
/// Available operations of the service
[System.ComponentModel.TypeConverter(typeof(AvailableOperationsTypeConverter))]
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.TypeConverter.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.TypeConverter.cs
similarity index 97%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.TypeConverter.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.TypeConverter.cs
index 933316b9ee9d..730f133a9011 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.TypeConverter.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.TypeConverter.cs
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PowerShell;
@@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue)
///
/// an instance of , or null if there is no suitable conversion.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperations ConvertFrom(dynamic sourceValue)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperations ConvertFrom(dynamic sourceValue)
{
if (null == sourceValue)
{
return null;
}
global::System.Type type = sourceValue.GetType();
- if (typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperations).IsAssignableFrom(type))
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperations).IsAssignableFrom(type))
{
return sourceValue;
}
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.cs
similarity index 75%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.cs
index 68b629125c4b..f7a6ec60826b 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.cs
@@ -3,14 +3,14 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Extensions;
/// Available operations of the service
public partial class AvailableOperations :
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperations,
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperationsInternal
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperations,
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperationsInternal
{
/// Backing field for property.
@@ -24,11 +24,11 @@ public partial class AvailableOperations :
public string NextLink { get => this._nextLink; set => this._nextLink = value; }
/// Backing field for property.
- private Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IOperationDetail[] _value;
+ private System.Collections.Generic.List _value;
/// Collection of available operation details
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Owned)]
- public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IOperationDetail[] Value { get => this._value; set => this._value = value; }
+ public System.Collections.Generic.List Value { get => this._value; set => this._value = value; }
/// Creates an new instance.
public AvailableOperations()
@@ -47,6 +47,9 @@ public partial interface IAvailableOperations :
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"URL client should use to fetch the next page (per server side paging).
It's null for now, added for future use.",
SerializedName = @"nextLink",
@@ -56,10 +59,13 @@ public partial interface IAvailableOperations :
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"Collection of available operation details",
SerializedName = @"value",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IOperationDetail) })]
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IOperationDetail[] Value { get; set; }
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IOperationDetail) })]
+ System.Collections.Generic.List Value { get; set; }
}
/// Available operations of the service
@@ -72,7 +78,7 @@ internal partial interface IAvailableOperationsInternal
///
string NextLink { get; set; }
/// Collection of available operation details
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IOperationDetail[] Value { get; set; }
+ System.Collections.Generic.List Value { get; set; }
}
}
\ No newline at end of file
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.json.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.json.cs
similarity index 90%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.json.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.json.cs
index ce9714ebbf4c..cbf9568f4039 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/AvailableOperations.json.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/AvailableOperations.json.cs
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Extensions;
@@ -65,19 +65,19 @@ internal AvailableOperations(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtim
{
return;
}
- {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IOperationDetail) (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.OperationDetail.FromJson(__u) )) ))() : null : Value;}
- {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IOperationDetail) (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.OperationDetail.FromJson(__u) )) ))() : null : _value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;}
AfterFromJson(json);
}
///
- /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperations.
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperations.
///
/// a to deserialize from.
///
- /// an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperations.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperations.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IAvailableOperations FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode node)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IAvailableOperations FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode node)
{
return node is Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json ? new AvailableOperations(json) : null;
}
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.PowerShell.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.PowerShell.cs
similarity index 70%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.PowerShell.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.PowerShell.cs
index 41a5fcb720aa..6d6e2134659f 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.PowerShell.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.PowerShell.cs
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PowerShell;
@@ -55,7 +55,15 @@ public partial class BotResponseList
partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
///
- /// Deserializes a into a new instance of OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
///
/// The global::System.Collections.IDictionary content that should be used.
@@ -70,17 +78,17 @@ internal BotResponseList(global::System.Collections.IDictionary content)
// actually deserialize
if (content.Contains("NextLink"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal)this).NextLink, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal)this).NextLink, global::System.Convert.ToString);
}
if (content.Contains("Value"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBotTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBotTypeConverter.ConvertFrom));
}
AfterDeserializeDictionary(content);
}
///
- /// Deserializes a into a new instance of into a new instance of .
///
/// The global::System.Management.Automation.PSObject content that should be used.
@@ -95,37 +103,37 @@ internal BotResponseList(global::System.Management.Automation.PSObject content)
// actually deserialize
if (content.Contains("NextLink"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal)this).NextLink, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal)this).NextLink, global::System.Convert.ToString);
}
if (content.Contains("Value"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBotTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBotTypeConverter.ConvertFrom));
}
AfterDeserializePSObject(content);
}
///
- /// Deserializes a into an instance of into an instance of .
///
/// The global::System.Collections.IDictionary content that should be used.
///
- /// an instance of .
+ /// an instance of .
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseList DeserializeFromDictionary(global::System.Collections.IDictionary content)
{
return new BotResponseList(content);
}
///
- /// Deserializes a into an instance of into an instance of .
///
/// The global::System.Management.Automation.PSObject content that should be used.
///
- /// an instance of .
+ /// an instance of .
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
{
return new BotResponseList(content);
}
@@ -135,12 +143,24 @@ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IB
///
/// a string containing a JSON serialized instance of this model.
/// an instance of the model class.
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(jsonText));
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(jsonText));
/// Serializes this instance to a json string.
/// a containing this model serialized to JSON text.
public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
}
/// The list of Healthbot operation response.
[System.ComponentModel.TypeConverter(typeof(BotResponseListTypeConverter))]
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.TypeConverter.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.TypeConverter.cs
similarity index 97%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.TypeConverter.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.TypeConverter.cs
index 233169398ee5..2d43c6294f9c 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.TypeConverter.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.TypeConverter.cs
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PowerShell;
@@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue)
///
/// an instance of , or null if there is no suitable conversion.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseList ConvertFrom(dynamic sourceValue)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseList ConvertFrom(dynamic sourceValue)
{
if (null == sourceValue)
{
return null;
}
global::System.Type type = sourceValue.GetType();
- if (typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseList).IsAssignableFrom(type))
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseList).IsAssignableFrom(type))
{
return sourceValue;
}
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.cs
similarity index 69%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.cs
index 9c55d3c869e8..ef963389ef28 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.cs
@@ -3,21 +3,21 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Extensions;
/// The list of Healthbot operation response.
public partial class BotResponseList :
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseList,
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseList,
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal
{
/// Internal Acessors for NextLink
- string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } }
+ string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } }
/// Internal Acessors for Value
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot[] Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseListInternal.Value { get => this._value; set { {_value = value;} } }
+ System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseListInternal.Value { get => this._value; set { {_value = value;} } }
/// Backing field for property.
private string _nextLink;
@@ -27,11 +27,11 @@ public partial class BotResponseList :
public string NextLink { get => this._nextLink; }
/// Backing field for property.
- private Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot[] _value;
+ private System.Collections.Generic.List _value;
/// Gets the list of Healthbot results and their properties.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Owned)]
- public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot[] Value { get => this._value; }
+ public System.Collections.Generic.List Value { get => this._value; }
/// Creates an new instance.
public BotResponseList()
@@ -47,6 +47,9 @@ public partial interface IBotResponseList :
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The link used to get the next page of bot service resources.",
SerializedName = @"nextLink",
PossibleTypes = new [] { typeof(string) })]
@@ -55,10 +58,13 @@ public partial interface IBotResponseList :
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"Gets the list of Healthbot results and their properties.",
SerializedName = @"value",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot) })]
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot[] Value { get; }
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot) })]
+ System.Collections.Generic.List Value { get; }
}
/// The list of Healthbot operation response.
@@ -68,7 +74,7 @@ internal partial interface IBotResponseListInternal
/// The link used to get the next page of bot service resources.
string NextLink { get; set; }
/// Gets the list of Healthbot results and their properties.
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot[] Value { get; set; }
+ System.Collections.Generic.List Value { get; set; }
}
}
\ No newline at end of file
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.json.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.json.cs
similarity index 89%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.json.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.json.cs
index 4602fc53d51f..68706de3bda2 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/BotResponseList.json.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/BotResponseList.json.cs
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Extensions;
@@ -65,19 +65,19 @@ internal BotResponseList(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Js
{
return;
}
- {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
- {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot) (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.HealthBot.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;}
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot) (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.HealthBot.FromJson(__u) )) ))() : null : _value;}
AfterFromJson(json);
}
///
- /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseList.
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseList.
///
/// a to deserialize from.
///
- /// an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseList.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseList.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IBotResponseList FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode node)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IBotResponseList FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode node)
{
return node is Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json ? new BotResponseList(json) : null;
}
@@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode ToJson
{
return container;
}
- if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly))
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeRead))
{
AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
}
- if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeReadOnly))
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeRead))
{
if (null != this._value)
{
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.PowerShell.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.PowerShell.cs
similarity index 61%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.PowerShell.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.PowerShell.cs
index 24283b8d6568..b96a92dcb037 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.PowerShell.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.PowerShell.cs
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PowerShell;
@@ -55,33 +55,41 @@ public partial class Error
partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
///
- /// Deserializes a into an instance of OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
///
/// The global::System.Collections.IDictionary content that should be used.
///
- /// an instance of .
+ /// an instance of .
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError DeserializeFromDictionary(global::System.Collections.IDictionary content)
{
return new Error(content);
}
///
- /// Deserializes a into an instance of into an instance of .
///
/// The global::System.Management.Automation.PSObject content that should be used.
///
- /// an instance of .
+ /// an instance of .
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
{
return new Error(content);
}
///
- /// Deserializes a into a new instance of into a new instance of .
///
/// The global::System.Collections.IDictionary content that should be used.
@@ -96,33 +104,33 @@ internal Error(global::System.Collections.IDictionary content)
// actually deserialize
if (content.Contains("Error1"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Error1 = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated) content.GetValueForProperty("Error1",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Error1, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAutoGeneratedTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Error1 = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1) content.GetValueForProperty("Error1",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Error1, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error1TypeConverter.ConvertFrom);
}
if (content.Contains("Code"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Code, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Code, global::System.Convert.ToString);
}
if (content.Contains("Message"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Message, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Message, global::System.Convert.ToString);
}
if (content.Contains("Target"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Target, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Target, global::System.Convert.ToString);
}
if (content.Contains("Detail"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ErrorTypeConverter.ConvertFrom));
}
if (content.Contains("AdditionalInfo"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom));
}
AfterDeserializeDictionary(content);
}
///
- /// Deserializes a into a new instance of into a new instance of .
///
/// The global::System.Management.Automation.PSObject content that should be used.
@@ -137,27 +145,27 @@ internal Error(global::System.Management.Automation.PSObject content)
// actually deserialize
if (content.Contains("Error1"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Error1 = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated) content.GetValueForProperty("Error1",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Error1, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAutoGeneratedTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Error1 = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1) content.GetValueForProperty("Error1",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Error1, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error1TypeConverter.ConvertFrom);
}
if (content.Contains("Code"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Code, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Code, global::System.Convert.ToString);
}
if (content.Contains("Message"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Message, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Message, global::System.Convert.ToString);
}
if (content.Contains("Target"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Target, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Target, global::System.Convert.ToString);
}
if (content.Contains("Detail"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ErrorTypeConverter.ConvertFrom));
}
if (content.Contains("AdditionalInfo"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom));
}
AfterDeserializePSObject(content);
}
@@ -167,12 +175,24 @@ internal Error(global::System.Management.Automation.PSObject content)
///
/// a string containing a JSON serialized instance of this model.
/// an instance of the model class.
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(jsonText));
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(jsonText));
/// Serializes this instance to a json string.
/// a containing this model serialized to JSON text.
public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
}
/// The resource management error response.
[System.ComponentModel.TypeConverter(typeof(ErrorTypeConverter))]
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.TypeConverter.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.TypeConverter.cs
similarity index 97%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.TypeConverter.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.TypeConverter.cs
index 5105c7d4ef6d..4cd5afb026f8 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.TypeConverter.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.TypeConverter.cs
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PowerShell;
@@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue)
///
/// an instance of , or null if there is no suitable conversion.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError ConvertFrom(dynamic sourceValue)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError ConvertFrom(dynamic sourceValue)
{
if (null == sourceValue)
{
return null;
}
global::System.Type type = sourceValue.GetType();
- if (typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError).IsAssignableFrom(type))
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError).IsAssignableFrom(type))
{
return sourceValue;
}
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.cs
similarity index 56%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.cs
index effb333ec0e9..ef6975b2c6fa 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.cs
@@ -3,60 +3,60 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Extensions;
/// The resource management error response.
public partial class Error :
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError,
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError,
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal
{
/// The error additional info.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).AdditionalInfo; }
+ public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).AdditionalInfo; }
/// The error code.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Inlined)]
- public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Code; }
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Code; }
/// The error details.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Inlined)]
- public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Detail; }
+ public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Detail; }
/// Backing field for property.
- private Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated _error1;
+ private Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1 _error1;
/// The error object.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Owned)]
- internal Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated Error1 { get => (this._error1 = this._error1 ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAutoGenerated()); set => this._error1 = value; }
+ internal Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1 Error1 { get => (this._error1 = this._error1 ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error1()); set => this._error1 = value; }
/// The error message.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Inlined)]
- public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Message; }
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Message; }
/// Internal Acessors for AdditionalInfo
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).AdditionalInfo = value; }
+ System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).AdditionalInfo = value; }
/// Internal Acessors for Code
- string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Code = value; }
+ string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Code = value; }
/// Internal Acessors for Detail
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[] Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Detail = value; }
+ System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Detail = value; }
/// Internal Acessors for Error1
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal.Error1 { get => (this._error1 = this._error1 ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAutoGenerated()); set { {_error1 = value;} } }
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1 Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal.Error1 { get => (this._error1 = this._error1 ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error1()); set { {_error1 = value;} } }
/// Internal Acessors for Message
- string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Message = value; }
+ string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Message = value; }
/// Internal Acessors for Target
- string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Target = value; }
+ string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Target = value; }
/// The error target.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Inlined)]
- public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)Error1).Target; }
+ public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)Error1).Target; }
/// Creates an new instance.
public Error()
@@ -72,14 +72,20 @@ public partial interface IError :
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The error additional info.",
SerializedName = @"additionalInfo",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo) })]
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[] AdditionalInfo { get; }
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorAdditionalInfo) })]
+ System.Collections.Generic.List AdditionalInfo { get; }
/// The error code.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The error code.",
SerializedName = @"code",
PossibleTypes = new [] { typeof(string) })]
@@ -88,14 +94,20 @@ public partial interface IError :
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The error details.",
SerializedName = @"details",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError) })]
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[] Detail { get; }
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError) })]
+ System.Collections.Generic.List Detail { get; }
/// The error message.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The error message.",
SerializedName = @"message",
PossibleTypes = new [] { typeof(string) })]
@@ -104,6 +116,9 @@ public partial interface IError :
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The error target.",
SerializedName = @"target",
PossibleTypes = new [] { typeof(string) })]
@@ -115,13 +130,13 @@ internal partial interface IErrorInternal
{
/// The error additional info.
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[] AdditionalInfo { get; set; }
+ System.Collections.Generic.List AdditionalInfo { get; set; }
/// The error code.
string Code { get; set; }
/// The error details.
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[] Detail { get; set; }
+ System.Collections.Generic.List Detail { get; set; }
/// The error object.
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated Error1 { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1 Error1 { get; set; }
/// The error message.
string Message { get; set; }
/// The error target.
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.json.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.json.cs
similarity index 93%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.json.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.json.cs
index 8a562584f4b2..5b97e81a7241 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/Error.json.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error.json.cs
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Extensions;
@@ -65,18 +65,16 @@ internal Error(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObj
{
return;
}
- {_error1 = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAutoGenerated.FromJson(__jsonError) : Error1;}
+ {_error1 = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Error1.FromJson(__jsonError) : _error1;}
AfterFromJson(json);
}
///
- /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError.
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError.
///
/// a to deserialize from.
- ///
- /// an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError.
- ///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode node)
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError.
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode node)
{
return node is Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonObject json ? new Error(json) : null;
}
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/ErrorAutoGenerated.PowerShell.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error1.PowerShell.cs
similarity index 58%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/ErrorAutoGenerated.PowerShell.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error1.PowerShell.cs
index 5d8da0179b30..4ab6418fdfae 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/ErrorAutoGenerated.PowerShell.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error1.PowerShell.cs
@@ -3,13 +3,13 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PowerShell;
/// The error object.
- [System.ComponentModel.TypeConverter(typeof(ErrorAutoGeneratedTypeConverter))]
- public partial class ErrorAutoGenerated
+ [System.ComponentModel.TypeConverter(typeof(Error1TypeConverter))]
+ public partial class Error1
{
///
@@ -55,37 +55,45 @@ public partial class ErrorAutoGenerated
partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
///
- /// Deserializes a into an instance of OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
///
/// The global::System.Collections.IDictionary content that should be used.
///
- /// an instance of .
+ /// an instance of .
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1 DeserializeFromDictionary(global::System.Collections.IDictionary content)
{
- return new ErrorAutoGenerated(content);
+ return new Error1(content);
}
///
- /// Deserializes a into an instance of into an instance of .
///
/// The global::System.Management.Automation.PSObject content that should be used.
///
- /// an instance of .
+ /// an instance of .
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1 DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
{
- return new ErrorAutoGenerated(content);
+ return new Error1(content);
}
///
- /// Deserializes a into a new instance of into a new instance of .
///
/// The global::System.Collections.IDictionary content that should be used.
- internal ErrorAutoGenerated(global::System.Collections.IDictionary content)
+ internal Error1(global::System.Collections.IDictionary content)
{
bool returnNow = false;
BeforeDeserializeDictionary(content, ref returnNow);
@@ -96,33 +104,33 @@ internal ErrorAutoGenerated(global::System.Collections.IDictionary content)
// actually deserialize
if (content.Contains("Code"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Code, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Code, global::System.Convert.ToString);
}
if (content.Contains("Message"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Message, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Message, global::System.Convert.ToString);
}
if (content.Contains("Target"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Target, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Target, global::System.Convert.ToString);
}
if (content.Contains("Detail"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ErrorTypeConverter.ConvertFrom));
}
if (content.Contains("AdditionalInfo"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom));
}
AfterDeserializeDictionary(content);
}
///
- /// Deserializes a into a new instance of into a new instance of .
///
/// The global::System.Management.Automation.PSObject content that should be used.
- internal ErrorAutoGenerated(global::System.Management.Automation.PSObject content)
+ internal Error1(global::System.Management.Automation.PSObject content)
{
bool returnNow = false;
BeforeDeserializePSObject(content, ref returnNow);
@@ -133,42 +141,54 @@ internal ErrorAutoGenerated(global::System.Management.Automation.PSObject conten
// actually deserialize
if (content.Contains("Code"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Code, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Code, global::System.Convert.ToString);
}
if (content.Contains("Message"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Message, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Message, global::System.Convert.ToString);
}
if (content.Contains("Target"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Target, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Target, global::System.Convert.ToString);
}
if (content.Contains("Detail"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ErrorTypeConverter.ConvertFrom));
}
if (content.Contains("AdditionalInfo"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom));
}
AfterDeserializePSObject(content);
}
///
- /// Creates a new instance of , deserializing the content from a json string.
+ /// Creates a new instance of , deserializing the content from a json string.
///
/// a string containing a JSON serialized instance of this model.
- /// an instance of the model class.
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(jsonText));
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Json.JsonNode.Parse(jsonText));
/// Serializes this instance to a json string.
/// a containing this model serialized to JSON text.
public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
}
/// The error object.
- [System.ComponentModel.TypeConverter(typeof(ErrorAutoGeneratedTypeConverter))]
- public partial interface IErrorAutoGenerated
+ [System.ComponentModel.TypeConverter(typeof(Error1TypeConverter))]
+ public partial interface IError1
{
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/ErrorAutoGenerated.TypeConverter.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error1.TypeConverter.cs
similarity index 84%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/ErrorAutoGenerated.TypeConverter.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error1.TypeConverter.cs
index e4049524ff7e..5a2af13ac554 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/ErrorAutoGenerated.TypeConverter.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error1.TypeConverter.cs
@@ -3,14 +3,14 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.PowerShell;
///
- /// A PowerShell PSTypeConverter to support converting to an instance of
+ /// A PowerShell PSTypeConverter to support converting to an instance of
///
- public partial class ErrorAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter
+ public partial class Error1TypeConverter : global::System.Management.Automation.PSTypeConverter
{
///
@@ -26,13 +26,12 @@ public partial class ErrorAutoGeneratedTypeConverter : global::System.Management
public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
///
- /// Determines if the converter can convert the parameter to the
- /// type.
+ /// Determines if the converter can convert the parameter to the type.
///
- /// the instance to check if it can be converted to the the instance to check if it can be converted to the type.
///
- /// true if the instance could be converted to a type, otherwise false
+ /// true if the instance could be converted to a type, otherwise false
///
public static bool CanConvertFrom(dynamic sourceValue)
{
@@ -95,31 +94,31 @@ public static bool CanConvertFrom(dynamic sourceValue)
/// not used by this TypeConverter.
/// when set to true, will ignore the case when converting.
///
- /// an instance of , or null if there is no suitable conversion.
+ /// an instance of , or null if there is no suitable conversion.
///
public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
///
- /// Converts the parameter into an instance of
+ /// Converts the parameter into an instance of
///
- /// the value to convert into an instance of .
+ /// the value to convert into an instance of .
///
- /// an instance of , or null if there is no suitable conversion.
+ /// an instance of , or null if there is no suitable conversion.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated ConvertFrom(dynamic sourceValue)
+ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1 ConvertFrom(dynamic sourceValue)
{
if (null == sourceValue)
{
return null;
}
global::System.Type type = sourceValue.GetType();
- if (typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated).IsAssignableFrom(type))
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1).IsAssignableFrom(type))
{
return sourceValue;
}
try
{
- return ErrorAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ return Error1.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
}
catch
{
@@ -127,11 +126,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IE
}
if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
{
- return ErrorAutoGenerated.DeserializeFromPSObject(sourceValue);
+ return Error1.DeserializeFromPSObject(sourceValue);
}
if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
{
- return ErrorAutoGenerated.DeserializeFromDictionary(sourceValue);
+ return Error1.DeserializeFromDictionary(sourceValue);
}
return null;
}
diff --git a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/ErrorAutoGenerated.cs b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error1.cs
similarity index 63%
rename from generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/ErrorAutoGenerated.cs
rename to generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error1.cs
index 27c4304fa24c..a16537df523c 100644
--- a/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Api20201208/ErrorAutoGenerated.cs
+++ b/generated/HealthBot/HealthBot.Autorest/generated/api/Models/Error1.cs
@@ -3,22 +3,22 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208
+namespace Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Extensions;
/// The error object.
- public partial class ErrorAutoGenerated :
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGenerated,
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal
+ public partial class Error1 :
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1,
+ Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal
{
/// Backing field for property.
- private Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[] _additionalInfo;
+ private System.Collections.Generic.List _additionalInfo;
/// The error additional info.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Owned)]
- public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; }
+ public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; }
/// Backing field for property.
private string _code;
@@ -28,11 +28,11 @@ public partial class ErrorAutoGenerated :
public string Code { get => this._code; }
/// Backing field for property.
- private Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[] _detail;
+ private System.Collections.Generic.List _detail;
/// The error details.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Owned)]
- public Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[] Detail { get => this._detail; }
+ public System.Collections.Generic.List Detail { get => this._detail; }
/// Backing field for property.
private string _message;
@@ -42,19 +42,19 @@ public partial class ErrorAutoGenerated :
public string Message { get => this._message; }
/// Internal Acessors for AdditionalInfo
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } }
+ System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } }
/// Internal Acessors for Code
- string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal.Code { get => this._code; set { {_code = value;} } }
+ string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal.Code { get => this._code; set { {_code = value;} } }
/// Internal Acessors for Detail
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[] Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal.Detail { get => this._detail; set { {_detail = value;} } }
+ System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal.Detail { get => this._detail; set { {_detail = value;} } }
/// Internal Acessors for Message
- string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal.Message { get => this._message; set { {_message = value;} } }
+ string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal.Message { get => this._message; set { {_message = value;} } }
/// Internal Acessors for Target
- string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAutoGeneratedInternal.Target { get => this._target; set { {_target = value;} } }
+ string Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError1Internal.Target { get => this._target; set { {_target = value;} } }
/// Backing field for property.
private string _target;
@@ -63,28 +63,34 @@ public partial class ErrorAutoGenerated :
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Origin(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.PropertyOrigin.Owned)]
public string Target { get => this._target; }
- /// Creates an new instance.
- public ErrorAutoGenerated()
+ /// Creates an new instance.
+ public Error1()
{
}
}
/// The error object.
- public partial interface IErrorAutoGenerated :
+ public partial interface IError1 :
Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.IJsonSerializable
{
/// The error additional info.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The error additional info.",
SerializedName = @"additionalInfo",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo) })]
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IErrorAdditionalInfo[] AdditionalInfo { get; }
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IErrorAdditionalInfo) })]
+ System.Collections.Generic.List AdditionalInfo { get; }
/// The error code.
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The error code.",
SerializedName = @"code",
PossibleTypes = new [] { typeof(string) })]
@@ -93,14 +99,20 @@ public partial interface IErrorAutoGenerated :
[Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The error details.",
SerializedName = @"details",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError) })]
- Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IError[] Detail { get; }
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IError) })]
+ System.Collections.Generic.List Detail { get; }
///