From 753967414d6cadbb53d76b79b8252a48ee0302fb Mon Sep 17 00:00:00 2001
From: azure-powershell-bot
<65331932+azure-powershell-bot@users.noreply.github.com>
Date: Mon, 21 Apr 2025 06:29:09 +0000
Subject: [PATCH] [skip ci] Archive fc01bf064d8af5eb3474b5ceb37ac7a5f8ef612d
---
.../Az.DedicatedHsm.csproj | 2 +-
.../Az.DedicatedHsm.format.ps1xml | 106 +-
.../Az.DedicatedHsm.psd1 | 3 +-
.../Properties/AssemblyInfo.cs | 30 +-
.../check-dependencies.ps1 | 6 +-
.../exports/Get-AzDedicatedHsm.ps1 | 21 +-
...edHsmOutboundNetworkDependencyEndpoint.ps1 | 20 +-
.../exports/New-AzDedicatedHsm.ps1 | 68 +-
.../exports/ProxyCmdletDefinitions.ps1 | 176 +-
.../exports/Remove-AzDedicatedHsm.ps1 | 17 +-
.../exports/Update-AzDedicatedHsm.ps1 | 50 +-
.../DedicatedHsm.Autorest/generate-info.json | 2 +-
.../DedicatedHsm.Autorest/generated/Module.cs | 27 +-
.../generated/api/DedicatedHsm.cs | 2656 +++++++++++++----
.../Api20211130/DedicatedHsm.PowerShell.cs | 352 ---
.../DedicatedHsmProperties.PowerShell.cs | 226 --
.../ApiEntityReference.PowerShell.cs | 44 +-
.../ApiEntityReference.TypeConverter.cs | 6 +-
.../{Api20211130 => }/ApiEntityReference.cs | 9 +-
.../ApiEntityReference.json.cs | 10 +-
.../api/Models/DedicatedHsm.PowerShell.cs | 372 +++
.../DedicatedHsm.TypeConverter.cs | 6 +-
.../Models/{Api20211130 => }/DedicatedHsm.cs | 220 +-
.../{Api20211130 => }/DedicatedHsm.json.cs | 16 +-
.../DedicatedHsmError.PowerShell.cs | 44 +-
.../DedicatedHsmError.TypeConverter.cs | 6 +-
.../{Api20211130 => }/DedicatedHsmError.cs | 21 +-
.../DedicatedHsmError.json.cs | 12 +-
.../Models/DedicatedHsmIdentity.PowerShell.cs | 36 +-
.../api/Models/DedicatedHsmIdentity.cs | 12 +
.../api/Models/DedicatedHsmIdentity.json.cs | 10 +-
.../DedicatedHsmListResult.PowerShell.cs | 50 +-
.../DedicatedHsmListResult.TypeConverter.cs | 6 +-
.../DedicatedHsmListResult.cs | 22 +-
.../DedicatedHsmListResult.json.cs | 12 +-
.../DedicatedHsmOperation.PowerShell.cs | 68 +-
.../DedicatedHsmOperation.TypeConverter.cs | 6 +-
.../DedicatedHsmOperation.cs | 42 +-
.../DedicatedHsmOperation.json.cs | 16 +-
...DedicatedHsmOperationDisplay.PowerShell.cs | 58 +-
...icatedHsmOperationDisplay.TypeConverter.cs | 6 +-
.../DedicatedHsmOperationDisplay.cs | 18 +-
.../DedicatedHsmOperationDisplay.json.cs | 16 +-
...icatedHsmOperationListResult.PowerShell.cs | 46 +-
...tedHsmOperationListResult.TypeConverter.cs | 6 +-
.../DedicatedHsmOperationListResult.cs | 19 +-
.../DedicatedHsmOperationListResult.json.cs | 10 +-
.../DedicatedHsmPatchParameters.PowerShell.cs | 46 +-
...dicatedHsmPatchParameters.TypeConverter.cs | 6 +-
.../DedicatedHsmPatchParameters.cs | 19 +-
.../DedicatedHsmPatchParameters.json.cs | 10 +-
...icatedHsmPatchParametersTags.PowerShell.cs | 42 +-
...tedHsmPatchParametersTags.TypeConverter.cs | 6 +-
.../DedicatedHsmPatchParametersTags.cs | 6 +-
...icatedHsmPatchParametersTags.dictionary.cs | 4 +-
.../DedicatedHsmPatchParametersTags.json.cs | 8 +-
.../DedicatedHsmProperties.PowerShell.cs | 244 ++
.../DedicatedHsmProperties.TypeConverter.cs | 6 +-
.../DedicatedHsmProperties.cs | 87 +-
.../DedicatedHsmProperties.json.cs | 22 +-
.../EndpointDependency.PowerShell.cs | 48 +-
.../EndpointDependency.TypeConverter.cs | 6 +-
.../{Api20211130 => }/EndpointDependency.cs | 22 +-
.../EndpointDependency.json.cs | 12 +-
.../EndpointDetail.PowerShell.cs | 56 +-
.../EndpointDetail.TypeConverter.cs | 6 +-
.../{Api20211130 => }/EndpointDetail.cs | 18 +-
.../{Api20211130 => }/EndpointDetail.json.cs | 16 +-
.../{Api20211130 => }/Error.PowerShell.cs | 52 +-
.../{Api20211130 => }/Error.TypeConverter.cs | 6 +-
.../api/Models/{Api20211130 => }/Error.cs | 31 +-
.../Models/{Api20211130 => }/Error.json.cs | 22 +-
.../NetworkInterface.PowerShell.cs | 48 +-
.../NetworkInterface.TypeConverter.cs | 6 +-
.../{Api20211130 => }/NetworkInterface.cs | 14 +-
.../NetworkInterface.json.cs | 14 +-
.../NetworkProfile.PowerShell.cs | 52 +-
.../NetworkProfile.TypeConverter.cs | 6 +-
.../{Api20211130 => }/NetworkProfile.cs | 32 +-
.../{Api20211130 => }/NetworkProfile.json.cs | 12 +-
.../OutboundEnvironmentEndpoint.PowerShell.cs | 50 +-
...tboundEnvironmentEndpoint.TypeConverter.cs | 6 +-
.../OutboundEnvironmentEndpoint.cs | 22 +-
.../OutboundEnvironmentEndpoint.json.cs | 12 +-
...nvironmentEndpointCollection.PowerShell.cs | 48 +-
...ronmentEndpointCollection.TypeConverter.cs | 6 +-
.../OutboundEnvironmentEndpointCollection.cs | 24 +-
...boundEnvironmentEndpointCollection.json.cs | 14 +-
.../{Api20211130 => }/Resource.PowerShell.cs | 72 +-
.../Resource.TypeConverter.cs | 6 +-
.../api/Models/{Api20211130 => }/Resource.cs | 71 +-
.../Models/{Api20211130 => }/Resource.json.cs | 33 +-
.../ResourceListResult.PowerShell.cs | 48 +-
.../ResourceListResult.TypeConverter.cs | 6 +-
.../{Api20211130 => }/ResourceListResult.cs | 22 +-
.../ResourceListResult.json.cs | 12 +-
.../ResourceTags.PowerShell.cs | 40 +-
.../ResourceTags.TypeConverter.cs | 6 +-
.../Models/{Api20211130 => }/ResourceTags.cs | 6 +-
.../ResourceTags.dictionary.cs | 4 +-
.../{Api20211130 => }/ResourceTags.json.cs | 8 +-
.../{Api20211130 => }/Sku.PowerShell.cs | 44 +-
.../{Api20211130 => }/Sku.TypeConverter.cs | 6 +-
.../api/Models/{Api20211130 => }/Sku.cs | 21 +-
.../api/Models/{Api20211130 => }/Sku.json.cs | 12 +-
.../SystemData.PowerShell.cs | 64 +-
.../SystemData.TypeConverter.cs | 6 +-
.../Models/{Api20211130 => }/SystemData.cs | 48 +-
.../{Api20211130 => }/SystemData.json.cs | 20 +-
.../api/Support/IdentityType.Completer.cs | 47 -
.../api/Support/IdentityType.TypeConverter.cs | 59 -
.../generated/api/Support/IdentityType.cs | 102 -
.../api/Support/JsonWebKeyType.Completer.cs | 59 -
.../Support/JsonWebKeyType.TypeConverter.cs | 59 -
.../generated/api/Support/JsonWebKeyType.cs | 117 -
.../api/Support/SkuName.Completer.cs | 59 -
.../api/Support/SkuName.TypeConverter.cs | 59 -
.../generated/api/Support/SkuName.cs | 133 -
.../GetAzDedicatedHsmOperation_List.cs | 109 +-
...mOutboundNetworkDependencyEndpoint_List.cs | 121 +-
.../cmdlets/GetAzDedicatedHsm_Get.cs | 114 +-
.../GetAzDedicatedHsm_GetViaIdentity.cs | 115 +-
.../cmdlets/GetAzDedicatedHsm_List.cs | 121 +-
.../cmdlets/GetAzDedicatedHsm_List1.cs | 121 +-
.../NewAzDedicatedHsm_CreateExpanded.cs | 160 +-
...NewAzDedicatedHsm_CreateViaJsonFilePath.cs | 609 ++++
.../NewAzDedicatedHsm_CreateViaJsonString.cs | 607 ++++
.../cmdlets/RemoveAzDedicatedHsm_Delete.cs | 102 +-
.../RemoveAzDedicatedHsm_DeleteViaIdentity.cs | 101 +-
.../UpdateAzDedicatedHsm_UpdateExpanded.cs | 144 +-
...zDedicatedHsm_UpdateViaIdentityExpanded.cs | 149 +-
...ateAzDedicatedHsm_UpdateViaJsonFilePath.cs | 609 ++++
...pdateAzDedicatedHsm_UpdateViaJsonString.cs | 607 ++++
.../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-AzDedicatedHsmOperation.ps1 | 10 +-
.../internal/ProxyCmdletDefinitions.ps1 | 10 +-
.../DedicatedHsm.Autorest/resources/README.md | 11 +
.../DedicatedHsm.Autorest/test-module.ps1 | 10 +-
.../Az.GraphServices.csproj | 2 +-
.../Az.GraphServices.format.ps1xml | 200 +-
.../Az.GraphServices.psd1 | 3 +-
.../Properties/AssemblyInfo.cs | 30 +-
.../check-dependencies.ps1 | 6 +-
.../exports/Get-AzGraphServicesAccount.ps1 | 21 +-
.../exports/New-AzGraphServicesAccount.ps1 | 46 +-
.../exports/ProxyCmdletDefinitions.ps1 | 134 +-
.../exports/Remove-AzGraphServicesAccount.ps1 | 17 +-
.../exports/Update-AzGraphServicesAccount.ps1 | 50 +-
.../GraphServices.Autorest/generate-info.json | 2 +-
.../generated/Module.cs | 27 +-
.../generated/api/GraphServices.cs | 1723 +++++++++--
.../AccountPatchResource.PowerShell.cs | 24 +-
.../AccountPatchResource.TypeConverter.cs | 6 +-
.../{Api20230413 => }/AccountPatchResource.cs | 17 +-
.../AccountPatchResource.json.cs | 10 +-
.../AccountResource.PowerShell.cs | 76 +-
.../AccountResource.TypeConverter.cs | 6 +-
.../{Api20230413 => }/AccountResource.cs | 136 +-
.../{Api20230413 => }/AccountResource.json.cs | 16 +-
.../AccountResourceList.PowerShell.cs | 28 +-
.../AccountResourceList.TypeConverter.cs | 6 +-
.../{Api20230413 => }/AccountResourceList.cs | 22 +-
.../AccountResourceList.json.cs | 12 +-
.../AccountResourceProperties.PowerShell.cs | 34 +-
...AccountResourceProperties.TypeConverter.cs | 6 +-
.../AccountResourceProperties.cs | 33 +-
.../AccountResourceProperties.json.cs | 23 +-
.../AccountResourceSystemData.PowerShell.cs | 38 +-
...AccountResourceSystemData.TypeConverter.cs | 6 +-
.../AccountResourceSystemData.cs | 42 +-
.../AccountResourceSystemData.json.cs | 16 +-
.../generated/api/Models/Any.PowerShell.cs | 4 +-
.../generated/api/Models/Any.cs | 6 +-
.../generated/api/Models/Any.json.cs | 2 +-
.../ErrorAdditionalInfo.PowerShell.cs | 28 +-
.../ErrorAdditionalInfo.TypeConverter.cs | 6 +-
.../Models/{Api30 => }/ErrorAdditionalInfo.cs | 16 +-
.../{Api30 => }/ErrorAdditionalInfo.json.cs | 16 +-
.../{Api30 => }/ErrorDetail.PowerShell.cs | 40 +-
.../{Api30 => }/ErrorDetail.TypeConverter.cs | 6 +-
.../api/Models/{Api30 => }/ErrorDetail.cs | 51 +-
.../Models/{Api30 => }/ErrorDetail.json.cs | 28 +-
.../{Api30 => }/ErrorResponse.PowerShell.cs | 44 +-
.../ErrorResponse.TypeConverter.cs | 6 +-
.../api/Models/{Api30 => }/ErrorResponse.cs | 61 +-
.../Models/{Api30 => }/ErrorResponse.json.cs | 10 +-
.../api/Models/GraphServicesIdentity.cs | 12 +
.../api/Models/GraphServicesIdentity.json.cs | 8 +-
.../{Api30 => }/Operation.PowerShell.cs | 56 +-
.../{Api30 => }/Operation.TypeConverter.cs | 6 +-
.../api/Models/{Api30 => }/Operation.cs | 86 +-
.../api/Models/{Api30 => }/Operation.json.cs | 26 +-
.../OperationDisplay.PowerShell.cs | 36 +-
.../OperationDisplay.TypeConverter.cs | 6 +-
.../Models/{Api30 => }/OperationDisplay.cs | 26 +-
.../{Api30 => }/OperationDisplay.json.cs | 24 +-
.../OperationListResult.PowerShell.cs | 28 +-
.../OperationListResult.TypeConverter.cs | 6 +-
.../Models/{Api30 => }/OperationListResult.cs | 26 +-
.../{Api30 => }/OperationListResult.json.cs | 16 +-
.../{Api20230413 => }/Resource.PowerShell.cs | 40 +-
.../Resource.TypeConverter.cs | 6 +-
.../api/Models/{Api20230413 => }/Resource.cs | 37 +-
.../Models/{Api20230413 => }/Resource.json.cs | 24 +-
.../ResourceTags.PowerShell.cs | 20 +-
.../ResourceTags.TypeConverter.cs | 6 +-
.../Models/{Api20230413 => }/ResourceTags.cs | 6 +-
.../ResourceTags.dictionary.cs | 4 +-
.../{Api20230413 => }/ResourceTags.json.cs | 8 +-
.../{Api20230413 => }/TagUpdate.PowerShell.cs | 24 +-
.../TagUpdate.TypeConverter.cs | 6 +-
.../api/Models/{Api20230413 => }/TagUpdate.cs | 19 +-
.../{Api20230413 => }/TagUpdate.json.cs | 10 +-
.../TagUpdateTags.PowerShell.cs | 20 +-
.../TagUpdateTags.TypeConverter.cs | 6 +-
.../Models/{Api20230413 => }/TagUpdateTags.cs | 6 +-
.../TagUpdateTags.dictionary.cs | 4 +-
.../{Api20230413 => }/TagUpdateTags.json.cs | 8 +-
.../api/Support/ActionType.Completer.cs | 37 -
.../api/Support/ActionType.TypeConverter.cs | 61 -
.../generated/api/Support/ActionType.cs | 98 -
.../api/Support/CreatedByType.Completer.cs | 47 -
.../Support/CreatedByType.TypeConverter.cs | 59 -
.../generated/api/Support/CreatedByType.cs | 102 -
.../generated/api/Support/Origin.Completer.cs | 46 -
.../api/Support/Origin.TypeConverter.cs | 62 -
.../generated/api/Support/Origin.cs | 103 -
.../Support/ProvisioningState.Completer.cs | 43 -
.../ProvisioningState.TypeConverter.cs | 59 -
.../api/Support/ProvisioningState.cs | 100 -
.../cmdlets/GetAzGraphServicesAccount_Get.cs | 112 +-
...etAzGraphServicesAccount_GetViaIdentity.cs | 105 +-
.../cmdlets/GetAzGraphServicesAccount_List.cs | 119 +-
.../GetAzGraphServicesAccount_List1.cs | 119 +-
.../GetAzGraphServicesOperation_List.cs | 112 +-
...ewAzGraphServicesAccount_CreateExpanded.cs | 142 +-
...phServicesAccount_CreateViaJsonFilePath.cs | 606 ++++
...raphServicesAccount_CreateViaJsonString.cs | 604 ++++
.../RemoveAzGraphServicesAccount_Delete.cs | 80 +-
...zGraphServicesAccount_DeleteViaIdentity.cs | 73 +-
...teAzGraphServicesAccount_UpdateExpanded.cs | 126 +-
...rvicesAccount_UpdateViaIdentityExpanded.cs | 125 +-
...phServicesAccount_UpdateViaJsonFilePath.cs | 523 ++++
...raphServicesAccount_UpdateViaJsonString.cs | 521 ++++
.../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-AzGraphServicesOperation.ps1 | 10 +-
.../internal/ProxyCmdletDefinitions.ps1 | 10 +-
.../resources/README.md | 11 +
.../GraphServices.Autorest/test-module.ps1 | 10 +-
291 files changed, 15162 insertions(+), 5532 deletions(-)
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.PowerShell.cs
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmProperties.PowerShell.cs
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ApiEntityReference.PowerShell.cs (77%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ApiEntityReference.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ApiEntityReference.cs (90%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ApiEntityReference.json.cs (95%)
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.PowerShell.cs
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsm.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsm.cs (53%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsm.json.cs (92%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmError.PowerShell.cs (75%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmError.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmError.cs (65%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmError.json.cs (94%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmListResult.PowerShell.cs (70%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmListResult.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmListResult.cs (73%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmListResult.json.cs (90%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperation.PowerShell.cs (61%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperation.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperation.cs (74%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperation.json.cs (93%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperationDisplay.PowerShell.cs (68%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperationDisplay.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperationDisplay.cs (91%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperationDisplay.json.cs (94%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperationListResult.PowerShell.cs (73%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperationListResult.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperationListResult.cs (69%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmOperationListResult.json.cs (90%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmPatchParameters.PowerShell.cs (74%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmPatchParameters.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmPatchParameters.cs (68%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmPatchParameters.json.cs (94%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmPatchParametersTags.PowerShell.cs (80%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmPatchParametersTags.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmPatchParametersTags.cs (82%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmPatchParametersTags.dictionary.cs (96%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmPatchParametersTags.json.cs (95%)
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmProperties.PowerShell.cs
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmProperties.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmProperties.cs (59%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/DedicatedHsmProperties.json.cs (91%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/EndpointDependency.PowerShell.cs (70%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/EndpointDependency.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/EndpointDependency.cs (74%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/EndpointDependency.json.cs (90%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/EndpointDetail.PowerShell.cs (69%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/EndpointDetail.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/EndpointDetail.cs (91%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/EndpointDetail.json.cs (94%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Error.PowerShell.cs (71%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Error.TypeConverter.cs (98%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Error.cs (75%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Error.json.cs (90%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/NetworkInterface.PowerShell.cs (74%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/NetworkInterface.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/NetworkInterface.cs (89%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/NetworkInterface.json.cs (94%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/NetworkProfile.PowerShell.cs (66%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/NetworkProfile.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/NetworkProfile.cs (66%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/NetworkProfile.json.cs (90%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/OutboundEnvironmentEndpoint.PowerShell.cs (69%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/OutboundEnvironmentEndpoint.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/OutboundEnvironmentEndpoint.cs (76%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/OutboundEnvironmentEndpoint.json.cs (90%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/OutboundEnvironmentEndpointCollection.PowerShell.cs (68%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/OutboundEnvironmentEndpointCollection.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/OutboundEnvironmentEndpointCollection.cs (70%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/OutboundEnvironmentEndpointCollection.json.cs (89%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Resource.PowerShell.cs (61%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Resource.TypeConverter.cs (98%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Resource.cs (70%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Resource.json.cs (85%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ResourceListResult.PowerShell.cs (70%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ResourceListResult.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ResourceListResult.cs (75%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ResourceListResult.json.cs (90%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ResourceTags.PowerShell.cs (81%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ResourceTags.TypeConverter.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ResourceTags.cs (83%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ResourceTags.dictionary.cs (97%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/ResourceTags.json.cs (96%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Sku.PowerShell.cs (79%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Sku.TypeConverter.cs (98%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Sku.cs (59%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/Sku.json.cs (94%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/SystemData.PowerShell.cs (63%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/SystemData.TypeConverter.cs (98%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/SystemData.cs (79%)
rename generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/{Api20211130 => }/SystemData.json.cs (94%)
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Support/IdentityType.Completer.cs
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Support/IdentityType.TypeConverter.cs
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Support/IdentityType.cs
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Support/JsonWebKeyType.Completer.cs
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Support/JsonWebKeyType.TypeConverter.cs
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Support/JsonWebKeyType.cs
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Support/SkuName.Completer.cs
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Support/SkuName.TypeConverter.cs
delete mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Support/SkuName.cs
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/cmdlets/NewAzDedicatedHsm_CreateViaJsonFilePath.cs
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/cmdlets/NewAzDedicatedHsm_CreateViaJsonString.cs
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/cmdlets/UpdateAzDedicatedHsm_UpdateViaJsonFilePath.cs
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/cmdlets/UpdateAzDedicatedHsm_UpdateViaJsonString.cs
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/runtime/Context.cs
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/generated/runtime/InputHandler.cs
create mode 100644 generated/DedicatedHsm/DedicatedHsm.Autorest/resources/README.md
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountPatchResource.PowerShell.cs (82%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountPatchResource.TypeConverter.cs (97%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountPatchResource.cs (79%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountPatchResource.json.cs (94%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResource.PowerShell.cs (52%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResource.TypeConverter.cs (97%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResource.cs (56%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResource.json.cs (93%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceList.PowerShell.cs (76%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceList.TypeConverter.cs (97%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceList.cs (76%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceList.json.cs (90%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceProperties.PowerShell.cs (74%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceProperties.TypeConverter.cs (97%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceProperties.cs (76%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceProperties.json.cs (88%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceSystemData.PowerShell.cs (67%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceSystemData.TypeConverter.cs (97%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceSystemData.cs (76%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/AccountResourceSystemData.json.cs (94%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorAdditionalInfo.PowerShell.cs (80%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorAdditionalInfo.TypeConverter.cs (98%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorAdditionalInfo.cs (86%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorAdditionalInfo.json.cs (95%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorDetail.PowerShell.cs (68%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorDetail.TypeConverter.cs (98%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorDetail.cs (68%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorDetail.json.cs (87%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorResponse.PowerShell.cs (66%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorResponse.TypeConverter.cs (98%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorResponse.cs (61%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/ErrorResponse.json.cs (95%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/Operation.PowerShell.cs (64%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/Operation.TypeConverter.cs (98%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/Operation.cs (76%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/Operation.json.cs (94%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/OperationDisplay.PowerShell.cs (75%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/OperationDisplay.TypeConverter.cs (98%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/OperationDisplay.cs (90%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/OperationDisplay.json.cs (94%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/OperationListResult.PowerShell.cs (78%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/OperationListResult.TypeConverter.cs (98%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/OperationListResult.cs (75%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api30 => }/OperationListResult.json.cs (91%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/Resource.PowerShell.cs (72%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/Resource.TypeConverter.cs (98%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/Resource.cs (85%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/Resource.json.cs (93%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/ResourceTags.PowerShell.cs (90%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/ResourceTags.TypeConverter.cs (97%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/ResourceTags.cs (93%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/ResourceTags.dictionary.cs (97%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/ResourceTags.json.cs (96%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/TagUpdate.PowerShell.cs (83%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/TagUpdate.TypeConverter.cs (98%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/TagUpdate.cs (84%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/TagUpdate.json.cs (95%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/TagUpdateTags.PowerShell.cs (90%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/TagUpdateTags.TypeConverter.cs (97%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/TagUpdateTags.cs (94%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/TagUpdateTags.dictionary.cs (97%)
rename generated/GraphServices/GraphServices.Autorest/generated/api/Models/{Api20230413 => }/TagUpdateTags.json.cs (96%)
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/ActionType.Completer.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/ActionType.TypeConverter.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/ActionType.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/CreatedByType.Completer.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/CreatedByType.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/Origin.Completer.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/Origin.TypeConverter.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/Origin.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/ProvisioningState.Completer.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs
delete mode 100644 generated/GraphServices/GraphServices.Autorest/generated/api/Support/ProvisioningState.cs
create mode 100644 generated/GraphServices/GraphServices.Autorest/generated/cmdlets/NewAzGraphServicesAccount_CreateViaJsonFilePath.cs
create mode 100644 generated/GraphServices/GraphServices.Autorest/generated/cmdlets/NewAzGraphServicesAccount_CreateViaJsonString.cs
create mode 100644 generated/GraphServices/GraphServices.Autorest/generated/cmdlets/UpdateAzGraphServicesAccount_UpdateViaJsonFilePath.cs
create mode 100644 generated/GraphServices/GraphServices.Autorest/generated/cmdlets/UpdateAzGraphServicesAccount_UpdateViaJsonString.cs
create mode 100644 generated/GraphServices/GraphServices.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs
create mode 100644 generated/GraphServices/GraphServices.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs
create mode 100644 generated/GraphServices/GraphServices.Autorest/generated/runtime/Context.cs
create mode 100644 generated/GraphServices/GraphServices.Autorest/generated/runtime/InputHandler.cs
create mode 100644 generated/GraphServices/GraphServices.Autorest/resources/README.md
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.csproj b/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.csproj
index 07908a1fa211..606995ae931b 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.csproj
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.csproj
@@ -2,9 +2,9 @@
DedicatedHsm
DedicatedHsm
+ DedicatedHsm.Autorest
-
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.format.ps1xml b/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.format.ps1xml
index 977f251b5114..a572e0e86ab1 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.format.ps1xml
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.format.ps1xml
@@ -2,9 +2,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsm
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsm#Multiple
@@ -12,10 +12,13 @@
-
+
-
+
+
+
+
@@ -25,10 +28,13 @@
Name
- ResourceGroupName
+ ProvisioningState
- SubscriptionId
+ SkuName
+
+
+ Location
@@ -36,9 +42,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsm
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmIdentity
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsm
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmIdentity#Multiple
@@ -46,13 +52,10 @@
-
-
-
-
+
-
+
@@ -62,13 +65,10 @@
Name
- ProvisioningState
-
-
- SkuName
+ ResourceGroupName
- Location
+ SubscriptionId
@@ -76,9 +76,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmListResult
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmListResult
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmListResult
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmListResult#Multiple
@@ -98,9 +98,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmOperation
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperation
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmOperation
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperation#Multiple
@@ -126,9 +126,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmOperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperationDisplay
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmOperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperationDisplay#Multiple
@@ -166,9 +166,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmPatchParametersTags
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmPatchParametersTags
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmPatchParametersTags
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmPatchParametersTags#Multiple
@@ -188,9 +188,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmProperties
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmProperties
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmProperties
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmProperties#Multiple
@@ -222,9 +222,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.EndpointDependency
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.EndpointDependency
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.EndpointDependency
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.EndpointDependency#Multiple
@@ -244,9 +244,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.EndpointDetail
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.EndpointDetail
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.EndpointDetail
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.EndpointDetail#Multiple
@@ -284,9 +284,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Error
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Error
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Error
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Error#Multiple
@@ -312,9 +312,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkInterface
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.NetworkInterface
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkInterface
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.NetworkInterface#Multiple
@@ -334,9 +334,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.OutboundEnvironmentEndpoint
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.OutboundEnvironmentEndpoint
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.OutboundEnvironmentEndpoint
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.OutboundEnvironmentEndpoint#Multiple
@@ -356,9 +356,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.OutboundEnvironmentEndpointCollection
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.OutboundEnvironmentEndpointCollection
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.OutboundEnvironmentEndpointCollection
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.OutboundEnvironmentEndpointCollection#Multiple
@@ -378,9 +378,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Resource
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Resource#Multiple
@@ -390,9 +390,6 @@
-
-
-
@@ -403,18 +400,15 @@
Name
-
- Zone
-
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ResourceListResult
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ResourceListResult
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ResourceListResult
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ResourceListResult#Multiple
@@ -434,9 +428,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ResourceTags
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ResourceTags#Multiple
@@ -456,9 +450,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Sku
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Sku
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Sku
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Sku#Multiple
@@ -478,9 +472,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.SystemData
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.SystemData#Multiple
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.psd1 b/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.psd1
index 2bda649b97a7..fd0f94b9ef48 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.psd1
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/Az.DedicatedHsm.psd1
@@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.DedicatedHsm.private.dll'
FormatsToProcess = './Az.DedicatedHsm.format.ps1xml'
- FunctionsToExport = 'Get-AzDedicatedHsm', 'Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint', 'New-AzDedicatedHsm', 'Remove-AzDedicatedHsm', 'Update-AzDedicatedHsm', '*'
- AliasesToExport = '*'
+ FunctionsToExport = 'Get-AzDedicatedHsm', 'Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint', 'New-AzDedicatedHsm', 'Remove-AzDedicatedHsm', 'Update-AzDedicatedHsm'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DedicatedHsm'
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/Properties/AssemblyInfo.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/Properties/AssemblyInfo.cs
index a57aa7f132d8..1de8e4dbb122 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/Properties/AssemblyInfo.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.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 - DedicatedHsm")]
-[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("8661d595-0200-4e3c-b4ec-51ab057276a2")]
-[assembly: AssemblyVersion("0.3.2")]
-[assembly: AssemblyFileVersion("0.3.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 - DedicatedHsm")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("0.3.2")]
+[assembly: System.Reflection.AssemblyVersionAttribute("0.3.2")]
+[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
+[assembly: System.CLSCompliantAttribute(false)]
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/check-dependencies.ps1 b/generated/DedicatedHsm/DedicatedHsm.Autorest/check-dependencies.ps1
index c29591c7bfe1..90ca9867ae40 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/check-dependencies.ps1
+++ b/generated/DedicatedHsm/DedicatedHsm.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/DedicatedHsm/DedicatedHsm.Autorest/exports/Get-AzDedicatedHsm.ps1 b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Get-AzDedicatedHsm.ps1
index bbd938c5e98a..2d504027cb0c 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Get-AzDedicatedHsm.ps1
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Get-AzDedicatedHsm.ps1
@@ -32,7 +32,7 @@ Get-AzDedicatedHsm -InputObject $hsm
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm
+Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -47,7 +47,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dedicatedhsm/get-azdedicatedhsm
#>
function Get-AzDedicatedHsm {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -77,7 +77,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter(ParameterSetName='List')]
@@ -143,6 +142,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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()
@@ -167,9 +175,7 @@ begin {
List = 'Az.DedicatedHsm.private\Get-AzDedicatedHsm_List';
List1 = 'Az.DedicatedHsm.private\Get-AzDedicatedHsm_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.DedicatedHsm.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 {
@@ -183,6 +189,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/DedicatedHsm/DedicatedHsm.Autorest/exports/Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint.ps1 b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint.ps1
index bc466a55b9e2..2b4df3cafacd 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint.ps1
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint.ps1
@@ -25,12 +25,12 @@ The operation returns properties of each egress endpoint.
Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint -Name dedicatedHsmName01 -ResourceGroupName resourceGroup
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IOutboundEnvironmentEndpoint
+Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IOutboundEnvironmentEndpoint
.Link
https://learn.microsoft.com/powershell/module/az.dedicatedhsm/get-azdedicatedhsmoutboundnetworkdependencyendpoint
#>
function Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IOutboundEnvironmentEndpoint])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IOutboundEnvironmentEndpoint])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -109,6 +109,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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()
@@ -130,9 +139,7 @@ begin {
$mapping = @{
List = 'Az.DedicatedHsm.private\Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint_List';
}
- if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -146,6 +153,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/DedicatedHsm/DedicatedHsm.Autorest/exports/New-AzDedicatedHsm.ps1 b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/New-AzDedicatedHsm.ps1
index 3dfae7afa735..2549bb32b4ef 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/New-AzDedicatedHsm.ps1
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/New-AzDedicatedHsm.ps1
@@ -16,14 +16,14 @@
<#
.Synopsis
-Create or Update a dedicated HSM in the specified subscription.
+create a dedicated HSM in the specified subscription.
.Description
-Create or Update a dedicated HSM in the specified subscription.
+create a dedicated HSM in the specified subscription.
.Example
New-AzDedicatedHsm -Name hsm-n7wfxi -ResourceGroupName dedicatedhsm-rg-n359cz -Location eastus -Sku "SafeNet Luna Network HSM A790" -StampId stamp1 -SubnetId "/subscriptions/xxxx-xxxx-xxx-xxx/resourceGroups/dedicatedhsm-rg-n359cz/providers/Microsoft.Network/virtualNetworks/vnetq30la9/subnets/hsmsubnet" -NetworkInterface @{PrivateIPAddress = '10.2.1.120' }
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm
+Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -38,7 +38,7 @@ NETWORKINTERFACE : Specifies the list of resource Ids for t
https://learn.microsoft.com/powershell/module/az.dedicatedhsm/new-azdedicatedhsm
#>
function New-AzDedicatedHsm {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -61,67 +61,77 @@ param(
# The subscription ID forms part of the URI for every service call.
${SubscriptionId},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
[System.String]
# The supported Azure location where the dedicated HSM should be created.
${Location},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkInterface[]]
# Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.
- # To construct, see NOTES section for MANAGEMENTNETWORKINTERFACE properties and create a hash table.
${ManagementNetworkInterface},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
[System.String]
# The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
${ManagementSubnetId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkInterface[]]
# Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.
- # To construct, see NOTES section for NETWORKINTERFACE properties and create a hash table.
${NetworkInterface},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.SkuName])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PSArgumentCompleterAttribute("SafeNet Luna Network HSM A790", "payShield10K_LMK1_CPS60", "payShield10K_LMK1_CPS250", "payShield10K_LMK1_CPS2500", "payShield10K_LMK2_CPS60", "payShield10K_LMK2_CPS250", "payShield10K_LMK2_CPS2500")]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.SkuName]
+ [System.String]
# SKU of the dedicated HSM
${Sku},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
[System.String]
# This field will be used when RP does not support Availability zones.
${StampId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
[System.String]
# The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
${SubnetId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceTags]))]
[System.Collections.Hashtable]
# Resource tags
${Tag},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
[System.String[]]
# The Dedicated Hsm zones.
${Zone},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -190,6 +200,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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()
@@ -210,10 +229,10 @@ begin {
$mapping = @{
CreateExpanded = 'Az.DedicatedHsm.private\New-AzDedicatedHsm_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.DedicatedHsm.private\New-AzDedicatedHsm_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.DedicatedHsm.private\New-AzDedicatedHsm_CreateViaJsonString';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 {
@@ -227,6 +246,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/DedicatedHsm/DedicatedHsm.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/ProxyCmdletDefinitions.ps1
index 97f0abcb9f5a..873d4d8ed182 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -25,12 +25,12 @@ The operation returns properties of each egress endpoint.
Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint -Name dedicatedHsmName01 -ResourceGroupName resourceGroup
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IOutboundEnvironmentEndpoint
+Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IOutboundEnvironmentEndpoint
.Link
https://learn.microsoft.com/powershell/module/az.dedicatedhsm/get-azdedicatedhsmoutboundnetworkdependencyendpoint
#>
function Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IOutboundEnvironmentEndpoint])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IOutboundEnvironmentEndpoint])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -109,6 +109,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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()
@@ -130,9 +139,7 @@ begin {
$mapping = @{
List = 'Az.DedicatedHsm.private\Get-AzDedicatedHsmOutboundNetworkDependencyEndpoint_List';
}
- if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -146,6 +153,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)
@@ -207,7 +217,7 @@ Get-AzDedicatedHsm -InputObject $hsm
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm
+Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -222,7 +232,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dedicatedhsm/get-azdedicatedhsm
#>
function Get-AzDedicatedHsm {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -252,7 +262,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter(ParameterSetName='List')]
@@ -318,6 +327,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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()
@@ -342,9 +360,7 @@ begin {
List = 'Az.DedicatedHsm.private\Get-AzDedicatedHsm_List';
List1 = 'Az.DedicatedHsm.private\Get-AzDedicatedHsm_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.DedicatedHsm.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 {
@@ -358,6 +374,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)
@@ -403,14 +422,14 @@ end {
<#
.Synopsis
-Create or Update a dedicated HSM in the specified subscription.
+create a dedicated HSM in the specified subscription.
.Description
-Create or Update a dedicated HSM in the specified subscription.
+create a dedicated HSM in the specified subscription.
.Example
New-AzDedicatedHsm -Name hsm-n7wfxi -ResourceGroupName dedicatedhsm-rg-n359cz -Location eastus -Sku "SafeNet Luna Network HSM A790" -StampId stamp1 -SubnetId "/subscriptions/xxxx-xxxx-xxx-xxx/resourceGroups/dedicatedhsm-rg-n359cz/providers/Microsoft.Network/virtualNetworks/vnetq30la9/subnets/hsmsubnet" -NetworkInterface @{PrivateIPAddress = '10.2.1.120' }
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm
+Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -425,7 +444,7 @@ NETWORKINTERFACE : Specifies the list of resource Ids for t
https://learn.microsoft.com/powershell/module/az.dedicatedhsm/new-azdedicatedhsm
#>
function New-AzDedicatedHsm {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -448,67 +467,77 @@ param(
# The subscription ID forms part of the URI for every service call.
${SubscriptionId},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
[System.String]
# The supported Azure location where the dedicated HSM should be created.
${Location},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkInterface[]]
# Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.
- # To construct, see NOTES section for MANAGEMENTNETWORKINTERFACE properties and create a hash table.
${ManagementNetworkInterface},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
[System.String]
# The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
${ManagementSubnetId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkInterface[]]
# Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.
- # To construct, see NOTES section for NETWORKINTERFACE properties and create a hash table.
${NetworkInterface},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.SkuName])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PSArgumentCompleterAttribute("SafeNet Luna Network HSM A790", "payShield10K_LMK1_CPS60", "payShield10K_LMK1_CPS250", "payShield10K_LMK1_CPS2500", "payShield10K_LMK2_CPS60", "payShield10K_LMK2_CPS250", "payShield10K_LMK2_CPS2500")]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.SkuName]
+ [System.String]
# SKU of the dedicated HSM
${Sku},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
[System.String]
# This field will be used when RP does not support Availability zones.
${StampId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
[System.String]
# The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
${SubnetId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceTags]))]
[System.Collections.Hashtable]
# Resource tags
${Tag},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
[System.String[]]
# The Dedicated Hsm zones.
${Zone},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -577,6 +606,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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()
@@ -597,10 +635,10 @@ begin {
$mapping = @{
CreateExpanded = 'Az.DedicatedHsm.private\New-AzDedicatedHsm_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.DedicatedHsm.private\New-AzDedicatedHsm_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.DedicatedHsm.private\New-AzDedicatedHsm_CreateViaJsonString';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 {
@@ -614,6 +652,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)
@@ -713,7 +754,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -790,6 +830,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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()
@@ -812,9 +861,7 @@ begin {
Delete = 'Az.DedicatedHsm.private\Remove-AzDedicatedHsm_Delete';
DeleteViaIdentity = 'Az.DedicatedHsm.private\Remove-AzDedicatedHsm_DeleteViaIdentity';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 {
@@ -828,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)
@@ -873,9 +923,9 @@ end {
<#
.Synopsis
-Update a dedicated HSM in the specified subscription.
+update a dedicated HSM in the specified subscription.
.Description
-Update a dedicated HSM in the specified subscription.
+update a dedicated HSM in the specified subscription.
.Example
Update-AzDedicatedHsm -Name hsm-n7wfxi -ResourceGroupName dedicatedhsm-rg-n359cz -Tag @{'key1' = '1'; 'key2' = 2; 'key3' = 3}
.Example
@@ -885,7 +935,7 @@ Update-AzDedicatedHsm -InputObject $hsm -Tag @{'key1' = '1'; 'key2' = 2; 'key3'
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm
+Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -900,22 +950,28 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dedicatedhsm/update-azdedicatedhsm
#>
function Update-AzDedicatedHsm {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[System.String]
# Name of the dedicated HSM
${Name},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[System.String]
# The name of the Resource Group to which the server belongs.
${ResourceGroupName},
[Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath')]
+ [Parameter(ParameterSetName='UpdateViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -927,16 +983,28 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPatchParametersTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPatchParametersTags]))]
[System.Collections.Hashtable]
# Resource tags
${Tag},
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -1005,6 +1073,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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()
@@ -1026,10 +1103,10 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.DedicatedHsm.private\Update-AzDedicatedHsm_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.DedicatedHsm.private\Update-AzDedicatedHsm_UpdateViaIdentityExpanded';
+ UpdateViaJsonFilePath = 'Az.DedicatedHsm.private\Update-AzDedicatedHsm_UpdateViaJsonFilePath';
+ UpdateViaJsonString = 'Az.DedicatedHsm.private\Update-AzDedicatedHsm_UpdateViaJsonString';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 {
@@ -1043,6 +1120,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/DedicatedHsm/DedicatedHsm.Autorest/exports/Remove-AzDedicatedHsm.ps1 b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Remove-AzDedicatedHsm.ps1
index c05d0fef3b7f..48e514acaefa 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Remove-AzDedicatedHsm.ps1
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Remove-AzDedicatedHsm.ps1
@@ -70,7 +70,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentity]
# 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.DedicatedHsm.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.DedicatedHsm.private\Remove-AzDedicatedHsm_Delete';
DeleteViaIdentity = 'Az.DedicatedHsm.private\Remove-AzDedicatedHsm_DeleteViaIdentity';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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/DedicatedHsm/DedicatedHsm.Autorest/exports/Update-AzDedicatedHsm.ps1 b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Update-AzDedicatedHsm.ps1
index 24d59f65809d..047b4d470e6e 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Update-AzDedicatedHsm.ps1
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/exports/Update-AzDedicatedHsm.ps1
@@ -16,9 +16,9 @@
<#
.Synopsis
-Update a dedicated HSM in the specified subscription.
+update a dedicated HSM in the specified subscription.
.Description
-Update a dedicated HSM in the specified subscription.
+update a dedicated HSM in the specified subscription.
.Example
Update-AzDedicatedHsm -Name hsm-n7wfxi -ResourceGroupName dedicatedhsm-rg-n359cz -Tag @{'key1' = '1'; 'key2' = 2; 'key3' = 3}
.Example
@@ -28,7 +28,7 @@ Update-AzDedicatedHsm -InputObject $hsm -Tag @{'key1' = '1'; 'key2' = 2; 'key3'
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm
+Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -43,22 +43,28 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dedicatedhsm/update-azdedicatedhsm
#>
function Update-AzDedicatedHsm {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[System.String]
# Name of the dedicated HSM
${Name},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[System.String]
# The name of the Resource Group to which the server belongs.
${ResourceGroupName},
[Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath')]
+ [Parameter(ParameterSetName='UpdateViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -70,16 +76,28 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPatchParametersTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPatchParametersTags]))]
[System.Collections.Hashtable]
# Resource tags
${Tag},
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -148,6 +166,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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,10 +196,10 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.DedicatedHsm.private\Update-AzDedicatedHsm_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.DedicatedHsm.private\Update-AzDedicatedHsm_UpdateViaIdentityExpanded';
+ UpdateViaJsonFilePath = 'Az.DedicatedHsm.private\Update-AzDedicatedHsm_UpdateViaJsonFilePath';
+ UpdateViaJsonString = 'Az.DedicatedHsm.private\Update-AzDedicatedHsm_UpdateViaJsonString';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 {
@@ -186,6 +213,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/DedicatedHsm/DedicatedHsm.Autorest/generate-info.json b/generated/DedicatedHsm/DedicatedHsm.Autorest/generate-info.json
index 1b580fc2742d..87b4511f88be 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generate-info.json
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generate-info.json
@@ -1,3 +1,3 @@
{
- "generate_Id": "9b738dc2-0224-405a-b1b5-6253445db24f"
+ "generate_Id": "a3a205b8-4d52-4503-a046-547ab5e817af"
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/Module.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/Module.cs
index aa5d2cbeb47c..d45ca26351f9 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/Module.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.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.DedicatedHsm.Module _instance;
+
/// the ISendAsync pipeline instance
private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.HttpPipeline _pipeline;
/// the ISendAsync pipeline instance (when proxy is enabled)
private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Module _instance;
-
/// the singleton of this module class
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Module());
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm";
@@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.HttpPipeline Crea
/// 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/DedicatedHsm/DedicatedHsm.Autorest/generated/api/DedicatedHsm.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/DedicatedHsm.cs
index 7454ec32db8f..94b32865184a 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/DedicatedHsm.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/DedicatedHsm.cs
@@ -14,21 +14,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm
public partial class DedicatedHsm
{
- /// Create or Update a dedicated HSM in the specified subscription.
- /// The name of the Resource Group to which the resource belongs.
- /// Name of the dedicated Hsm
+ /// update a dedicated HSM in the specified subscription.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the resource belongs.
+ /// Name of the dedicated Hsm
/// Parameters to create or update the dedicated hsm
/// 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.DedicatedHsm.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 DedicatedHsmCreateOrUpdate(string resourceGroupName, string name, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmCreateOrUpdate(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -55,15 +56,15 @@ public partial class DedicatedHsm
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.DedicatedHsmCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ await this.DedicatedHsmCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Create or Update a dedicated HSM in the specified subscription.
+ /// update a dedicated HSM in the specified subscription.
///
/// Parameters to create or update the dedicated hsm
/// a delegate that is called when the remote service returns 200 (OK).
@@ -71,10 +72,11 @@ public partial class DedicatedHsm
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -89,9 +91,9 @@ public partial class DedicatedHsm
}
// replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var name = _match.Groups["name"].Value;
- var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
@@ -113,203 +115,133 @@ public partial class DedicatedHsm
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.DedicatedHsmCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ await this.DedicatedHsmCreateOrUpdate_Call (request, onOk,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 default (any response code not handled
- /// elsewhere).
+ /// update a dedicated HSM in the specified subscription.
+ ///
+ /// Parameters to create or update the dedicated hsm
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmCreateOrUpdate_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm body, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeUpdate)
{
+ var apiVersion = @"2021-11-30";
+ // 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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 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.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // verify that Identity format is an exact match for uri
- // 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.DedicatedHsm.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.UndeclaredResponseException(_response);
- }
- }
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/(?[^/]+)$", 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.HardwareSecurityModules/dedicatedHSMs/{name}'");
+ }
- // 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(_originalUri))
- {
- // create a new request with the final uri
- request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Method.Get);
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var name = _match.Groups["name"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ + name
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- // drop the old response
- _response?.Dispose();
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- // make the final call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- break;
- }
- }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
+ // 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.DedicatedHsm.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsm.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
- }
- finally
- {
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
- }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.DedicatedHsmCreateOrUpdateWithResult_Call (request, eventListener,sender);
}
}
- ///
- /// Validation method for method. Call this like the actual call, but you will get
- /// validation events back.
- ///
- /// The name of the Resource Group to which the resource belongs.
- /// Name of the dedicated Hsm
+ /// update a dedicated HSM in the specified subscription.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
- /// Parameters to create or update the dedicated hsm
+ /// The name of the Resource Group to which the resource belongs.
+ /// Name of the dedicated Hsm
+ /// Json string supplied to the DedicatedHsmCreateOrUpdate 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).
/// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmCreateOrUpdate_Validate(string resourceGroupName, string name, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm body, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
+ public async global::System.Threading.Tasks.Task DedicatedHsmCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string name, 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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
+ var apiVersion = @"2021-11-30";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertNotNull(nameof(name),name);
- await eventListener.AssertRegEx(nameof(name),name,@"^[a-zA-Z0-9-]{3,24}$");
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
- await eventListener.AssertNotNull(nameof(body), body);
- await eventListener.AssertObjectIsValid(nameof(body), body);
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ + global::System.Uri.EscapeDataString(name)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DedicatedHsmCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Deletes the specified Azure Dedicated HSM.
- /// The name of the Resource Group to which the dedicated HSM belongs.
- /// The name of the dedicated HSM to delete
+ /// update a dedicated HSM in the specified subscription.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
- /// 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).
+ /// The name of the Resource Group to which the resource belongs.
+ /// Name of the dedicated Hsm
+ /// Json string supplied to the DedicatedHsmCreateOrUpdate operation
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmDelete(string resourceGroupName, string name, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string name, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -327,110 +259,103 @@ public partial class DedicatedHsm
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.DedicatedHsmDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ return await this.DedicatedHsmCreateOrUpdateWithResult_Call (request, eventListener,sender);
}
}
- /// Deletes the specified Azure Dedicated HSM.
- ///
- /// 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).
+ /// update a dedicated HSM in the specified subscription.
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the resource belongs.
+ /// Name of the dedicated Hsm
+ /// Parameters to create or update the dedicated hsm
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.
///
- public async global::System.Threading.Tasks.Task DedicatedHsmDeleteViaIdentity(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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm body, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2021-11-30";
// 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.HardwareSecurityModules/dedicatedHSMs/(?[^/]+)$", 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.HardwareSecurityModules/dedicatedHSMs/{name}'");
- }
-
- // replace URI parameters with values from identity
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var name = _match.Groups["name"].Value;
- var subscriptionId = _match.Groups["subscriptionId"].Value;
// 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.HardwareSecurityModules/dedicatedHSMs/"
- + name
+ + global::System.Uri.EscapeDataString(name)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.DedicatedHsmDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ return await this.DedicatedHsmCreateOrUpdateWithResult_Call (request, eventListener,sender);
}
}
- /// 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 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.DedicatedHsm.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.
///
- internal async global::System.Threading.Tasks.Task DedicatedHsmDelete_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task DedicatedHsmCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
// 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 )
{
-
- // 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.DedicatedHsm.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.DedicatedHsm.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"))) {
@@ -439,62 +364,61 @@ public partial class DedicatedHsm
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.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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;
- 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.DedicatedHsm.Runtime.UndeclaredResponseException(_response);
- }
- }
+
+ 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.DedicatedHsm.Runtime.UndeclaredResponseException(_response);
+ }
+ }
// check for terminal status code
if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
@@ -502,40 +426,192 @@ public partial class DedicatedHsm
continue;
}
// we are done polling, do a request on final target?
- if (!string.IsNullOrWhiteSpace(_finalUri))
+ if (!string.IsNullOrWhiteSpace(_originalUri))
{
// create a new request with the final uri
- request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Method.Get);
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
break;
}
}
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response);
- break;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsm.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
}
- case global::System.Net.HttpStatusCode.NoContent:
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Error?.Code;
+ var message = (await _result)?.Error?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.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 DedicatedHsmCreateOrUpdate_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // declared final-state-via: default
+ 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.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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(_originalUri))
+ {
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onNoContent(_response);
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsm.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -551,33 +627,38 @@ public partial class DedicatedHsm
}
///
- /// 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 Resource Group to which the dedicated HSM belongs.
- /// The name of the dedicated HSM to delete
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the resource belongs.
+ /// Name of the dedicated Hsm
+ /// Parameters to create or update the dedicated hsm
/// 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 DedicatedHsmDelete_Validate(string resourceGroupName, string name, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task DedicatedHsmCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm body, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
await eventListener.AssertNotNull(nameof(name),name);
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertRegEx(nameof(name), name, @"^[a-zA-Z0-9-]{3,24}$");
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
}
}
- /// Gets the specified Azure dedicated HSM.
- /// The name of the Resource Group to which the dedicated hsm belongs.
- /// The name of the dedicated HSM.
+ /// Deletes the specified Azure Dedicated HSM.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated HSM belongs.
+ /// The name of the dedicated HSM to delete
/// 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.
@@ -585,7 +666,7 @@ public partial class DedicatedHsm
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task DedicatedHsmGet(string resourceGroupName, string name, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmDelete(string subscriptionId, string resourceGroupName, string name, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -607,18 +688,19 @@ public partial class DedicatedHsm
// 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.DedicatedHsm.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Method.Delete, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.DedicatedHsmGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.DedicatedHsmDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender);
}
}
- /// Gets the specified Azure dedicated HSM.
+ /// Deletes the specified Azure Dedicated HSM.
///
/// 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.
@@ -626,7 +708,7 @@ public partial class DedicatedHsm
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task DedicatedHsmGetViaIdentity(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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmDeleteViaIdentity(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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -641,9 +723,9 @@ public partial class DedicatedHsm
}
// replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var name = _match.Groups["name"].Value;
- var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
@@ -660,18 +742,19 @@ public partial class DedicatedHsm
// 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.DedicatedHsm.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Method.Delete, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.DedicatedHsmGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.DedicatedHsmDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender);
}
}
- /// 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 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.
@@ -679,17 +762,114 @@ public partial class DedicatedHsm
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task DedicatedHsmGet_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task DedicatedHsmDelete_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -697,13 +877,19 @@ public partial class DedicatedHsm
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsm.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response);
+ break;
+ }
+ case global::System.Net.HttpStatusCode.NoContent:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onNoContent(_response);
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -719,35 +905,32 @@ public partial class DedicatedHsm
}
///
- /// Validation method for method. Call this like the actual call, but you will get validation
+ /// Validation method for method. Call this like the actual call, but you will get validation
/// events back.
///
- /// The name of the Resource Group to which the dedicated hsm belongs.
- /// The name of the dedicated HSM.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated HSM belongs.
+ /// The name of the dedicated HSM to delete
/// 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 DedicatedHsmGet_Validate(string resourceGroupName, string name, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task DedicatedHsmDelete_Validate(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
await eventListener.AssertNotNull(nameof(name),name);
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
}
}
- ///
- /// The List operation gets information about the dedicated hsms associated with the subscription and within the specified
- /// resource group.
- ///
- /// The name of the Resource Group to which the dedicated HSM belongs.
- /// Maximum number of results to return.
+ /// Gets the specified Azure dedicated HSM.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated hsm belongs.
+ /// The name of the dedicated HSM.
/// 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).
@@ -756,7 +939,7 @@ public partial class DedicatedHsm
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task DedicatedHsmListByResourceGroup(string resourceGroupName, int? Top, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmGet(string subscriptionId, string resourceGroupName, string name, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -768,10 +951,9 @@ public partial class DedicatedHsm
+ global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
+ global::System.Uri.EscapeDataString(resourceGroupName)
- + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs"
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ + global::System.Uri.EscapeDataString(name)
+ "?"
- + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
- + "&"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -784,16 +966,12 @@ public partial class DedicatedHsm
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.DedicatedHsmListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ await this.DedicatedHsmGet_Call (request, onOk,onDefault,eventListener,sender);
}
}
- ///
- /// The List operation gets information about the dedicated hsms associated with the subscription and within the specified
- /// resource group.
- ///
+ /// Gets the specified Azure dedicated HSM.
///
- /// Maximum number of results to return.
/// 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).
@@ -802,7 +980,7 @@ public partial class DedicatedHsm
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task DedicatedHsmListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmGetViaIdentity(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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -810,25 +988,25 @@ public partial class DedicatedHsm
{
// verify that Identity format is an exact match for uri
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/(?[^/]+)$", 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.HardwareSecurityModules/dedicatedHSMs'");
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/{name}'");
}
// replace URI parameters with values from identity
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var name = _match.Groups["name"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
- + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs"
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ + name
+ "?"
- + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
- + "&"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -841,45 +1019,862 @@ public partial class DedicatedHsm
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.DedicatedHsmListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ await this.DedicatedHsmGet_Call (request, onOk,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 default (any response code not handled
- /// elsewhere).
+ /// Gets the specified Azure dedicated HSM.
+ ///
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.
///
- internal async global::System.Threading.Tasks.Task DedicatedHsmListByResourceGroup_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
+ var apiVersion = @"2021-11-30";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
{
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/{name}'");
+ }
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var name = _match.Groups["name"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ + name
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.DedicatedHsmGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Gets the specified Azure dedicated HSM.
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated hsm belongs.
+ /// The name of the dedicated HSM.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmGetWithResult(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // 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.HardwareSecurityModules/dedicatedHSMs/"
+ + global::System.Uri.EscapeDataString(name)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.DedicatedHsmGetWithResult_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.DedicatedHsm.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 DedicatedHsmGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsm.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Error?.Code;
+ var message = (await _result)?.Error?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.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 DedicatedHsmGet_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsm.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated hsm belongs.
+ /// The name of the dedicated HSM.
+ /// 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 DedicatedHsmGet_Validate(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(name),name);
+ }
+ }
+
+ ///
+ /// The List operation gets information about the dedicated hsms associated with the subscription and within the specified
+ /// resource group.
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated HSM belongs.
+ /// Maximum number of results to return.
+ /// 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.DedicatedHsm.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 DedicatedHsmListByResourceGroup(string subscriptionId, string resourceGroupName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // 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.HardwareSecurityModules/dedicatedHSMs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DedicatedHsmListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// The List operation gets information about the dedicated hsms associated with the subscription and within the specified
+ /// resource group.
+ ///
+ ///
+ /// Maximum number of results to return.
+ /// 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.DedicatedHsm.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 DedicatedHsmListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // 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.HardwareSecurityModules/dedicatedHSMs$", 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.HardwareSecurityModules/dedicatedHSMs'");
+ }
+
+ // 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/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DedicatedHsmListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// The List operation gets information about the dedicated hsms associated with the subscription and within the specified
+ /// resource group.
+ ///
+ ///
+ /// Maximum number of results to return.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // 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.HardwareSecurityModules/dedicatedHSMs$", 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.HardwareSecurityModules/dedicatedHSMs'");
+ }
+
+ // 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/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.DedicatedHsmListByResourceGroupWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// The List operation gets information about the dedicated hsms associated with the subscription and within the specified
+ /// resource group.
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated HSM belongs.
+ /// Maximum number of results to return.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // 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.HardwareSecurityModules/dedicatedHSMs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.DedicatedHsmListByResourceGroupWithResult_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.DedicatedHsm.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 DedicatedHsmListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Error?.Code;
+ var message = (await _result)?.Error?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.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 DedicatedHsmListByResourceGroup_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated HSM belongs.
+ /// Maximum number of results to return.
+ /// 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 DedicatedHsmListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ }
+ }
+
+ ///
+ /// The List operation gets information about the dedicated HSMs associated with the subscription.
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// Maximum number of results to return.
+ /// 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.DedicatedHsm.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 DedicatedHsmListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DedicatedHsmListBySubscription_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// The List operation gets information about the dedicated HSMs associated with the subscription.
+ ///
+ ///
+ /// Maximum number of results to return.
+ /// 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.DedicatedHsm.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 DedicatedHsmListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // 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.HardwareSecurityModules/dedicatedHSMs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs'");
+ }
+
+ // 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.HardwareSecurityModules/dedicatedHSMs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DedicatedHsmListBySubscription_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// The List operation gets information about the dedicated HSMs associated with the subscription.
+ ///
+ ///
+ /// Maximum number of results to return.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // 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.HardwareSecurityModules/dedicatedHSMs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs'");
+ }
+
+ // 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.HardwareSecurityModules/dedicatedHSMs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.DedicatedHsmListBySubscriptionWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// The List operation gets information about the dedicated HSMs associated with the subscription.
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// Maximum number of results to return.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmListBySubscriptionWithResult(string subscriptionId, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs"
+ + "?"
+ + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
+ + "&"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.DedicatedHsmListBySubscriptionWithResult_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.DedicatedHsm.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 DedicatedHsmListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Error?.Code;
+ var message = (await _result)?.Error?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.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 DedicatedHsmListBySubscription_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -895,124 +1890,295 @@ public partial class DedicatedHsm
}
///
- /// Validation method for method. Call this like the actual call, but you will
+ /// Validation method for method. Call this like the actual call, but you will
/// get validation events back.
///
- /// The name of the Resource Group to which the dedicated HSM belongs.
- /// Maximum number of results to return.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
+ /// Maximum number of results to return.
/// 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 DedicatedHsmListByResourceGroup_Validate(string resourceGroupName, int? Top, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task DedicatedHsmListBySubscription_Validate(string subscriptionId, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
}
}
///
- /// The List operation gets information about the dedicated HSMs associated with the subscription.
+ /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm resource.
+ /// The operation returns properties of each egress endpoint.
+ ///
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated hsm belongs.
+ /// The name of the dedicated HSM.
+ /// 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.DedicatedHsm.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 DedicatedHsmListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string name, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // 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.HardwareSecurityModules/dedicatedHSMs/"
+ + global::System.Uri.EscapeDataString(name)
+ + "/outboundNetworkDependenciesEndpoints"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DedicatedHsmListOutboundNetworkDependenciesEndpoints_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm resource.
+ /// The operation returns properties of each egress endpoint.
+ ///
+ ///
+ /// 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.DedicatedHsm.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 DedicatedHsmListOutboundNetworkDependenciesEndpointsViaIdentity(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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // 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.HardwareSecurityModules/dedicatedHSMs/(?[^/]+)/outboundNetworkDependenciesEndpoints$", 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.HardwareSecurityModules/dedicatedHSMs/{name}/outboundNetworkDependenciesEndpoints'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var name = _match.Groups["name"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ + name
+ + "/outboundNetworkDependenciesEndpoints"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DedicatedHsmListOutboundNetworkDependenciesEndpoints_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm resource.
+ /// The operation returns properties of each egress endpoint.
///
- /// Maximum number of results to return.
- /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
- /// ID forms part of the URI for every service call.
- /// 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.DedicatedHsm.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 DedicatedHsmListBySubscription(int? Top, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmListOutboundNetworkDependenciesEndpointsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-11-30";
// 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.HardwareSecurityModules/dedicatedHSMs/(?[^/]+)/outboundNetworkDependenciesEndpoints$", 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.HardwareSecurityModules/dedicatedHSMs/{name}/outboundNetworkDependenciesEndpoints'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var name = _match.Groups["name"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + global::System.Uri.EscapeDataString(subscriptionId)
- + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ + name
+ + "/outboundNetworkDependenciesEndpoints"
+ "?"
- + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
- + "&"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.DedicatedHsmListBySubscription_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.DedicatedHsmListOutboundNetworkDependenciesEndpointsWithResult_Call (request, eventListener,sender);
}
}
///
- /// The List operation gets information about the dedicated HSMs associated with the subscription.
+ /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm resource.
+ /// The operation returns properties of each egress endpoint.
///
- ///
- /// Maximum number of results to return.
- /// 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).
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated hsm belongs.
+ /// The name of the dedicated HSM.
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmListOutboundNetworkDependenciesEndpointsWithResult(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-11-30";
// 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.HardwareSecurityModules/dedicatedHSMs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
- {
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs'");
- }
-
- // 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.HardwareSecurityModules/dedicatedHSMs"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ + global::System.Uri.EscapeDataString(name)
+ + "/outboundNetworkDependenciesEndpoints"
+ "?"
- + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString()))
- + "&"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.DedicatedHsmListBySubscription_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.DedicatedHsmListOutboundNetworkDependenciesEndpointsWithResult_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.DedicatedHsm.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 DedicatedHsmListOutboundNetworkDependenciesEndpointsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.OutboundEnvironmentEndpointCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Error?.Code;
+ var message = (await _result)?.Error?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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
@@ -1022,7 +2188,7 @@ public partial class DedicatedHsm
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task DedicatedHsmListBySubscription_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task DedicatedHsmListOutboundNetworkDependenciesEndpoints_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -1033,6 +2199,7 @@ public partial class DedicatedHsm
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1040,13 +2207,13 @@ public partial class DedicatedHsm
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.OutboundEnvironmentEndpointCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -1062,41 +2229,43 @@ public partial class DedicatedHsm
}
///
- /// 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.
///
- /// Maximum number of results to return.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the dedicated hsm belongs.
+ /// The name of the dedicated HSM.
/// 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 DedicatedHsmListBySubscription_Validate(int? Top, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task DedicatedHsmListOutboundNetworkDependenciesEndpoints_Validate(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertNotNull(nameof(name),name);
}
}
- ///
- /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm resource.
- /// The operation returns properties of each egress endpoint.
- ///
- /// The name of the Resource Group to which the dedicated hsm belongs.
- /// The name of the dedicated HSM.
+ /// update a dedicated HSM in the specified subscription.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the server belongs.
+ /// Name of the dedicated HSM
+ /// Parameters to patch the dedicated HSM
/// 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.DedicatedHsm.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 DedicatedHsmListOutboundNetworkDependenciesEndpoints(string resourceGroupName, string name, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmUpdate(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPatchParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -1110,7 +2279,6 @@ public partial class DedicatedHsm
+ global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ global::System.Uri.EscapeDataString(name)
- + "/outboundNetworkDependenciesEndpoints"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -1119,29 +2287,32 @@ public partial class DedicatedHsm
// 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.DedicatedHsm.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Method.Patch, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.DedicatedHsmListOutboundNetworkDependenciesEndpoints_Call(request,onOk,onDefault,eventListener,sender);
+ await this.DedicatedHsmUpdate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- ///
- /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm resource.
- /// The operation returns properties of each egress endpoint.
- ///
+ /// update a dedicated HSM in the specified subscription.
///
+ /// Parameters to patch the dedicated HSM
/// 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.DedicatedHsm.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 DedicatedHsmListOutboundNetworkDependenciesEndpointsViaIdentity(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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPatchParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -1149,16 +2320,16 @@ public partial class DedicatedHsm
{
// verify that Identity format is an exact match for uri
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/(?[^/]+)/outboundNetworkDependenciesEndpoints$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/(?[^/]+)$", 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.HardwareSecurityModules/dedicatedHSMs/{name}/outboundNetworkDependenciesEndpoints'");
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/{name}'");
}
// replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var name = _match.Groups["name"].Value;
- var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
@@ -1167,7 +2338,6 @@ public partial class DedicatedHsm
+ resourceGroupName
+ "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ name
- + "/outboundNetworkDependenciesEndpoints"
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -1176,103 +2346,138 @@ public partial class DedicatedHsm
// 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.DedicatedHsm.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Method.Patch, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.DedicatedHsmListOutboundNetworkDependenciesEndpoints_Call(request,onOk,onDefault,eventListener,sender);
+ await this.DedicatedHsmUpdate_Call (request, onOk,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 default (any response code not handled
- /// elsewhere).
+ /// update a dedicated HSM in the specified subscription.
+ ///
+ /// Parameters to patch the dedicated HSM
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmListOutboundNetworkDependenciesEndpoints_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPatchParameters body, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeUpdate)
{
+ var apiVersion = @"2021-11-30";
+ // 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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.OutboundEnvironmentEndpointCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
- }
- finally
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
{
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/{name}'");
}
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var name = _match.Groups["name"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ + name
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.DedicatedHsmUpdateWithResult_Call (request, eventListener,sender);
}
}
- ///
- /// Validation method for method. Call this like the actual
- /// call, but you will get validation events back.
- ///
- /// The name of the Resource Group to which the dedicated hsm belongs.
- /// The name of the dedicated HSM.
+ /// update a dedicated HSM in the specified subscription.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the server belongs.
+ /// Name of the dedicated HSM
+ /// Json string supplied to the DedicatedHsmUpdate 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).
/// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmListOutboundNetworkDependenciesEndpoints_Validate(string resourceGroupName, string name, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
+ public async global::System.Threading.Tasks.Task DedicatedHsmUpdateViaJsonString(string subscriptionId, string resourceGroupName, string name, 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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
+ var apiVersion = @"2021-11-30";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertNotNull(nameof(name),name);
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/"
+ + global::System.Uri.EscapeDataString(name)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DedicatedHsmUpdate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Update a dedicated HSM in the specified subscription.
- /// The name of the Resource Group to which the server belongs.
- /// Name of the dedicated HSM
+ /// update a dedicated HSM in the specified subscription.
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
- /// Parameters to patch the dedicated HSM
- /// 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).
+ /// The name of the Resource Group to which the server belongs.
+ /// Name of the dedicated HSM
+ /// Json string supplied to the DedicatedHsmUpdate operation
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 DedicatedHsmUpdate(string resourceGroupName, string name, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPatchParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string name, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -1290,82 +2495,227 @@ public partial class DedicatedHsm
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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(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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.DedicatedHsmUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.DedicatedHsmUpdateWithResult_Call (request, eventListener,sender);
}
}
- /// Update a dedicated HSM in the specified subscription.
- ///
+ /// update a dedicated HSM in the specified subscription.
+ /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
+ /// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the server belongs.
+ /// Name of the dedicated HSM
/// Parameters to patch the dedicated HSM
- /// 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.DedicatedHsm.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.
///
- public async global::System.Threading.Tasks.Task DedicatedHsmUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPatchParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task DedicatedHsmUpdateWithResult(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPatchParameters body, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2021-11-30";
// 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.HardwareSecurityModules/dedicatedHSMs/(?[^/]+)$", 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.HardwareSecurityModules/dedicatedHSMs/{name}'");
- }
-
- // replace URI parameters with values from identity
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var name = _match.Groups["name"].Value;
- var subscriptionId = _match.Groups["subscriptionId"].Value;
// 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.HardwareSecurityModules/dedicatedHSMs/"
- + name
+ + global::System.Uri.EscapeDataString(name)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.DedicatedHsmUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.DedicatedHsmUpdateWithResult_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.DedicatedHsm.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 DedicatedHsmUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // declared final-state-via: default
+ 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.DedicatedHsm.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"))) {
+ 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.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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(_originalUri))
+ {
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ break;
+ }
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsm.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Error?.Code;
+ var message = (await _result)?.Error?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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
@@ -1375,31 +2725,28 @@ public partial class DedicatedHsm
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task DedicatedHsmUpdate_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task DedicatedHsmUpdate_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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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 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.DedicatedHsm.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.DedicatedHsm.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"))) {
@@ -1408,15 +2755,14 @@ public partial class DedicatedHsm
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.DedicatedHsm.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();
@@ -1425,45 +2771,45 @@ public partial class DedicatedHsm
_response = await sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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;
+ // 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.DedicatedHsm.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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;
- 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.DedicatedHsm.Runtime.UndeclaredResponseException(_response);
- }
- }
+
+ 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.DedicatedHsm.Runtime.UndeclaredResponseException(_response);
+ }
+ }
// check for terminal status code
if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
@@ -1485,6 +2831,7 @@ public partial class DedicatedHsm
break;
}
}
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1492,13 +2839,13 @@ public partial class DedicatedHsm
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsm.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsm.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -1517,23 +2864,23 @@ public partial class DedicatedHsm
/// Validation method for method. Call this like the actual call, but you will get validation
/// events back.
///
- /// The name of the Resource Group to which the server belongs.
- /// Name of the dedicated HSM
/// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription
/// ID forms part of the URI for every service call.
+ /// The name of the Resource Group to which the server belongs.
+ /// Name of the dedicated HSM
/// Parameters to patch the dedicated HSM
/// 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 DedicatedHsmUpdate_Validate(string resourceGroupName, string name, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPatchParameters body, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task DedicatedHsmUpdate_Validate(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPatchParameters body, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
await eventListener.AssertNotNull(nameof(name),name);
- await eventListener.AssertRegEx(nameof(name),name,@"^[a-zA-Z0-9-]{3,24}$");
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertRegEx(nameof(name), name, @"^[a-zA-Z0-9-]{3,24}$");
await eventListener.AssertNotNull(nameof(body), body);
await eventListener.AssertObjectIsValid(nameof(body), body);
}
@@ -1548,7 +2895,7 @@ public partial class DedicatedHsm
///
/// 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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -1570,7 +2917,7 @@ public partial class DedicatedHsm
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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);
}
}
@@ -1584,7 +2931,7 @@ public partial class DedicatedHsm
///
/// 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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
var apiVersion = @"2021-11-30";
// Constant Parameters
@@ -1615,11 +2962,147 @@ public partial class DedicatedHsm
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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);
+ }
+ }
+
+ /// Get a list of Dedicated HSM operations.
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.HardwareSecurityModules/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.HardwareSecurityModules/operations'");
+ }
+
+ // replace URI parameters with values from identity
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.HardwareSecurityModules/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.OperationsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Get a list of Dedicated HSM operations.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2021-11-30";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.HardwareSecurityModules/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Error?.Code;
+ var message = (await _result)?.Error?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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
@@ -1629,7 +3112,7 @@ public partial class DedicatedHsm
///
/// 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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -1640,6 +3123,7 @@ public partial class DedicatedHsm
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1647,13 +3131,13 @@ public partial class DedicatedHsm
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmOperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.PowerShell.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.PowerShell.cs
deleted file mode 100644
index d75ce166e969..000000000000
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.PowerShell.cs
+++ /dev/null
@@ -1,352 +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.DedicatedHsm.Models.Api20211130
-{
- using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.PowerShell;
-
- /// Resource information with extended details.
- [System.ComponentModel.TypeConverter(typeof(DedicatedHsmTypeConverter))]
- public partial class DedicatedHsm
- {
-
- ///
- /// 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 a new instance of .
- ///
- /// The global::System.Collections.IDictionary content that should be used.
- internal DedicatedHsm(global::System.Collections.IDictionary content)
- {
- bool returnNow = false;
- BeforeDeserializeDictionary(content, ref returnNow);
- if (returnNow)
- {
- return;
- }
- // actually deserialize
- if (content.Contains("SystemData"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.SystemDataTypeConverter.ConvertFrom);
- }
- if (content.Contains("Property"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmPropertiesTypeConverter.ConvertFrom);
- }
- if (content.Contains("SkuName"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.SkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.SkuName.CreateFrom);
- }
- if (content.Contains("Sku"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.SkuTypeConverter.ConvertFrom);
- }
- if (content.Contains("Id"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Id, global::System.Convert.ToString);
- }
- if (content.Contains("Name"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Name, global::System.Convert.ToString);
- }
- if (content.Contains("Type"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Type, global::System.Convert.ToString);
- }
- if (content.Contains("Location"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Location, global::System.Convert.ToString);
- }
- if (content.Contains("Zone"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString));
- }
- if (content.Contains("Tag"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ResourceTagsTypeConverter.ConvertFrom);
- }
- if (content.Contains("SystemDataCreatedBy"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
- }
- if (content.Contains("SystemDataCreatedAt"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)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("NetworkProfile"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkProfileTypeConverter.ConvertFrom);
- }
- if (content.Contains("SystemDataCreatedByType"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType.CreateFrom);
- }
- if (content.Contains("SystemDataLastModifiedBy"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
- }
- if (content.Contains("SystemDataLastModifiedByType"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType.CreateFrom);
- }
- if (content.Contains("SystemDataLastModifiedAt"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)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("ManagementNetworkProfile"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile) content.GetValueForProperty("ManagementNetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkProfileTypeConverter.ConvertFrom);
- }
- if (content.Contains("StampId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).StampId = (string) content.GetValueForProperty("StampId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).StampId, global::System.Convert.ToString);
- }
- if (content.Contains("StatusMessage"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).StatusMessage = (string) content.GetValueForProperty("StatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).StatusMessage, global::System.Convert.ToString);
- }
- if (content.Contains("ProvisioningState"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType.CreateFrom);
- }
- if (content.Contains("NetworkProfileNetworkInterface"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileNetworkInterface = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]) content.GetValueForProperty("NetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkInterfaceTypeConverter.ConvertFrom));
- }
- if (content.Contains("NetworkProfileSubnet"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference) content.GetValueForProperty("NetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ApiEntityReferenceTypeConverter.ConvertFrom);
- }
- if (content.Contains("ManagementNetworkProfileSubnet"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference) content.GetValueForProperty("ManagementNetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ApiEntityReferenceTypeConverter.ConvertFrom);
- }
- if (content.Contains("ManagementNetworkProfileNetworkInterface"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileNetworkInterface = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]) content.GetValueForProperty("ManagementNetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkInterfaceTypeConverter.ConvertFrom));
- }
- if (content.Contains("NetworkProfileSubnetId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileSubnetId = (string) content.GetValueForProperty("NetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileSubnetId, global::System.Convert.ToString);
- }
- if (content.Contains("ManagementNetworkProfileSubnetId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnetId = (string) content.GetValueForProperty("ManagementNetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnetId, 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 DedicatedHsm(global::System.Management.Automation.PSObject content)
- {
- bool returnNow = false;
- BeforeDeserializePSObject(content, ref returnNow);
- if (returnNow)
- {
- return;
- }
- // actually deserialize
- if (content.Contains("SystemData"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.SystemDataTypeConverter.ConvertFrom);
- }
- if (content.Contains("Property"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmPropertiesTypeConverter.ConvertFrom);
- }
- if (content.Contains("SkuName"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.SkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.SkuName.CreateFrom);
- }
- if (content.Contains("Sku"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.SkuTypeConverter.ConvertFrom);
- }
- if (content.Contains("Id"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Id, global::System.Convert.ToString);
- }
- if (content.Contains("Name"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Name, global::System.Convert.ToString);
- }
- if (content.Contains("Type"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Type, global::System.Convert.ToString);
- }
- if (content.Contains("Location"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Location, global::System.Convert.ToString);
- }
- if (content.Contains("Zone"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString));
- }
- if (content.Contains("Tag"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ResourceTagsTypeConverter.ConvertFrom);
- }
- if (content.Contains("SystemDataCreatedBy"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
- }
- if (content.Contains("SystemDataCreatedAt"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)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("NetworkProfile"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkProfileTypeConverter.ConvertFrom);
- }
- if (content.Contains("SystemDataCreatedByType"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType.CreateFrom);
- }
- if (content.Contains("SystemDataLastModifiedBy"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
- }
- if (content.Contains("SystemDataLastModifiedByType"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType.CreateFrom);
- }
- if (content.Contains("SystemDataLastModifiedAt"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)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("ManagementNetworkProfile"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile) content.GetValueForProperty("ManagementNetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkProfileTypeConverter.ConvertFrom);
- }
- if (content.Contains("StampId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).StampId = (string) content.GetValueForProperty("StampId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).StampId, global::System.Convert.ToString);
- }
- if (content.Contains("StatusMessage"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).StatusMessage = (string) content.GetValueForProperty("StatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).StatusMessage, global::System.Convert.ToString);
- }
- if (content.Contains("ProvisioningState"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType.CreateFrom);
- }
- if (content.Contains("NetworkProfileNetworkInterface"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileNetworkInterface = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]) content.GetValueForProperty("NetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkInterfaceTypeConverter.ConvertFrom));
- }
- if (content.Contains("NetworkProfileSubnet"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference) content.GetValueForProperty("NetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ApiEntityReferenceTypeConverter.ConvertFrom);
- }
- if (content.Contains("ManagementNetworkProfileSubnet"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference) content.GetValueForProperty("ManagementNetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ApiEntityReferenceTypeConverter.ConvertFrom);
- }
- if (content.Contains("ManagementNetworkProfileNetworkInterface"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileNetworkInterface = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]) content.GetValueForProperty("ManagementNetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkInterfaceTypeConverter.ConvertFrom));
- }
- if (content.Contains("NetworkProfileSubnetId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileSubnetId = (string) content.GetValueForProperty("NetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).NetworkProfileSubnetId, global::System.Convert.ToString);
- }
- if (content.Contains("ManagementNetworkProfileSubnetId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnetId = (string) content.GetValueForProperty("ManagementNetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnetId, global::System.Convert.ToString);
- }
- AfterDeserializePSObject(content);
- }
-
- ///
- /// 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.DedicatedHsm.Models.Api20211130.IDedicatedHsm DeserializeFromDictionary(global::System.Collections.IDictionary content)
- {
- return new DedicatedHsm(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.DedicatedHsm.Models.Api20211130.IDedicatedHsm DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
- {
- return new DedicatedHsm(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.DedicatedHsm.Models.Api20211130.IDedicatedHsm FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.SerializationMode.IncludeAll)?.ToString();
- }
- /// Resource information with extended details.
- [System.ComponentModel.TypeConverter(typeof(DedicatedHsmTypeConverter))]
- public partial interface IDedicatedHsm
-
- {
-
- }
-}
\ No newline at end of file
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmProperties.PowerShell.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmProperties.PowerShell.cs
deleted file mode 100644
index db9f6845f78d..000000000000
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmProperties.PowerShell.cs
+++ /dev/null
@@ -1,226 +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.DedicatedHsm.Models.Api20211130
-{
- using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.PowerShell;
-
- /// Properties of the dedicated hsm
- [System.ComponentModel.TypeConverter(typeof(DedicatedHsmPropertiesTypeConverter))]
- public partial class DedicatedHsmProperties
- {
-
- ///
- /// 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 a new instance of .
- ///
- /// The global::System.Collections.IDictionary content that should be used.
- internal DedicatedHsmProperties(global::System.Collections.IDictionary content)
- {
- bool returnNow = false;
- BeforeDeserializeDictionary(content, ref returnNow);
- if (returnNow)
- {
- return;
- }
- // actually deserialize
- if (content.Contains("NetworkProfile"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkProfileTypeConverter.ConvertFrom);
- }
- if (content.Contains("ManagementNetworkProfile"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile) content.GetValueForProperty("ManagementNetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkProfileTypeConverter.ConvertFrom);
- }
- if (content.Contains("StampId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).StampId = (string) content.GetValueForProperty("StampId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).StampId, global::System.Convert.ToString);
- }
- if (content.Contains("StatusMessage"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).StatusMessage = (string) content.GetValueForProperty("StatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).StatusMessage, global::System.Convert.ToString);
- }
- if (content.Contains("ProvisioningState"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType.CreateFrom);
- }
- if (content.Contains("NetworkProfileNetworkInterface"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileNetworkInterface = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]) content.GetValueForProperty("NetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkInterfaceTypeConverter.ConvertFrom));
- }
- if (content.Contains("NetworkProfileSubnet"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference) content.GetValueForProperty("NetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ApiEntityReferenceTypeConverter.ConvertFrom);
- }
- if (content.Contains("ManagementNetworkProfileSubnet"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference) content.GetValueForProperty("ManagementNetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ApiEntityReferenceTypeConverter.ConvertFrom);
- }
- if (content.Contains("ManagementNetworkProfileNetworkInterface"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileNetworkInterface = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]) content.GetValueForProperty("ManagementNetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkInterfaceTypeConverter.ConvertFrom));
- }
- if (content.Contains("NetworkProfileSubnetId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileSubnetId = (string) content.GetValueForProperty("NetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileSubnetId, global::System.Convert.ToString);
- }
- if (content.Contains("ManagementNetworkProfileSubnetId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileSubnetId = (string) content.GetValueForProperty("ManagementNetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileSubnetId, 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 DedicatedHsmProperties(global::System.Management.Automation.PSObject content)
- {
- bool returnNow = false;
- BeforeDeserializePSObject(content, ref returnNow);
- if (returnNow)
- {
- return;
- }
- // actually deserialize
- if (content.Contains("NetworkProfile"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkProfileTypeConverter.ConvertFrom);
- }
- if (content.Contains("ManagementNetworkProfile"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile) content.GetValueForProperty("ManagementNetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkProfileTypeConverter.ConvertFrom);
- }
- if (content.Contains("StampId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).StampId = (string) content.GetValueForProperty("StampId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).StampId, global::System.Convert.ToString);
- }
- if (content.Contains("StatusMessage"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).StatusMessage = (string) content.GetValueForProperty("StatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).StatusMessage, global::System.Convert.ToString);
- }
- if (content.Contains("ProvisioningState"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType.CreateFrom);
- }
- if (content.Contains("NetworkProfileNetworkInterface"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileNetworkInterface = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]) content.GetValueForProperty("NetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkInterfaceTypeConverter.ConvertFrom));
- }
- if (content.Contains("NetworkProfileSubnet"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference) content.GetValueForProperty("NetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ApiEntityReferenceTypeConverter.ConvertFrom);
- }
- if (content.Contains("ManagementNetworkProfileSubnet"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference) content.GetValueForProperty("ManagementNetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ApiEntityReferenceTypeConverter.ConvertFrom);
- }
- if (content.Contains("ManagementNetworkProfileNetworkInterface"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileNetworkInterface = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[]) content.GetValueForProperty("ManagementNetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.NetworkInterfaceTypeConverter.ConvertFrom));
- }
- if (content.Contains("NetworkProfileSubnetId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileSubnetId = (string) content.GetValueForProperty("NetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).NetworkProfileSubnetId, global::System.Convert.ToString);
- }
- if (content.Contains("ManagementNetworkProfileSubnetId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileSubnetId = (string) content.GetValueForProperty("ManagementNetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)this).ManagementNetworkProfileSubnetId, global::System.Convert.ToString);
- }
- AfterDeserializePSObject(content);
- }
-
- ///
- /// 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.DedicatedHsm.Models.Api20211130.IDedicatedHsmProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
- {
- return new DedicatedHsmProperties(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.DedicatedHsm.Models.Api20211130.IDedicatedHsmProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
- {
- return new DedicatedHsmProperties(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.DedicatedHsm.Models.Api20211130.IDedicatedHsmProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Runtime.SerializationMode.IncludeAll)?.ToString();
- }
- /// Properties of the dedicated hsm
- [System.ComponentModel.TypeConverter(typeof(DedicatedHsmPropertiesTypeConverter))]
- public partial interface IDedicatedHsmProperties
-
- {
-
- }
-}
\ No newline at end of file
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.PowerShell.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.PowerShell.cs
similarity index 77%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.PowerShell.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.PowerShell.cs
index 645cc425850c..f00c1c5445b8 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.PowerShell.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.PowerShell;
@@ -55,7 +55,15 @@ public partial class ApiEntityReference
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,13 +78,13 @@ internal ApiEntityReference(global::System.Collections.IDictionary content)
// actually deserialize
if (content.Contains("Id"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReferenceInternal)this).Id, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReferenceInternal)this).Id, 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.
@@ -91,33 +99,33 @@ internal ApiEntityReference(global::System.Management.Automation.PSObject conten
// actually deserialize
if (content.Contains("Id"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReferenceInternal)this).Id, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReferenceInternal)this).Id, 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.DedicatedHsm.Models.Api20211130.IApiEntityReference DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference DeserializeFromDictionary(global::System.Collections.IDictionary content)
{
return new ApiEntityReference(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.DedicatedHsm.Models.Api20211130.IApiEntityReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
{
return new ApiEntityReference(content);
}
@@ -127,12 +135,24 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130
///
/// a string containing a JSON serialized instance of this model.
/// an instance of the model class.
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(jsonText));
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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 API entity reference.
[System.ComponentModel.TypeConverter(typeof(ApiEntityReferenceTypeConverter))]
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.TypeConverter.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.TypeConverter.cs
similarity index 97%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.TypeConverter.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.TypeConverter.cs
index 1d2835578a2b..b25e414c0ec9 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.TypeConverter.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Models.Api20211130.IApiEntityReference ConvertFrom(dynamic sourceValue)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference ConvertFrom(dynamic sourceValue)
{
if (null == sourceValue)
{
return null;
}
global::System.Type type = sourceValue.GetType();
- if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference).IsAssignableFrom(type))
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference).IsAssignableFrom(type))
{
return sourceValue;
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.cs
similarity index 90%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.cs
index 31ab5a400e06..7ea6bf48ce1b 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
/// The API entity reference.
public partial class ApiEntityReference :
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference,
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReferenceInternal
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference,
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReferenceInternal
{
/// Backing field for property.
@@ -38,6 +38,9 @@ public partial interface IApiEntityReference :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...",
SerializedName = @"id",
PossibleTypes = new [] { typeof(string) })]
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.json.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.json.cs
similarity index 95%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.json.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.json.cs
index 8b11c7faa112..222665a6ec57 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/ApiEntityReference.json.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/ApiEntityReference.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
@@ -65,18 +65,18 @@ internal ApiEntityReference(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runt
{
return;
}
- {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;}
AfterFromJson(json);
}
///
- /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference.
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference.
///
/// a to deserialize from.
///
- /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode node)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode node)
{
return node is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonObject json ? new ApiEntityReference(json) : null;
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.PowerShell.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.PowerShell.cs
new file mode 100644
index 000000000000..98d4ac1848b5
--- /dev/null
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.PowerShell.cs
@@ -0,0 +1,372 @@
+// 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.DedicatedHsm.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.PowerShell;
+
+ /// Resource information with extended details.
+ [System.ComponentModel.TypeConverter(typeof(DedicatedHsmTypeConverter))]
+ public partial class DedicatedHsm
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.
+ internal DedicatedHsm(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SkuName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).SkuName, global::System.Convert.ToString);
+ }
+ if (content.Contains("Sku"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.SkuTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("Zone"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Zone = (System.Collections.Generic.List) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Zone, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString));
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)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("NetworkProfile"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.NetworkProfileTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataCreatedByType, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)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("ManagementNetworkProfile"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkProfile) content.GetValueForProperty("ManagementNetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.NetworkProfileTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("StampId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).StampId = (string) content.GetValueForProperty("StampId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).StampId, global::System.Convert.ToString);
+ }
+ if (content.Contains("StatusMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).StatusMessage = (string) content.GetValueForProperty("StatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).StatusMessage, global::System.Convert.ToString);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("NetworkProfileNetworkInterface"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileNetworkInterface = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.NetworkInterfaceTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NetworkProfileSubnet"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference) content.GetValueForProperty("NetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ApiEntityReferenceTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ManagementNetworkProfileSubnet"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference) content.GetValueForProperty("ManagementNetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ApiEntityReferenceTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ManagementNetworkProfileNetworkInterface"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileNetworkInterface = (System.Collections.Generic.List) content.GetValueForProperty("ManagementNetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.NetworkInterfaceTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NetworkProfileSubnetId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileSubnetId = (string) content.GetValueForProperty("NetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileSubnetId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ManagementNetworkProfileSubnetId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnetId = (string) content.GetValueForProperty("ManagementNetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnetId, 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 DedicatedHsm(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SkuName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).SkuName, global::System.Convert.ToString);
+ }
+ if (content.Contains("Sku"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.SkuTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("Zone"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Zone = (System.Collections.Generic.List) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Zone, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString));
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)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("NetworkProfile"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.NetworkProfileTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataCreatedByType, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)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("ManagementNetworkProfile"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkProfile) content.GetValueForProperty("ManagementNetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.NetworkProfileTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("StampId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).StampId = (string) content.GetValueForProperty("StampId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).StampId, global::System.Convert.ToString);
+ }
+ if (content.Contains("StatusMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).StatusMessage = (string) content.GetValueForProperty("StatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).StatusMessage, global::System.Convert.ToString);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("NetworkProfileNetworkInterface"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileNetworkInterface = (System.Collections.Generic.List) content.GetValueForProperty("NetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.NetworkInterfaceTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NetworkProfileSubnet"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference) content.GetValueForProperty("NetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ApiEntityReferenceTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ManagementNetworkProfileSubnet"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnet = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference) content.GetValueForProperty("ManagementNetworkProfileSubnet",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnet, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ApiEntityReferenceTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ManagementNetworkProfileNetworkInterface"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileNetworkInterface = (System.Collections.Generic.List) content.GetValueForProperty("ManagementNetworkProfileNetworkInterface",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileNetworkInterface, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.NetworkInterfaceTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NetworkProfileSubnetId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileSubnetId = (string) content.GetValueForProperty("NetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).NetworkProfileSubnetId, global::System.Convert.ToString);
+ }
+ if (content.Contains("ManagementNetworkProfileSubnetId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnetId = (string) content.GetValueForProperty("ManagementNetworkProfileSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal)this).ManagementNetworkProfileSubnetId, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// 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.DedicatedHsm.Models.IDedicatedHsm DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new DedicatedHsm(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.DedicatedHsm.Models.IDedicatedHsm DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new DedicatedHsm(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.DedicatedHsm.Models.IDedicatedHsm FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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();
+ }
+ }
+ /// Resource information with extended details.
+ [System.ComponentModel.TypeConverter(typeof(DedicatedHsmTypeConverter))]
+ public partial interface IDedicatedHsm
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.TypeConverter.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.TypeConverter.cs
similarity index 97%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.TypeConverter.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.TypeConverter.cs
index 50c68250c5b3..df537120db98 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.TypeConverter.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Models.Api20211130.IDedicatedHsm ConvertFrom(dynamic sourceValue)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm ConvertFrom(dynamic sourceValue)
{
if (null == sourceValue)
{
return null;
}
global::System.Type type = sourceValue.GetType();
- if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm).IsAssignableFrom(type))
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm).IsAssignableFrom(type))
{
return sourceValue;
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.cs
similarity index 53%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.cs
index d629bd5d35e0..9c4c7d6aedb2 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.cs
@@ -3,183 +3,208 @@
// 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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
/// Resource information with extended details.
public partial class DedicatedHsm :
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm,
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm,
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal,
Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IValidates
{
///
- /// Backing field for Inherited model
+ /// Backing field for Inherited model
///
- private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Resource();
+ private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Resource();
/// The Azure Resource Manager resource ID for the dedicated HSM.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inherited)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Id; }
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Id; }
/// The supported Azure location where the dedicated HSM should be created.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inherited)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.FormatTable(Index = 3)]
- public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Location = value ; }
+ public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Location = value ?? null; }
///
/// Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.
///
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[] ManagementNetworkProfileNetworkInterface { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileNetworkInterface; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileNetworkInterface = value ?? null /* arrayOf */; }
+ public System.Collections.Generic.List ManagementNetworkProfileNetworkInterface { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileNetworkInterface; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileNetworkInterface = value ?? null /* arrayOf */; }
///
/// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
///
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public string ManagementNetworkProfileSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileSubnetId = value ?? null; }
+ public string ManagementNetworkProfileSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileSubnetId = value ?? null; }
/// Internal Acessors for ManagementNetworkProfile
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal.ManagementNetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfile = value; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkProfile Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.ManagementNetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfile = value; }
/// Internal Acessors for ManagementNetworkProfileSubnet
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal.ManagementNetworkProfileSubnet { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileSubnet; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileSubnet = value; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.ManagementNetworkProfileSubnet { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileSubnet; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ManagementNetworkProfileSubnet = value; }
/// Internal Acessors for NetworkProfile
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal.NetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).NetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).NetworkProfile = value; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkProfile Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.NetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).NetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).NetworkProfile = value; }
/// Internal Acessors for NetworkProfileSubnet
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal.NetworkProfileSubnet { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).NetworkProfileSubnet; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).NetworkProfileSubnet = value; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.NetworkProfileSubnet { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).NetworkProfileSubnet; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).NetworkProfileSubnet = value; }
/// Internal Acessors for Property
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmProperties Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmProperties()); set { {_property = value;} } }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmProperties Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmProperties()); set { {_property = value;} } }
/// Internal Acessors for ProvisioningState
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ProvisioningState = value; }
+ string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ProvisioningState = value; }
/// Internal Acessors for StatusMessage
- string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal.StatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).StatusMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).StatusMessage = value; }
+ string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.StatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).StatusMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).StatusMessage = value; }
/// Internal Acessors for SystemData
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.SystemData()); set { {_systemData = value;} } }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.SystemData()); set { {_systemData = value;} } }
+
+ /// Internal Acessors for SystemDataCreatedAt
+ global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).CreatedAt = value; }
+
+ /// Internal Acessors for SystemDataCreatedBy
+ string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).CreatedBy = value; }
+
+ /// Internal Acessors for SystemDataCreatedByType
+ string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).CreatedByType = value; }
+
+ /// Internal Acessors for SystemDataLastModifiedAt
+ global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).LastModifiedAt = value; }
+
+ /// Internal Acessors for SystemDataLastModifiedBy
+ string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).LastModifiedBy = value; }
+
+ /// Internal Acessors for SystemDataLastModifiedByType
+ string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).LastModifiedByType = value; }
/// Internal Acessors for Id
- string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Id = value; }
+ string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Id = value; }
/// Internal Acessors for Name
- string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Name = value; }
+ string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for Sku
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISku Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Sku = value; }
/// Internal Acessors for Type
- string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Type = value; }
+ string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Type = value; }
/// The name of the dedicated HSM.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inherited)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.FormatTable(Index = 0)]
- public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Name; }
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Name; }
///
/// Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.
///
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[] NetworkProfileNetworkInterface { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).NetworkProfileNetworkInterface; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).NetworkProfileNetworkInterface = value ?? null /* arrayOf */; }
+ public System.Collections.Generic.List NetworkProfileNetworkInterface { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).NetworkProfileNetworkInterface; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).NetworkProfileNetworkInterface = value ?? null /* arrayOf */; }
///
/// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
///
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public string NetworkProfileSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).NetworkProfileSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).NetworkProfileSubnetId = value ?? null; }
+ public string NetworkProfileSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).NetworkProfileSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).NetworkProfileSubnetId = value ?? null; }
/// Backing field for property.
- private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmProperties _property;
+ private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmProperties _property;
/// Properties of the dedicated HSM
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Owned)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- internal Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmProperties()); set => this._property = value; }
+ internal Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmProperties()); set => this._property = value; }
/// Provisioning state.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.FormatTable(Index = 1, Label = @"Provisioning State")]
- public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).ProvisioningState; }
+ public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).ProvisioningState; }
+
+ /// Gets the resource group name
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
+ public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); }
/// SKU details
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inherited)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISku Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Sku = value ?? null /* model class */; }
+ internal Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISku Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Sku = value ?? null /* model class */; }
/// SKU of the dedicated HSM
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inherited)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.FormatTable(Index = 2, Label = @"SKU")]
- public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.SkuName? SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).SkuName = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.SkuName)""); }
+ public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).SkuName = value ?? null; }
/// This field will be used when RP does not support Availability zones.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public string StampId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).StampId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).StampId = value ?? null; }
+ public string StampId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).StampId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).StampId = value ?? null; }
/// Resource Status Message.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public string StatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmPropertiesInternal)Property).StatusMessage; }
+ public string StatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmPropertiesInternal)Property).StatusMessage; }
/// Backing field for property.
- private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemData _systemData;
+ private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemData _systemData;
/// Metadata pertaining to creation and last modification of the resource
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Owned)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- internal Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.SystemData()); }
+ internal Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.SystemData()); }
/// The timestamp of dedicated hsm resource creation (UTC).
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); }
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).CreatedAt; }
/// The identity that created dedicated hsm resource.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).CreatedBy = value ?? null; }
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).CreatedBy; }
/// The type of identity that created dedicated hsm resource.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType)""); }
+ public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).CreatedByType; }
/// The timestamp of dedicated hsm resource last modification (UTC).
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); }
+ public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).LastModifiedAt; }
/// The identity that last modified dedicated hsm resource.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; }
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).LastModifiedBy; }
/// The type of identity that last modified dedicated hsm resource.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType)""); }
+ public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemDataInternal)SystemData).LastModifiedByType; }
/// Resource tags
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inherited)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Tag = value ?? null /* model class */; }
+ public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Tag = value ?? null /* model class */; }
/// The resource type of the dedicated HSM.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inherited)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Type; }
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Type; }
/// The Dedicated Hsm zones.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inherited)]
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.DoNotFormat]
- public string[] Zone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Zone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal)__resource).Zone = value ?? null /* arrayOf */; }
+ public System.Collections.Generic.List Zone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Zone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal)__resource).Zone = value ?? null /* arrayOf */; }
/// Creates an new instance.
public DedicatedHsm()
@@ -202,7 +227,7 @@ public DedicatedHsm()
/// Resource information with extended details.
public partial interface IDedicatedHsm :
Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.IJsonSerializable,
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResource
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResource
{
///
/// Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.
@@ -210,16 +235,22 @@ public partial interface IDedicatedHsm :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.",
SerializedName = @"networkInterfaces",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface) })]
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[] ManagementNetworkProfileNetworkInterface { get; set; }
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkInterface) })]
+ System.Collections.Generic.List ManagementNetworkProfileNetworkInterface { get; set; }
///
/// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
///
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...",
SerializedName = @"id",
PossibleTypes = new [] { typeof(string) })]
@@ -230,16 +261,22 @@ public partial interface IDedicatedHsm :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.",
SerializedName = @"networkInterfaces",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface) })]
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[] NetworkProfileNetworkInterface { get; set; }
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkInterface) })]
+ System.Collections.Generic.List NetworkProfileNetworkInterface { get; set; }
///
/// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
///
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...",
SerializedName = @"id",
PossibleTypes = new [] { typeof(string) })]
@@ -248,14 +285,21 @@ public partial interface IDedicatedHsm :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"Provisioning state.",
SerializedName = @"provisioningState",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType) })]
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType? ProvisioningState { get; }
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PSArgumentCompleterAttribute("Succeeded", "Provisioning", "Allocating", "Connecting", "Failed", "CheckingQuota", "Deleting")]
+ string ProvisioningState { get; }
/// This field will be used when RP does not support Availability zones.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"This field will be used when RP does not support Availability zones.",
SerializedName = @"stampId",
PossibleTypes = new [] { typeof(string) })]
@@ -264,6 +308,9 @@ public partial interface IDedicatedHsm :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"Resource Status Message.",
SerializedName = @"statusMessage",
PossibleTypes = new [] { typeof(string) })]
@@ -271,103 +318,126 @@ public partial interface IDedicatedHsm :
/// The timestamp of dedicated hsm resource creation (UTC).
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
- ReadOnly = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The timestamp of dedicated hsm resource creation (UTC).",
SerializedName = @"createdAt",
PossibleTypes = new [] { typeof(global::System.DateTime) })]
- global::System.DateTime? SystemDataCreatedAt { get; set; }
+ global::System.DateTime? SystemDataCreatedAt { get; }
/// The identity that created dedicated hsm resource.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
- ReadOnly = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The identity that created dedicated hsm resource.",
SerializedName = @"createdBy",
PossibleTypes = new [] { typeof(string) })]
- string SystemDataCreatedBy { get; set; }
+ string SystemDataCreatedBy { get; }
/// The type of identity that created dedicated hsm resource.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
- ReadOnly = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The type of identity that created dedicated hsm resource.",
SerializedName = @"createdByType",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType) })]
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType? SystemDataCreatedByType { get; set; }
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")]
+ string SystemDataCreatedByType { get; }
/// The timestamp of dedicated hsm resource last modification (UTC).
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
- ReadOnly = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The timestamp of dedicated hsm resource last modification (UTC).",
SerializedName = @"lastModifiedAt",
PossibleTypes = new [] { typeof(global::System.DateTime) })]
- global::System.DateTime? SystemDataLastModifiedAt { get; set; }
+ global::System.DateTime? SystemDataLastModifiedAt { get; }
/// The identity that last modified dedicated hsm resource.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
- ReadOnly = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The identity that last modified dedicated hsm resource.",
SerializedName = @"lastModifiedBy",
PossibleTypes = new [] { typeof(string) })]
- string SystemDataLastModifiedBy { get; set; }
+ string SystemDataLastModifiedBy { get; }
/// The type of identity that last modified dedicated hsm resource.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
- ReadOnly = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The type of identity that last modified dedicated hsm resource.",
SerializedName = @"lastModifiedByType",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType) })]
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType? SystemDataLastModifiedByType { get; set; }
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")]
+ string SystemDataLastModifiedByType { get; }
}
/// Resource information with extended details.
internal partial interface IDedicatedHsmInternal :
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IResourceInternal
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IResourceInternal
{
/// Specifies the management network interfaces of the dedicated hsm.
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile ManagementNetworkProfile { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkProfile ManagementNetworkProfile { get; set; }
///
/// Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.
///
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[] ManagementNetworkProfileNetworkInterface { get; set; }
+ System.Collections.Generic.List ManagementNetworkProfileNetworkInterface { get; set; }
/// Specifies the identifier of the subnet.
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference ManagementNetworkProfileSubnet { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference ManagementNetworkProfileSubnet { get; set; }
///
/// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
///
string ManagementNetworkProfileSubnetId { get; set; }
/// Specifies the network interfaces of the dedicated hsm.
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkProfile NetworkProfile { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.INetworkProfile NetworkProfile { get; set; }
///
/// Specifies the list of resource Ids for the network interfaces associated with the dedicated HSM.
///
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.INetworkInterface[] NetworkProfileNetworkInterface { get; set; }
+ System.Collections.Generic.List NetworkProfileNetworkInterface { get; set; }
/// Specifies the identifier of the subnet.
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IApiEntityReference NetworkProfileSubnet { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IApiEntityReference NetworkProfileSubnet { get; set; }
///
/// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
///
string NetworkProfileSubnetId { get; set; }
/// Properties of the dedicated HSM
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmProperties Property { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmProperties Property { get; set; }
/// Provisioning state.
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.JsonWebKeyType? ProvisioningState { get; set; }
+ [global::Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PSArgumentCompleterAttribute("Succeeded", "Provisioning", "Allocating", "Connecting", "Failed", "CheckingQuota", "Deleting")]
+ string ProvisioningState { get; set; }
/// This field will be used when RP does not support Availability zones.
string StampId { get; set; }
/// Resource Status Message.
string StatusMessage { get; set; }
/// Metadata pertaining to creation and last modification of the resource
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ISystemData SystemData { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ISystemData SystemData { get; set; }
/// The timestamp of dedicated hsm resource creation (UTC).
global::System.DateTime? SystemDataCreatedAt { get; set; }
/// The identity that created dedicated hsm resource.
string SystemDataCreatedBy { get; set; }
/// The type of identity that created dedicated hsm resource.
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType? SystemDataCreatedByType { get; set; }
+ [global::Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")]
+ string SystemDataCreatedByType { get; set; }
/// The timestamp of dedicated hsm resource last modification (UTC).
global::System.DateTime? SystemDataLastModifiedAt { get; set; }
/// The identity that last modified dedicated hsm resource.
string SystemDataLastModifiedBy { get; set; }
/// The type of identity that last modified dedicated hsm resource.
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Support.IdentityType? SystemDataLastModifiedByType { get; set; }
+ [global::Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")]
+ string SystemDataLastModifiedByType { get; set; }
}
}
\ No newline at end of file
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.json.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.json.cs
similarity index 92%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.json.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.json.cs
index f8ca1e625d5c..6dc6098f3dcd 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsm.json.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsm.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
@@ -65,20 +65,20 @@ internal DedicatedHsm(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Js
{
return;
}
- __resource = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Resource(json);
- {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.SystemData.FromJson(__jsonSystemData) : SystemData;}
- {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmProperties.FromJson(__jsonProperties) : Property;}
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Resource(json);
+ {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.SystemData.FromJson(__jsonSystemData) : _systemData;}
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmProperties.FromJson(__jsonProperties) : _property;}
AfterFromJson(json);
}
///
- /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm.
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm.
///
/// a to deserialize from.
///
- /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode node)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode node)
{
return node is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonObject json ? new DedicatedHsm(json) : null;
}
@@ -103,7 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode ToJ
return container;
}
__resource?.ToJson(container, serializationMode);
- if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeReadOnly))
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeRead))
{
AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add );
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.PowerShell.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.PowerShell.cs
similarity index 75%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.PowerShell.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.PowerShell.cs
index 13b95da72cda..bf1189310dff 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.PowerShell.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.PowerShell;
@@ -55,7 +55,15 @@ public partial class DedicatedHsmError
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,13 +78,13 @@ internal DedicatedHsmError(global::System.Collections.IDictionary content)
// actually deserialize
if (content.Contains("Error"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ErrorTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ErrorTypeConverter.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.
@@ -91,33 +99,33 @@ internal DedicatedHsmError(global::System.Management.Automation.PSObject content
// actually deserialize
if (content.Contains("Error"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.ErrorTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.ErrorTypeConverter.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.DedicatedHsm.Models.Api20211130.IDedicatedHsmError DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmError DeserializeFromDictionary(global::System.Collections.IDictionary content)
{
return new DedicatedHsmError(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.DedicatedHsm.Models.Api20211130.IDedicatedHsmError DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmError DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
{
return new DedicatedHsmError(content);
}
@@ -127,12 +135,24 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130
///
/// a string containing a JSON serialized instance of this model.
/// an instance of the model class.
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(jsonText));
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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 exception.
[System.ComponentModel.TypeConverter(typeof(DedicatedHsmErrorTypeConverter))]
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.TypeConverter.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.TypeConverter.cs
similarity index 97%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.TypeConverter.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.TypeConverter.cs
index aa9afa6956fd..c116965ebd46 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.TypeConverter.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Models.Api20211130.IDedicatedHsmError ConvertFrom(dynamic sourceValue)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmError ConvertFrom(dynamic sourceValue)
{
if (null == sourceValue)
{
return null;
}
global::System.Type type = sourceValue.GetType();
- if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmError).IsAssignableFrom(type))
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmError).IsAssignableFrom(type))
{
return sourceValue;
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.cs
similarity index 65%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.cs
index 033f7a1a2a60..9580900c4c58 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.cs
@@ -3,25 +3,25 @@
// 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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
/// The error exception.
public partial class DedicatedHsmError :
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmError,
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmErrorInternal
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmError,
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmErrorInternal
{
/// Backing field for property.
- private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IError _error;
+ private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IError _error;
/// The error detail of the operation if any.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Owned)]
- public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Error()); }
+ public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Error()); }
/// Internal Acessors for Error
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IError Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Error()); set { {_error = value;} } }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IError Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Error()); set { {_error = value;} } }
/// Creates an new instance.
public DedicatedHsmError()
@@ -37,10 +37,13 @@ public partial interface IDedicatedHsmError :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"The error detail of the operation if any.",
SerializedName = @"error",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IError) })]
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IError Error { get; }
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IError) })]
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IError Error { get; }
}
/// The error exception.
@@ -48,7 +51,7 @@ internal partial interface IDedicatedHsmErrorInternal
{
/// The error detail of the operation if any.
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IError Error { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IError Error { get; set; }
}
}
\ No newline at end of file
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.json.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.json.cs
similarity index 94%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.json.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.json.cs
index 9fcee89ceaca..15e26ef5c807 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmError.json.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmError.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
@@ -65,18 +65,18 @@ internal DedicatedHsmError(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runti
{
return;
}
- {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.Error.FromJson(__jsonError) : Error;}
+ {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Error.FromJson(__jsonError) : _error;}
AfterFromJson(json);
}
///
- /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmError.
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmError.
///
/// a to deserialize from.
///
- /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmError.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmError.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode node)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode node)
{
return node is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonObject json ? new DedicatedHsmError(json) : null;
}
@@ -100,7 +100,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode ToJ
{
return container;
}
- if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeReadOnly))
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeRead))
{
AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add );
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.PowerShell.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.PowerShell.cs
index a57e95143b4b..bd72045098a2 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.PowerShell.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.PowerShell.cs
@@ -53,6 +53,14 @@ public partial class DedicatedHsmIdentity
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 .
@@ -67,6 +75,10 @@ internal DedicatedHsmIdentity(global::System.Collections.IDictionary content)
return;
}
// actually deserialize
+ if (content.Contains("SubscriptionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
+ }
if (content.Contains("ResourceGroupName"))
{
((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString);
@@ -75,10 +87,6 @@ internal DedicatedHsmIdentity(global::System.Collections.IDictionary content)
{
((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).Name, global::System.Convert.ToString);
}
- if (content.Contains("SubscriptionId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
- }
if (content.Contains("Id"))
{
((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).Id, global::System.Convert.ToString);
@@ -100,6 +108,10 @@ internal DedicatedHsmIdentity(global::System.Management.Automation.PSObject cont
return;
}
// actually deserialize
+ if (content.Contains("SubscriptionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
+ }
if (content.Contains("ResourceGroupName"))
{
((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString);
@@ -108,10 +120,6 @@ internal DedicatedHsmIdentity(global::System.Management.Automation.PSObject cont
{
((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).Name, global::System.Convert.ToString);
}
- if (content.Contains("SubscriptionId"))
- {
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
- }
if (content.Contains("Id"))
{
((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmIdentityInternal)this).Id, global::System.Convert.ToString);
@@ -156,6 +164,18 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedH
/// a containing this model serialized to JSON text.
public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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();
+ }
}
[System.ComponentModel.TypeConverter(typeof(DedicatedHsmIdentityTypeConverter))]
public partial interface IDedicatedHsmIdentity
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.cs
index b692133bfacc..3e6d1255b771 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.cs
@@ -56,6 +56,9 @@ public partial interface IDedicatedHsmIdentity :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"Resource identity path",
SerializedName = @"id",
PossibleTypes = new [] { typeof(string) })]
@@ -64,6 +67,9 @@ public partial interface IDedicatedHsmIdentity :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"Name of the dedicated Hsm",
SerializedName = @"name",
PossibleTypes = new [] { typeof(string) })]
@@ -72,6 +78,9 @@ public partial interface IDedicatedHsmIdentity :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The name of the Resource Group to which the resource belongs.",
SerializedName = @"resourceGroupName",
PossibleTypes = new [] { typeof(string) })]
@@ -83,6 +92,9 @@ public partial interface IDedicatedHsmIdentity :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
SerializedName = @"subscriptionId",
PossibleTypes = new [] { typeof(string) })]
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.json.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.json.cs
index faecf22abaad..93db2236f3eb 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.json.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmIdentity.json.cs
@@ -64,10 +64,10 @@ internal DedicatedHsmIdentity(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Ru
{
return;
}
- {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;}
- {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
- {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;}
- {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;}
+ {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;}
AfterFromJson(json);
}
@@ -102,9 +102,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode ToJ
{
return container;
}
+ AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add );
AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add );
AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
- AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add );
AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
AfterToJson(ref container);
return container;
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.PowerShell.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.PowerShell.cs
similarity index 70%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.PowerShell.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.PowerShell.cs
index a608cca3ac76..46fc5e105ecf 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.PowerShell.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.PowerShell;
@@ -55,7 +55,15 @@ public partial class DedicatedHsmListResult
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 DedicatedHsmListResult(global::System.Collections.IDictionary content)
// actually deserialize
if (content.Contains("Value"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmTypeConverter.ConvertFrom));
}
if (content.Contains("NextLink"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResultInternal)this).NextLink, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResultInternal)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,39 +103,37 @@ internal DedicatedHsmListResult(global::System.Management.Automation.PSObject co
// actually deserialize
if (content.Contains("Value"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmTypeConverter.ConvertFrom));
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmTypeConverter.ConvertFrom));
}
if (content.Contains("NextLink"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResultInternal)this).NextLink, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResultInternal)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.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResult DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResult DeserializeFromDictionary(global::System.Collections.IDictionary content)
{
return new DedicatedHsmListResult(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.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
{
return new DedicatedHsmListResult(content);
}
@@ -137,12 +143,24 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130
///
/// a string containing a JSON serialized instance of this model.
/// an instance of the model class.
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(jsonText));
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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();
+ }
}
/// List of dedicated HSMs
[System.ComponentModel.TypeConverter(typeof(DedicatedHsmListResultTypeConverter))]
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.TypeConverter.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.TypeConverter.cs
similarity index 97%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.TypeConverter.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.TypeConverter.cs
index acf1622ad628..b6ed1b23c159 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.TypeConverter.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResult ConvertFrom(dynamic sourceValue)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResult ConvertFrom(dynamic sourceValue)
{
if (null == sourceValue)
{
return null;
}
global::System.Type type = sourceValue.GetType();
- if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResult).IsAssignableFrom(type))
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResult).IsAssignableFrom(type))
{
return sourceValue;
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.cs
similarity index 73%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.cs
index aeee32adfb76..760e29bcbfb9 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
/// List of dedicated HSMs
public partial class DedicatedHsmListResult :
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResult,
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResultInternal
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResult,
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResultInternal
{
/// Backing field for property.
@@ -21,11 +21,11 @@ public partial class DedicatedHsmListResult :
public string NextLink { get => this._nextLink; set => this._nextLink = value; }
/// Backing field for property.
- private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm[] _value;
+ private System.Collections.Generic.List _value;
/// The list of dedicated HSMs.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Owned)]
- public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm[] 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 DedicatedHsmListResult()
@@ -41,6 +41,9 @@ public partial interface IDedicatedHsmListResult :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The URL to get the next set of dedicated hsms.",
SerializedName = @"nextLink",
PossibleTypes = new [] { typeof(string) })]
@@ -49,10 +52,13 @@ public partial interface IDedicatedHsmListResult :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The list of dedicated HSMs.",
SerializedName = @"value",
- PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm) })]
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm[] Value { get; set; }
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsm) })]
+ System.Collections.Generic.List Value { get; set; }
}
/// List of dedicated HSMs
@@ -62,7 +68,7 @@ internal partial interface IDedicatedHsmListResultInternal
/// The URL to get the next set of dedicated hsms.
string NextLink { get; set; }
/// The list of dedicated HSMs.
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsm[] Value { get; set; }
+ System.Collections.Generic.List Value { get; set; }
}
}
\ No newline at end of file
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.json.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.json.cs
similarity index 90%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.json.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.json.cs
index 31aa9bf08606..035c33cf1b1e 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmListResult.json.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmListResult.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
@@ -65,19 +65,19 @@ internal DedicatedHsmListResult(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.
{
return;
}
- {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Models.Api20211130.IDedicatedHsm) (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsm.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.DedicatedHsm.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.DedicatedHsm.Models.IDedicatedHsm) (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsm.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.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResult.
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResult.
///
/// a to deserialize from.
///
- /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResult.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResult.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode node)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode node)
{
return node is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonObject json ? new DedicatedHsmListResult(json) : null;
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.PowerShell.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.PowerShell.cs
similarity index 61%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.PowerShell.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.PowerShell.cs
index 89e161b0147c..f89921fa0847 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.PowerShell.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.PowerShell;
@@ -55,7 +55,15 @@ public partial class DedicatedHsmOperation
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,37 +78,37 @@ internal DedicatedHsmOperation(global::System.Collections.IDictionary content)
// actually deserialize
if (content.Contains("Display"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmOperationDisplayTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperationDisplayTypeConverter.ConvertFrom);
}
if (content.Contains("Name"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).Name, global::System.Convert.ToString);
}
if (content.Contains("IsDataAction"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).IsDataAction = (string) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).IsDataAction, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).IsDataAction = (string) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).IsDataAction, global::System.Convert.ToString);
}
if (content.Contains("DisplayProvider"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
}
if (content.Contains("DisplayResource"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayResource, global::System.Convert.ToString);
}
if (content.Contains("DisplayOperation"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
}
if (content.Contains("DisplayDescription"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayDescription, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayDescription, 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.
@@ -115,57 +123,57 @@ internal DedicatedHsmOperation(global::System.Management.Automation.PSObject con
// actually deserialize
if (content.Contains("Display"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmOperationDisplayTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperationDisplayTypeConverter.ConvertFrom);
}
if (content.Contains("Name"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).Name, global::System.Convert.ToString);
}
if (content.Contains("IsDataAction"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).IsDataAction = (string) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).IsDataAction, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).IsDataAction = (string) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).IsDataAction, global::System.Convert.ToString);
}
if (content.Contains("DisplayProvider"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
}
if (content.Contains("DisplayResource"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayResource, global::System.Convert.ToString);
}
if (content.Contains("DisplayOperation"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
}
if (content.Contains("DisplayDescription"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal)this).DisplayDescription, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal)this).DisplayDescription, 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.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperation DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperation DeserializeFromDictionary(global::System.Collections.IDictionary content)
{
return new DedicatedHsmOperation(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.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
{
return new DedicatedHsmOperation(content);
}
@@ -175,12 +183,24 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130
///
/// a string containing a JSON serialized instance of this model.
/// an instance of the model class.
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(jsonText));
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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();
+ }
}
/// REST API operation
[System.ComponentModel.TypeConverter(typeof(DedicatedHsmOperationTypeConverter))]
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.TypeConverter.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.TypeConverter.cs
similarity index 97%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.TypeConverter.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.TypeConverter.cs
index 7a0eece902b1..cdd68d4aed17 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.TypeConverter.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperation ConvertFrom(dynamic sourceValue)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperation ConvertFrom(dynamic sourceValue)
{
if (null == sourceValue)
{
return null;
}
global::System.Type type = sourceValue.GetType();
- if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperation).IsAssignableFrom(type))
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperation).IsAssignableFrom(type))
{
return sourceValue;
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.cs
similarity index 74%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.cs
index de9b59af40a4..75eccba7c975 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.cs
@@ -3,38 +3,38 @@
// 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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
/// REST API operation
public partial class DedicatedHsmOperation :
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperation,
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperation,
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal
{
/// Backing field for property.
- private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay _display;
+ private Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay _display;
/// The display string.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Owned)]
- internal Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmOperationDisplay()); set => this._display = value; }
+ internal Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperationDisplay()); set => this._display = value; }
/// The object that represents the operation.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
- public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)Display).Description = value ?? null; }
+ public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)Display).Description = value ?? null; }
/// Operation type: Read, write, delete, etc.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
- public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)Display).Operation = value ?? null; }
+ public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)Display).Operation = value ?? null; }
/// The Resource Provider of the operation
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
- public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)Display).Provider = value ?? null; }
+ public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)Display).Provider = value ?? null; }
/// Resource on which the operation is performed.
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Origin(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.PropertyOrigin.Inlined)]
- public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)Display).Resource = value ?? null; }
+ public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)Display).Resource = value ?? null; }
/// Backing field for property.
private string _isDataAction;
@@ -44,10 +44,10 @@ public partial class DedicatedHsmOperation :
public string IsDataAction { get => this._isDataAction; }
/// Internal Acessors for Display
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmOperationDisplay()); set { {_display = value;} } }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperationDisplay()); set { {_display = value;} } }
/// Internal Acessors for IsDataAction
- string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } }
+ string Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } }
/// Backing field for property.
private string _name;
@@ -70,6 +70,9 @@ public partial interface IDedicatedHsmOperation :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The object that represents the operation.",
SerializedName = @"description",
PossibleTypes = new [] { typeof(string) })]
@@ -78,6 +81,9 @@ public partial interface IDedicatedHsmOperation :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"Operation type: Read, write, delete, etc.",
SerializedName = @"operation",
PossibleTypes = new [] { typeof(string) })]
@@ -86,6 +92,9 @@ public partial interface IDedicatedHsmOperation :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The Resource Provider of the operation",
SerializedName = @"provider",
PossibleTypes = new [] { typeof(string) })]
@@ -94,6 +103,9 @@ public partial interface IDedicatedHsmOperation :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"Resource on which the operation is performed.",
SerializedName = @"resource",
PossibleTypes = new [] { typeof(string) })]
@@ -102,6 +114,9 @@ public partial interface IDedicatedHsmOperation :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
Description = @"Gets or sets a value indicating whether it is a data plane action",
SerializedName = @"isDataAction",
PossibleTypes = new [] { typeof(string) })]
@@ -110,6 +125,9 @@ public partial interface IDedicatedHsmOperation :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The name of the Dedicated HSM Resource Provider Operation.",
SerializedName = @"name",
PossibleTypes = new [] { typeof(string) })]
@@ -121,7 +139,7 @@ internal partial interface IDedicatedHsmOperationInternal
{
/// The display string.
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay Display { get; set; }
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay Display { get; set; }
/// The object that represents the operation.
string DisplayDescription { get; set; }
/// Operation type: Read, write, delete, etc.
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.json.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.json.cs
similarity index 93%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.json.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.json.cs
index b965438d84c9..4293d19227df 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperation.json.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperation.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
@@ -65,20 +65,20 @@ internal DedicatedHsmOperation(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.R
{
return;
}
- {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.DedicatedHsmOperationDisplay.FromJson(__jsonDisplay) : Display;}
- {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
- {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (string)__jsonIsDataAction : (string)IsDataAction;}
+ {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.DedicatedHsmOperationDisplay.FromJson(__jsonDisplay) : _display;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;}
+ {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (string)__jsonIsDataAction : (string)_isDataAction;}
AfterFromJson(json);
}
///
- /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperation.
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperation.
///
/// a to deserialize from.
///
- /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperation.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperation.
///
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode node)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode node)
{
return node is Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonObject json ? new DedicatedHsmOperation(json) : null;
}
@@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode ToJ
}
AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add );
AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
- if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeReadOnly))
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.SerializationMode.IncludeRead))
{
AddIf( null != (((object)this._isDataAction)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonString(this._isDataAction.ToString()) : null, "isDataAction" ,container.Add );
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.PowerShell.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.PowerShell.cs
similarity index 68%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.PowerShell.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.PowerShell.cs
index 047d9882fbdf..fb72ec72fd21 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.PowerShell.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.PowerShell;
@@ -55,7 +55,15 @@ public partial class DedicatedHsmOperationDisplay
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,25 +78,25 @@ internal DedicatedHsmOperationDisplay(global::System.Collections.IDictionary con
// actually deserialize
if (content.Contains("Provider"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
}
if (content.Contains("Resource"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
}
if (content.Contains("Operation"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
}
if (content.Contains("Description"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Description, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Description, 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.
@@ -103,47 +111,45 @@ internal DedicatedHsmOperationDisplay(global::System.Management.Automation.PSObj
// actually deserialize
if (content.Contains("Provider"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
}
if (content.Contains("Resource"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
}
if (content.Contains("Operation"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
}
if (content.Contains("Description"))
{
- ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal)this).Description, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal)this).Description, 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.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content)
{
return new DedicatedHsmOperationDisplay(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.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
{
return new DedicatedHsmOperationDisplay(content);
}
@@ -153,12 +159,24 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130
///
/// a string containing a JSON serialized instance of this model.
/// an instance of the model class.
- public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Json.JsonNode.Parse(jsonText));
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.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 display string.
[System.ComponentModel.TypeConverter(typeof(DedicatedHsmOperationDisplayTypeConverter))]
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.TypeConverter.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.TypeConverter.cs
similarity index 97%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.TypeConverter.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.TypeConverter.cs
index e29975b2a729..f7691082cb7a 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.TypeConverter.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.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.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay ConvertFrom(dynamic sourceValue)
+ public static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay ConvertFrom(dynamic sourceValue)
{
if (null == sourceValue)
{
return null;
}
global::System.Type type = sourceValue.GetType();
- if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay).IsAssignableFrom(type))
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay).IsAssignableFrom(type))
{
return sourceValue;
}
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.cs
similarity index 91%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.cs
index a6ea86bbef58..12d77151f1c5 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
/// The display string.
public partial class DedicatedHsmOperationDisplay :
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplay,
- Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.Api20211130.IDedicatedHsmOperationDisplayInternal
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplay,
+ Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models.IDedicatedHsmOperationDisplayInternal
{
/// Backing field for property.
@@ -55,6 +55,9 @@ public partial interface IDedicatedHsmOperationDisplay :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The object that represents the operation.",
SerializedName = @"description",
PossibleTypes = new [] { typeof(string) })]
@@ -63,6 +66,9 @@ public partial interface IDedicatedHsmOperationDisplay :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"Operation type: Read, write, delete, etc.",
SerializedName = @"operation",
PossibleTypes = new [] { typeof(string) })]
@@ -71,6 +77,9 @@ public partial interface IDedicatedHsmOperationDisplay :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"The Resource Provider of the operation",
SerializedName = @"provider",
PossibleTypes = new [] { typeof(string) })]
@@ -79,6 +88,9 @@ public partial interface IDedicatedHsmOperationDisplay :
[Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Info(
Required = false,
ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
Description = @"Resource on which the operation is performed.",
SerializedName = @"resource",
PossibleTypes = new [] { typeof(string) })]
diff --git a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.json.cs b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.json.cs
similarity index 94%
rename from generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.json.cs
rename to generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.json.cs
index 05c562e06371..c360807a6b11 100644
--- a/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/Api20211130/DedicatedHsmOperationDisplay.json.cs
+++ b/generated/DedicatedHsm/DedicatedHsm.Autorest/generated/api/Models/DedicatedHsmOperationDisplay.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.DedicatedHsm.Models.Api20211130
+namespace Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Models
{
using static Microsoft.Azure.PowerShell.Cmdlets.DedicatedHsm.Runtime.Extensions;
@@ -65,21 +65,21 @@ internal DedicatedHsmOperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Dedicat
{
return;
}
- {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;}
- {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;}
- {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;}
- {_description = If( json?.PropertyT