From a6303c020d604a05c28d8a9ceb25b2d813754c7e Mon Sep 17 00:00:00 2001
From: azure-powershell-bot
<65331932+azure-powershell-bot@users.noreply.github.com>
Date: Wed, 11 Jan 2023 07:47:39 +0000
Subject: [PATCH] Move LoadTesting to main
---
src/LoadTesting/Az.LoadTesting.csproj | 8 +
src/LoadTesting/Az.LoadTesting.format.ps1xml | 1051 +++
src/LoadTesting/Az.LoadTesting.psd1 | 132 +
src/LoadTesting/Az.LoadTesting.psm1 | 115 +
src/LoadTesting/Changelog.md | 24 +
src/LoadTesting/LoadTesting.sln | 58 +
src/LoadTesting/Properties/AssemblyInfo.cs | 28 +
src/LoadTesting/README.md | 270 +
src/LoadTesting/build-module.ps1 | 161 +
src/LoadTesting/check-dependencies.ps1 | 65 +
src/LoadTesting/create-model-cmdlets.ps1 | 179 +
.../custom/Az.LoadTesting.custom.psm1 | 17 +
src/LoadTesting/custom/Get-AzLoad.ps1 | 114 +
.../custom/LoadTestResourceCustom.cs | 20 +
src/LoadTesting/custom/New-AzLoad.ps1 | 198 +
src/LoadTesting/custom/README.md | 41 +
src/LoadTesting/custom/Remove-AzLoad.ps1 | 131 +
src/LoadTesting/custom/Update-AzLoad.ps1 | 211 +
.../custom/UserAssignedIdentitiesCustom.cs | 24 +
src/LoadTesting/examples/Get-AzLoad.md | 40 +
src/LoadTesting/examples/New-AzLoad.md | 56 +
src/LoadTesting/examples/Remove-AzLoad.md | 9 +
src/LoadTesting/examples/Update-AzLoad.md | 41 +
src/LoadTesting/export-surface.ps1 | 41 +
src/LoadTesting/exports/Get-AzLoad.ps1 | 184 +
src/LoadTesting/exports/New-AzLoad.ps1 | 245 +
.../exports/ProxyCmdletDefinitions.ps1 | 815 +++
src/LoadTesting/exports/README.md | 20 +
src/LoadTesting/exports/Remove-AzLoad.ps1 | 195 +
src/LoadTesting/exports/Update-AzLoad.ps1 | 236 +
src/LoadTesting/generate-help.ps1 | 74 +
src/LoadTesting/generate-info.json | 8 +
src/LoadTesting/generated/Module.cs | 181 +
src/LoadTesting/generated/api/LoadTesting.cs | 2164 +++++++
.../generated/api/Models/Any.PowerShell.cs | 156 +
.../generated/api/Models/Any.TypeConverter.cs | 146 +
src/LoadTesting/generated/api/Models/Any.cs | 34 +
.../generated/api/Models/Any.json.cs | 104 +
...eckQuotaAvailabilityResponse.PowerShell.cs | 262 +
...QuotaAvailabilityResponse.TypeConverter.cs | 148 +
.../CheckQuotaAvailabilityResponse.cs | 160 +
.../CheckQuotaAvailabilityResponse.json.cs | 110 +
...ailabilityResponseProperties.PowerShell.cs | 177 +
...abilityResponseProperties.TypeConverter.cs | 151 +
...heckQuotaAvailabilityResponseProperties.cs | 76 +
...uotaAvailabilityResponseProperties.json.cs | 112 +
.../EncryptionProperties.PowerShell.cs | 190 +
.../EncryptionProperties.TypeConverter.cs | 147 +
.../Api20221201/EncryptionProperties.cs | 115 +
.../Api20221201/EncryptionProperties.json.cs | 112 +
...EncryptionPropertiesIdentity.PowerShell.cs | 176 +
...ryptionPropertiesIdentity.TypeConverter.cs | 147 +
.../EncryptionPropertiesIdentity.cs | 79 +
.../EncryptionPropertiesIdentity.json.cs | 112 +
.../EndpointDependency.PowerShell.cs | 180 +
.../EndpointDependency.TypeConverter.cs | 147 +
.../Models/Api20221201/EndpointDependency.cs | 106 +
.../Api20221201/EndpointDependency.json.cs | 129 +
.../Api20221201/EndpointDetail.PowerShell.cs | 164 +
.../EndpointDetail.TypeConverter.cs | 147 +
.../api/Models/Api20221201/EndpointDetail.cs | 54 +
.../Models/Api20221201/EndpointDetail.json.cs | 111 +
.../LoadTestProperties.PowerShell.cs | 212 +
.../LoadTestProperties.TypeConverter.cs | 147 +
.../Models/Api20221201/LoadTestProperties.cs | 153 +
.../Api20221201/LoadTestProperties.json.cs | 118 +
.../LoadTestResource.PowerShell.cs | 356 ++
.../LoadTestResource.TypeConverter.cs | 147 +
.../Models/Api20221201/LoadTestResource.cs | 369 ++
.../Api20221201/LoadTestResource.json.cs | 112 +
.../LoadTestResourcePageList.PowerShell.cs | 174 +
.../LoadTestResourcePageList.TypeConverter.cs | 147 +
.../Api20221201/LoadTestResourcePageList.cs | 68 +
.../LoadTestResourcePageList.json.cs | 118 +
...TestResourcePatchRequestBody.PowerShell.cs | 262 +
...tResourcePatchRequestBody.TypeConverter.cs | 148 +
.../LoadTestResourcePatchRequestBody.cs | 253 +
.../LoadTestResourcePatchRequestBody.json.cs | 112 +
...cePatchRequestBodyProperties.PowerShell.cs | 209 +
...atchRequestBodyProperties.TypeConverter.cs | 151 +
...dTestResourcePatchRequestBodyProperties.cs | 132 +
...ResourcePatchRequestBodyProperties.json.cs | 112 +
...ResourcePatchRequestBodyTags.PowerShell.cs | 164 +
...ourcePatchRequestBodyTags.TypeConverter.cs | 150 +
.../LoadTestResourcePatchRequestBodyTags.cs | 35 +
...ResourcePatchRequestBodyTags.dictionary.cs | 75 +
...adTestResourcePatchRequestBodyTags.json.cs | 110 +
.../OutboundEnvironmentEndpoint.PowerShell.cs | 176 +
...tboundEnvironmentEndpoint.TypeConverter.cs | 147 +
.../OutboundEnvironmentEndpoint.cs | 76 +
.../OutboundEnvironmentEndpoint.json.cs | 126 +
...nvironmentEndpointCollection.PowerShell.cs | 177 +
...ronmentEndpointCollection.TypeConverter.cs | 150 +
.../OutboundEnvironmentEndpointCollection.cs | 77 +
...boundEnvironmentEndpointCollection.json.cs | 122 +
.../QuotaBucketRequest.PowerShell.cs | 292 +
.../QuotaBucketRequest.TypeConverter.cs | 147 +
.../Models/Api20221201/QuotaBucketRequest.cs | 197 +
.../Api20221201/QuotaBucketRequest.json.cs | 110 +
...QuotaBucketRequestProperties.PowerShell.cs | 206 +
...taBucketRequestProperties.TypeConverter.cs | 147 +
.../QuotaBucketRequestProperties.cs | 125 +
.../QuotaBucketRequestProperties.json.cs | 114 +
...tRequestPropertiesDimensions.PowerShell.cs | 177 +
...questPropertiesDimensions.TypeConverter.cs | 151 +
.../QuotaBucketRequestPropertiesDimensions.cs | 68 +
...aBucketRequestPropertiesDimensions.json.cs | 111 +
.../Api20221201/QuotaResource.PowerShell.cs | 268 +
.../QuotaResource.TypeConverter.cs | 147 +
.../api/Models/Api20221201/QuotaResource.cs | 171 +
.../Models/Api20221201/QuotaResource.json.cs | 110 +
.../QuotaResourceList.PowerShell.cs | 174 +
.../QuotaResourceList.TypeConverter.cs | 147 +
.../Models/Api20221201/QuotaResourceList.cs | 76 +
.../Api20221201/QuotaResourceList.json.cs | 126 +
.../QuotaResourceProperties.PowerShell.cs | 182 +
.../QuotaResourceProperties.TypeConverter.cs | 147 +
.../Api20221201/QuotaResourceProperties.cs | 88 +
.../QuotaResourceProperties.json.cs | 115 +
.../Api30/ErrorAdditionalInfo.PowerShell.cs | 172 +
.../ErrorAdditionalInfo.TypeConverter.cs | 147 +
.../api/Models/Api30/ErrorAdditionalInfo.cs | 74 +
.../Models/Api30/ErrorAdditionalInfo.json.cs | 116 +
.../Models/Api30/ErrorDetail.PowerShell.cs | 196 +
.../Models/Api30/ErrorDetail.TypeConverter.cs | 147 +
.../generated/api/Models/Api30/ErrorDetail.cs | 134 +
.../api/Models/Api30/ErrorDetail.json.cs | 147 +
.../Models/Api30/ErrorResponse.PowerShell.cs | 208 +
.../Api30/ErrorResponse.TypeConverter.cs | 147 +
.../api/Models/Api30/ErrorResponse.cs | 136 +
.../api/Models/Api30/ErrorResponse.json.cs | 111 +
.../api/Models/Api30/Operation.PowerShell.cs | 230 +
.../Models/Api30/Operation.TypeConverter.cs | 146 +
.../generated/api/Models/Api30/Operation.cs | 256 +
.../api/Models/Api30/Operation.json.cs | 130 +
.../Api30/OperationDisplay.PowerShell.cs | 188 +
.../Api30/OperationDisplay.TypeConverter.cs | 147 +
.../api/Models/Api30/OperationDisplay.cs | 141 +
.../api/Models/Api30/OperationDisplay.json.cs | 126 +
.../Api30/OperationListResult.PowerShell.cs | 176 +
.../OperationListResult.TypeConverter.cs | 147 +
.../api/Models/Api30/OperationListResult.cs | 79 +
.../Models/Api30/OperationListResult.json.cs | 127 +
.../api/Models/Api30/Resource.PowerShell.cs | 238 +
.../Models/Api30/Resource.TypeConverter.cs | 146 +
.../generated/api/Models/Api30/Resource.cs | 208 +
.../api/Models/Api30/Resource.json.cs | 128 +
.../api/Models/Api30/SystemData.PowerShell.cs | 204 +
.../Models/Api30/SystemData.TypeConverter.cs | 146 +
.../generated/api/Models/Api30/SystemData.cs | 136 +
.../api/Models/Api30/SystemData.json.cs | 118 +
.../Api30/TrackedResource.PowerShell.cs | 254 +
.../Api30/TrackedResource.TypeConverter.cs | 147 +
.../api/Models/Api30/TrackedResource.cs | 146 +
.../api/Models/Api30/TrackedResource.json.cs | 114 +
.../Api30/TrackedResourceTags.PowerShell.cs | 160 +
.../TrackedResourceTags.TypeConverter.cs | 147 +
.../api/Models/Api30/TrackedResourceTags.cs | 35 +
.../Api30/TrackedResourceTags.dictionary.cs | 75 +
.../Models/Api30/TrackedResourceTags.json.cs | 109 +
.../ManagedServiceIdentity.PowerShell.cs | 188 +
.../ManagedServiceIdentity.TypeConverter.cs | 147 +
.../Models/Api50/ManagedServiceIdentity.cs | 138 +
.../Api50/ManagedServiceIdentity.json.cs | 120 +
.../UserAssignedIdentities.PowerShell.cs | 166 +
.../UserAssignedIdentities.TypeConverter.cs | 147 +
.../Models/Api50/UserAssignedIdentities.cs | 43 +
.../UserAssignedIdentities.dictionary.cs | 75 +
.../Api50/UserAssignedIdentities.json.cs | 113 +
.../Api50/UserAssignedIdentity.PowerShell.cs | 172 +
.../UserAssignedIdentity.TypeConverter.cs | 147 +
.../api/Models/Api50/UserAssignedIdentity.cs | 74 +
.../Models/Api50/UserAssignedIdentity.json.cs | 116 +
.../Models/LoadTestingIdentity.PowerShell.cs | 202 +
.../LoadTestingIdentity.TypeConverter.cs | 157 +
.../api/Models/LoadTestingIdentity.cs | 133 +
.../api/Models/LoadTestingIdentity.json.cs | 117 +
...eleteAcceptedResponseHeaders.PowerShell.cs | 167 +
...teAcceptedResponseHeaders.TypeConverter.cs | 151 +
.../LoadTestsDeleteAcceptedResponseHeaders.cs | 55 +
...TestsDeleteAcceptedResponseHeaders.json.cs | 106 +
...pdateAcceptedResponseHeaders.PowerShell.cs | 167 +
...teAcceptedResponseHeaders.TypeConverter.cs | 151 +
.../LoadTestsUpdateAcceptedResponseHeaders.cs | 55 +
...TestsUpdateAcceptedResponseHeaders.json.cs | 106 +
.../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 +
.../ManagedServiceIdentityType.Completer.cs | 49 +
...anagedServiceIdentityType.TypeConverter.cs | 61 +
.../api/Support/ManagedServiceIdentityType.cs | 106 +
.../generated/api/Support/Origin.Completer.cs | 46 +
.../api/Support/Origin.TypeConverter.cs | 62 +
.../generated/api/Support/Origin.cs | 103 +
.../api/Support/ResourceState.Completer.cs | 47 +
.../Support/ResourceState.TypeConverter.cs | 59 +
.../generated/api/Support/ResourceState.cs | 102 +
.../generated/api/Support/Type.Completer.cs | 39 +
.../api/Support/Type.TypeConverter.cs | 59 +
src/LoadTesting/generated/api/Support/Type.cs | 98 +
.../generated/cmdlets/GetAzLoad_Get.cs | 403 ++
.../generated/cmdlets/GetAzLoad_List.cs | 396 ++
.../generated/cmdlets/GetAzLoad_List1.cs | 410 ++
.../generated/cmdlets/GetAzOperation_List.cs | 377 ++
.../cmdlets/NewAzLoad_CreateExpanded.cs | 568 ++
.../generated/cmdlets/RemoveAzLoad_Delete.cs | 510 ++
.../cmdlets/UpdateAzLoad_UpdateExpanded.cs | 569 ++
.../generated/runtime/AsyncCommandRuntime.cs | 832 +++
src/LoadTesting/generated/runtime/AsyncJob.cs | 270 +
.../runtime/AsyncOperationResponse.cs | 176 +
.../BuildTime/Cmdlets/ExportCmdletSurface.cs | 113 +
.../BuildTime/Cmdlets/ExportExampleStub.cs | 74 +
.../BuildTime/Cmdlets/ExportFormatPs1xml.cs | 101 +
.../BuildTime/Cmdlets/ExportHelpMarkdown.cs | 53 +
.../BuildTime/Cmdlets/ExportModelSurface.cs | 117 +
.../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 177 +
.../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 191 +
.../BuildTime/Cmdlets/ExportTestStub.cs | 148 +
.../BuildTime/Cmdlets/GetCommonParameter.cs | 52 +
.../BuildTime/Cmdlets/GetModuleGuid.cs | 31 +
.../BuildTime/Cmdlets/GetScriptCmdlet.cs | 54 +
.../runtime/BuildTime/CollectionExtensions.cs | 20 +
.../runtime/BuildTime/MarkdownRenderer.cs | 114 +
.../runtime/BuildTime/Models/PsFormatTypes.cs | 138 +
.../BuildTime/Models/PsHelpMarkdownOutputs.cs | 199 +
.../runtime/BuildTime/Models/PsHelpTypes.cs | 202 +
.../BuildTime/Models/PsMarkdownTypes.cs | 294 +
.../BuildTime/Models/PsProxyOutputs.cs | 611 ++
.../runtime/BuildTime/Models/PsProxyTypes.cs | 514 ++
.../runtime/BuildTime/PsAttributes.cs | 114 +
.../runtime/BuildTime/PsExtensions.cs | 169 +
.../generated/runtime/BuildTime/PsHelpers.cs | 105 +
.../runtime/BuildTime/StringExtensions.cs | 24 +
.../runtime/BuildTime/XmlExtensions.cs | 28 +
.../generated/runtime/CmdInfoHandler.cs | 40 +
.../Conversions/ConversionException.cs | 17 +
.../runtime/Conversions/IJsonConverter.cs | 13 +
.../Conversions/Instances/BinaryConverter.cs | 24 +
.../Conversions/Instances/BooleanConverter.cs | 13 +
.../Instances/DateTimeConverter.cs | 18 +
.../Instances/DateTimeOffsetConverter.cs | 15 +
.../Conversions/Instances/DecimalConverter.cs | 16 +
.../Conversions/Instances/DoubleConverter.cs | 13 +
.../Conversions/Instances/EnumConverter.cs | 30 +
.../Conversions/Instances/GuidConverter.cs | 15 +
.../Instances/HashSet'1Converter.cs | 27 +
.../Conversions/Instances/Int16Converter.cs | 13 +
.../Conversions/Instances/Int32Converter.cs | 13 +
.../Conversions/Instances/Int64Converter.cs | 13 +
.../Instances/JsonArrayConverter.cs | 13 +
.../Instances/JsonObjectConverter.cs | 13 +
.../Conversions/Instances/SingleConverter.cs | 13 +
.../Conversions/Instances/StringConverter.cs | 13 +
.../Instances/TimeSpanConverter.cs | 15 +
.../Conversions/Instances/UInt16Converter.cs | 13 +
.../Conversions/Instances/UInt32Converter.cs | 13 +
.../Conversions/Instances/UInt64Converter.cs | 13 +
.../Conversions/Instances/UriConverter.cs | 15 +
.../runtime/Conversions/JsonConverter.cs | 21 +
.../Conversions/JsonConverterAttribute.cs | 18 +
.../Conversions/JsonConverterFactory.cs | 91 +
.../Conversions/StringLikeConverter.cs | 45 +
.../Customizations/IJsonSerializable.cs | 263 +
.../runtime/Customizations/JsonArray.cs | 13 +
.../runtime/Customizations/JsonBoolean.cs | 16 +
.../runtime/Customizations/JsonNode.cs | 21 +
.../runtime/Customizations/JsonNumber.cs | 78 +
.../runtime/Customizations/JsonObject.cs | 183 +
.../runtime/Customizations/JsonString.cs | 34 +
.../runtime/Customizations/XNodeArray.cs | 44 +
.../generated/runtime/Debugging.cs | 28 +
.../generated/runtime/DictionaryExtensions.cs | 33 +
.../generated/runtime/EventData.cs | 78 +
.../generated/runtime/EventDataExtensions.cs | 94 +
.../generated/runtime/EventListener.cs | 247 +
src/LoadTesting/generated/runtime/Events.cs | 27 +
.../generated/runtime/EventsExtensions.cs | 27 +
.../generated/runtime/Extensions.cs | 117 +
.../Extensions/StringBuilderExtensions.cs | 23 +
.../Helpers/Extensions/TypeExtensions.cs | 61 +
.../generated/runtime/Helpers/Seperator.cs | 11 +
.../generated/runtime/Helpers/TypeDetails.cs | 116 +
.../generated/runtime/Helpers/XHelper.cs | 75 +
.../generated/runtime/HttpPipeline.cs | 88 +
.../generated/runtime/HttpPipelineMocking.ps1 | 110 +
.../generated/runtime/IAssociativeArray.cs | 24 +
.../generated/runtime/IHeaderSerializable.cs | 14 +
.../generated/runtime/ISendAsync.cs | 300 +
.../generated/runtime/InfoAttribute.cs | 34 +
.../generated/runtime/Iso/IsoDate.cs | 214 +
src/LoadTesting/generated/runtime/JsonType.cs | 18 +
.../generated/runtime/MessageAttribute.cs | 360 ++
.../runtime/MessageAttributeHelper.cs | 161 +
src/LoadTesting/generated/runtime/Method.cs | 19 +
.../generated/runtime/Models/JsonMember.cs | 83 +
.../generated/runtime/Models/JsonModel.cs | 89 +
.../runtime/Models/JsonModelCache.cs | 19 +
.../runtime/Nodes/Collections/JsonArray.cs | 65 +
.../Nodes/Collections/XImmutableArray.cs | 62 +
.../runtime/Nodes/Collections/XList.cs | 64 +
.../runtime/Nodes/Collections/XNodeArray.cs | 68 +
.../runtime/Nodes/Collections/XSet.cs | 60 +
.../generated/runtime/Nodes/JsonBoolean.cs | 42 +
.../generated/runtime/Nodes/JsonDate.cs | 173 +
.../generated/runtime/Nodes/JsonNode.cs | 250 +
.../generated/runtime/Nodes/JsonNumber.cs | 109 +
.../generated/runtime/Nodes/JsonObject.cs | 172 +
.../generated/runtime/Nodes/JsonString.cs | 42 +
.../generated/runtime/Nodes/XBinary.cs | 40 +
.../generated/runtime/Nodes/XNull.cs | 15 +
.../Parser/Exceptions/ParseException.cs | 24 +
.../generated/runtime/Parser/JsonParser.cs | 180 +
.../generated/runtime/Parser/JsonToken.cs | 66 +
.../generated/runtime/Parser/JsonTokenizer.cs | 177 +
.../generated/runtime/Parser/Location.cs | 43 +
.../runtime/Parser/Readers/SourceReader.cs | 130 +
.../generated/runtime/Parser/TokenReader.cs | 39 +
.../generated/runtime/PipelineMocking.cs | 262 +
.../runtime/Properties/Resources.Designer.cs | 5633 +++++++++++++++++
.../runtime/Properties/Resources.resx | 1741 +++++
src/LoadTesting/generated/runtime/Response.cs | 27 +
.../runtime/Serialization/JsonSerializer.cs | 350 +
.../Serialization/PropertyTransformation.cs | 21 +
.../Serialization/SerializationOptions.cs | 65 +
.../generated/runtime/SerializationMode.cs | 16 +
.../runtime/TypeConverterExtensions.cs | 211 +
.../runtime/UndeclaredResponseException.cs | 112 +
.../generated/runtime/Writers/JsonWriter.cs | 223 +
.../generated/runtime/delegates.cs | 23 +
src/LoadTesting/help/Az.LoadTesting.md | 25 +
src/LoadTesting/help/Get-AzLoad.md | 154 +
src/LoadTesting/help/New-AzLoad.md | 317 +
src/LoadTesting/help/Remove-AzLoad.md | 184 +
src/LoadTesting/help/Update-AzLoad.md | 288 +
src/LoadTesting/how-to.md | 58 +
.../internal/Az.LoadTesting.internal.psm1 | 38 +
src/LoadTesting/internal/Get-AzLoad.ps1 | 153 +
src/LoadTesting/internal/Get-AzOperation.ps1 | 124 +
src/LoadTesting/internal/New-AzLoad.ps1 | 219 +
.../internal/ProxyCmdletDefinitions.ps1 | 809 +++
src/LoadTesting/internal/README.md | 14 +
src/LoadTesting/internal/Remove-AzLoad.ps1 | 164 +
src/LoadTesting/internal/Update-AzLoad.ps1 | 209 +
src/LoadTesting/pack-module.ps1 | 17 +
src/LoadTesting/run-module.ps1 | 62 +
src/LoadTesting/test-module.ps1 | 94 +
.../test/Az.LoadTesting.Recording.json | 830 +++
src/LoadTesting/test/Az.LoadTesting.Tests.ps1 | 191 +
src/LoadTesting/test/Get-AzLoad.Tests.ps1 | 29 +
src/LoadTesting/test/New-AzLoad.Tests.ps1 | 21 +
src/LoadTesting/test/README.md | 17 +
src/LoadTesting/test/Remove-AzLoad.Tests.ps1 | 21 +
src/LoadTesting/test/Update-AzLoad.Tests.ps1 | 21 +
.../key-vault/parameters.json | 48 +
.../key-vault/template.json | 157 +
.../managed-identity/parameters.json | 15 +
.../managed-identity/template.json | 33 +
src/LoadTesting/test/env.json | 17 +
src/LoadTesting/test/loadEnv.ps1 | 29 +
src/LoadTesting/test/localEnv.json | 4 +
src/LoadTesting/test/utils.ps1 | 105 +
.../utils/Unprotect-SecureString.ps1 | 16 +
tools/CreateMappings_rules.json | 4 +
366 files changed, 57020 insertions(+)
create mode 100644 src/LoadTesting/Az.LoadTesting.csproj
create mode 100644 src/LoadTesting/Az.LoadTesting.format.ps1xml
create mode 100644 src/LoadTesting/Az.LoadTesting.psd1
create mode 100644 src/LoadTesting/Az.LoadTesting.psm1
create mode 100644 src/LoadTesting/Changelog.md
create mode 100644 src/LoadTesting/LoadTesting.sln
create mode 100644 src/LoadTesting/Properties/AssemblyInfo.cs
create mode 100644 src/LoadTesting/README.md
create mode 100644 src/LoadTesting/build-module.ps1
create mode 100644 src/LoadTesting/check-dependencies.ps1
create mode 100644 src/LoadTesting/create-model-cmdlets.ps1
create mode 100644 src/LoadTesting/custom/Az.LoadTesting.custom.psm1
create mode 100644 src/LoadTesting/custom/Get-AzLoad.ps1
create mode 100644 src/LoadTesting/custom/LoadTestResourceCustom.cs
create mode 100644 src/LoadTesting/custom/New-AzLoad.ps1
create mode 100644 src/LoadTesting/custom/README.md
create mode 100644 src/LoadTesting/custom/Remove-AzLoad.ps1
create mode 100644 src/LoadTesting/custom/Update-AzLoad.ps1
create mode 100644 src/LoadTesting/custom/UserAssignedIdentitiesCustom.cs
create mode 100644 src/LoadTesting/examples/Get-AzLoad.md
create mode 100644 src/LoadTesting/examples/New-AzLoad.md
create mode 100644 src/LoadTesting/examples/Remove-AzLoad.md
create mode 100644 src/LoadTesting/examples/Update-AzLoad.md
create mode 100644 src/LoadTesting/export-surface.ps1
create mode 100644 src/LoadTesting/exports/Get-AzLoad.ps1
create mode 100644 src/LoadTesting/exports/New-AzLoad.ps1
create mode 100644 src/LoadTesting/exports/ProxyCmdletDefinitions.ps1
create mode 100644 src/LoadTesting/exports/README.md
create mode 100644 src/LoadTesting/exports/Remove-AzLoad.ps1
create mode 100644 src/LoadTesting/exports/Update-AzLoad.ps1
create mode 100644 src/LoadTesting/generate-help.ps1
create mode 100644 src/LoadTesting/generate-info.json
create mode 100644 src/LoadTesting/generated/Module.cs
create mode 100644 src/LoadTesting/generated/api/LoadTesting.cs
create mode 100644 src/LoadTesting/generated/api/Models/Any.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Any.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Any.cs
create mode 100644 src/LoadTesting/generated/api/Models/Any.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.dictionary.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorDetail.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorDetail.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorDetail.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorResponse.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorResponse.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/ErrorResponse.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/Operation.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/Operation.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/Operation.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/Operation.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/OperationDisplay.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/OperationDisplay.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/OperationDisplay.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/OperationDisplay.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/OperationListResult.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/OperationListResult.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/OperationListResult.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/OperationListResult.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/Resource.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/Resource.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/Resource.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/Resource.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/SystemData.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/SystemData.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/SystemData.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/SystemData.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/TrackedResource.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/TrackedResource.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/TrackedResource.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/TrackedResource.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/TrackedResourceTags.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/TrackedResourceTags.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/TrackedResourceTags.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/TrackedResourceTags.dictionary.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api30/TrackedResourceTags.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/ManagedServiceIdentity.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/ManagedServiceIdentity.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/ManagedServiceIdentity.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/ManagedServiceIdentity.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/UserAssignedIdentities.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/UserAssignedIdentities.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/UserAssignedIdentities.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/UserAssignedIdentities.dictionary.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/UserAssignedIdentities.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/UserAssignedIdentity.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/UserAssignedIdentity.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/UserAssignedIdentity.cs
create mode 100644 src/LoadTesting/generated/api/Models/Api50/UserAssignedIdentity.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestingIdentity.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestingIdentity.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestingIdentity.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestingIdentity.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestsDeleteAcceptedResponseHeaders.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestsDeleteAcceptedResponseHeaders.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestsDeleteAcceptedResponseHeaders.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestsDeleteAcceptedResponseHeaders.json.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestsUpdateAcceptedResponseHeaders.PowerShell.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestsUpdateAcceptedResponseHeaders.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestsUpdateAcceptedResponseHeaders.cs
create mode 100644 src/LoadTesting/generated/api/Models/LoadTestsUpdateAcceptedResponseHeaders.json.cs
create mode 100644 src/LoadTesting/generated/api/Support/ActionType.Completer.cs
create mode 100644 src/LoadTesting/generated/api/Support/ActionType.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Support/ActionType.cs
create mode 100644 src/LoadTesting/generated/api/Support/CreatedByType.Completer.cs
create mode 100644 src/LoadTesting/generated/api/Support/CreatedByType.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Support/CreatedByType.cs
create mode 100644 src/LoadTesting/generated/api/Support/ManagedServiceIdentityType.Completer.cs
create mode 100644 src/LoadTesting/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Support/ManagedServiceIdentityType.cs
create mode 100644 src/LoadTesting/generated/api/Support/Origin.Completer.cs
create mode 100644 src/LoadTesting/generated/api/Support/Origin.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Support/Origin.cs
create mode 100644 src/LoadTesting/generated/api/Support/ResourceState.Completer.cs
create mode 100644 src/LoadTesting/generated/api/Support/ResourceState.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Support/ResourceState.cs
create mode 100644 src/LoadTesting/generated/api/Support/Type.Completer.cs
create mode 100644 src/LoadTesting/generated/api/Support/Type.TypeConverter.cs
create mode 100644 src/LoadTesting/generated/api/Support/Type.cs
create mode 100644 src/LoadTesting/generated/cmdlets/GetAzLoad_Get.cs
create mode 100644 src/LoadTesting/generated/cmdlets/GetAzLoad_List.cs
create mode 100644 src/LoadTesting/generated/cmdlets/GetAzLoad_List1.cs
create mode 100644 src/LoadTesting/generated/cmdlets/GetAzOperation_List.cs
create mode 100644 src/LoadTesting/generated/cmdlets/NewAzLoad_CreateExpanded.cs
create mode 100644 src/LoadTesting/generated/cmdlets/RemoveAzLoad_Delete.cs
create mode 100644 src/LoadTesting/generated/cmdlets/UpdateAzLoad_UpdateExpanded.cs
create mode 100644 src/LoadTesting/generated/runtime/AsyncCommandRuntime.cs
create mode 100644 src/LoadTesting/generated/runtime/AsyncJob.cs
create mode 100644 src/LoadTesting/generated/runtime/AsyncOperationResponse.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/CollectionExtensions.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/MarkdownRenderer.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Models/PsFormatTypes.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Models/PsHelpTypes.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Models/PsProxyOutputs.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/Models/PsProxyTypes.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/PsAttributes.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/PsExtensions.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/PsHelpers.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/StringExtensions.cs
create mode 100644 src/LoadTesting/generated/runtime/BuildTime/XmlExtensions.cs
create mode 100644 src/LoadTesting/generated/runtime/CmdInfoHandler.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/ConversionException.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/IJsonConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/BinaryConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/BooleanConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/DateTimeConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/DecimalConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/DoubleConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/EnumConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/GuidConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/HashSet'1Converter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/Int16Converter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/Int32Converter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/Int64Converter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/JsonArrayConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/JsonObjectConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/SingleConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/StringConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/TimeSpanConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/UInt16Converter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/UInt32Converter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/UInt64Converter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/Instances/UriConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/JsonConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/JsonConverterAttribute.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/JsonConverterFactory.cs
create mode 100644 src/LoadTesting/generated/runtime/Conversions/StringLikeConverter.cs
create mode 100644 src/LoadTesting/generated/runtime/Customizations/IJsonSerializable.cs
create mode 100644 src/LoadTesting/generated/runtime/Customizations/JsonArray.cs
create mode 100644 src/LoadTesting/generated/runtime/Customizations/JsonBoolean.cs
create mode 100644 src/LoadTesting/generated/runtime/Customizations/JsonNode.cs
create mode 100644 src/LoadTesting/generated/runtime/Customizations/JsonNumber.cs
create mode 100644 src/LoadTesting/generated/runtime/Customizations/JsonObject.cs
create mode 100644 src/LoadTesting/generated/runtime/Customizations/JsonString.cs
create mode 100644 src/LoadTesting/generated/runtime/Customizations/XNodeArray.cs
create mode 100644 src/LoadTesting/generated/runtime/Debugging.cs
create mode 100644 src/LoadTesting/generated/runtime/DictionaryExtensions.cs
create mode 100644 src/LoadTesting/generated/runtime/EventData.cs
create mode 100644 src/LoadTesting/generated/runtime/EventDataExtensions.cs
create mode 100644 src/LoadTesting/generated/runtime/EventListener.cs
create mode 100644 src/LoadTesting/generated/runtime/Events.cs
create mode 100644 src/LoadTesting/generated/runtime/EventsExtensions.cs
create mode 100644 src/LoadTesting/generated/runtime/Extensions.cs
create mode 100644 src/LoadTesting/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs
create mode 100644 src/LoadTesting/generated/runtime/Helpers/Extensions/TypeExtensions.cs
create mode 100644 src/LoadTesting/generated/runtime/Helpers/Seperator.cs
create mode 100644 src/LoadTesting/generated/runtime/Helpers/TypeDetails.cs
create mode 100644 src/LoadTesting/generated/runtime/Helpers/XHelper.cs
create mode 100644 src/LoadTesting/generated/runtime/HttpPipeline.cs
create mode 100644 src/LoadTesting/generated/runtime/HttpPipelineMocking.ps1
create mode 100644 src/LoadTesting/generated/runtime/IAssociativeArray.cs
create mode 100644 src/LoadTesting/generated/runtime/IHeaderSerializable.cs
create mode 100644 src/LoadTesting/generated/runtime/ISendAsync.cs
create mode 100644 src/LoadTesting/generated/runtime/InfoAttribute.cs
create mode 100644 src/LoadTesting/generated/runtime/Iso/IsoDate.cs
create mode 100644 src/LoadTesting/generated/runtime/JsonType.cs
create mode 100644 src/LoadTesting/generated/runtime/MessageAttribute.cs
create mode 100644 src/LoadTesting/generated/runtime/MessageAttributeHelper.cs
create mode 100644 src/LoadTesting/generated/runtime/Method.cs
create mode 100644 src/LoadTesting/generated/runtime/Models/JsonMember.cs
create mode 100644 src/LoadTesting/generated/runtime/Models/JsonModel.cs
create mode 100644 src/LoadTesting/generated/runtime/Models/JsonModelCache.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/Collections/JsonArray.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/Collections/XImmutableArray.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/Collections/XList.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/Collections/XNodeArray.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/Collections/XSet.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/JsonBoolean.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/JsonDate.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/JsonNode.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/JsonNumber.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/JsonObject.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/JsonString.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/XBinary.cs
create mode 100644 src/LoadTesting/generated/runtime/Nodes/XNull.cs
create mode 100644 src/LoadTesting/generated/runtime/Parser/Exceptions/ParseException.cs
create mode 100644 src/LoadTesting/generated/runtime/Parser/JsonParser.cs
create mode 100644 src/LoadTesting/generated/runtime/Parser/JsonToken.cs
create mode 100644 src/LoadTesting/generated/runtime/Parser/JsonTokenizer.cs
create mode 100644 src/LoadTesting/generated/runtime/Parser/Location.cs
create mode 100644 src/LoadTesting/generated/runtime/Parser/Readers/SourceReader.cs
create mode 100644 src/LoadTesting/generated/runtime/Parser/TokenReader.cs
create mode 100644 src/LoadTesting/generated/runtime/PipelineMocking.cs
create mode 100644 src/LoadTesting/generated/runtime/Properties/Resources.Designer.cs
create mode 100644 src/LoadTesting/generated/runtime/Properties/Resources.resx
create mode 100644 src/LoadTesting/generated/runtime/Response.cs
create mode 100644 src/LoadTesting/generated/runtime/Serialization/JsonSerializer.cs
create mode 100644 src/LoadTesting/generated/runtime/Serialization/PropertyTransformation.cs
create mode 100644 src/LoadTesting/generated/runtime/Serialization/SerializationOptions.cs
create mode 100644 src/LoadTesting/generated/runtime/SerializationMode.cs
create mode 100644 src/LoadTesting/generated/runtime/TypeConverterExtensions.cs
create mode 100644 src/LoadTesting/generated/runtime/UndeclaredResponseException.cs
create mode 100644 src/LoadTesting/generated/runtime/Writers/JsonWriter.cs
create mode 100644 src/LoadTesting/generated/runtime/delegates.cs
create mode 100644 src/LoadTesting/help/Az.LoadTesting.md
create mode 100644 src/LoadTesting/help/Get-AzLoad.md
create mode 100644 src/LoadTesting/help/New-AzLoad.md
create mode 100644 src/LoadTesting/help/Remove-AzLoad.md
create mode 100644 src/LoadTesting/help/Update-AzLoad.md
create mode 100644 src/LoadTesting/how-to.md
create mode 100644 src/LoadTesting/internal/Az.LoadTesting.internal.psm1
create mode 100644 src/LoadTesting/internal/Get-AzLoad.ps1
create mode 100644 src/LoadTesting/internal/Get-AzOperation.ps1
create mode 100644 src/LoadTesting/internal/New-AzLoad.ps1
create mode 100644 src/LoadTesting/internal/ProxyCmdletDefinitions.ps1
create mode 100644 src/LoadTesting/internal/README.md
create mode 100644 src/LoadTesting/internal/Remove-AzLoad.ps1
create mode 100644 src/LoadTesting/internal/Update-AzLoad.ps1
create mode 100644 src/LoadTesting/pack-module.ps1
create mode 100644 src/LoadTesting/run-module.ps1
create mode 100644 src/LoadTesting/test-module.ps1
create mode 100644 src/LoadTesting/test/Az.LoadTesting.Recording.json
create mode 100644 src/LoadTesting/test/Az.LoadTesting.Tests.ps1
create mode 100644 src/LoadTesting/test/Get-AzLoad.Tests.ps1
create mode 100644 src/LoadTesting/test/New-AzLoad.Tests.ps1
create mode 100644 src/LoadTesting/test/README.md
create mode 100644 src/LoadTesting/test/Remove-AzLoad.Tests.ps1
create mode 100644 src/LoadTesting/test/Update-AzLoad.Tests.ps1
create mode 100644 src/LoadTesting/test/deployment-templates/key-vault/parameters.json
create mode 100644 src/LoadTesting/test/deployment-templates/key-vault/template.json
create mode 100644 src/LoadTesting/test/deployment-templates/managed-identity/parameters.json
create mode 100644 src/LoadTesting/test/deployment-templates/managed-identity/template.json
create mode 100644 src/LoadTesting/test/env.json
create mode 100644 src/LoadTesting/test/loadEnv.ps1
create mode 100644 src/LoadTesting/test/localEnv.json
create mode 100644 src/LoadTesting/test/utils.ps1
create mode 100644 src/LoadTesting/utils/Unprotect-SecureString.ps1
diff --git a/src/LoadTesting/Az.LoadTesting.csproj b/src/LoadTesting/Az.LoadTesting.csproj
new file mode 100644
index 000000000000..fa1629f10886
--- /dev/null
+++ b/src/LoadTesting/Az.LoadTesting.csproj
@@ -0,0 +1,8 @@
+
+
+ LoadTesting
+
+
+
+
+
diff --git a/src/LoadTesting/Az.LoadTesting.format.ps1xml b/src/LoadTesting/Az.LoadTesting.format.ps1xml
new file mode 100644
index 000000000000..072c40235fbb
--- /dev/null
+++ b/src/LoadTesting/Az.LoadTesting.format.ps1xml
@@ -0,0 +1,1051 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.LoadTestingIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.LoadTestingIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LoadTestName
+
+
+ Location
+
+
+ QuotaBucketName
+
+
+ ResourceGroupName
+
+
+ SubscriptionId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.LoadTestsDeleteAcceptedResponseHeaders
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.LoadTestsDeleteAcceptedResponseHeaders
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.LoadTestsUpdateAcceptedResponseHeaders
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.LoadTestsUpdateAcceptedResponseHeaders
+
+
+
+
+
+
+
+
+
+
+
+ AzureAsyncOperation
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+ Target
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.Operation
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.Operation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ActionType
+
+
+ IsDataAction
+
+
+ Name
+
+
+ Origin
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.OperationDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.OperationListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.OperationListResult
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.Resource
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.SystemData
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.SystemData
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreatedAt
+
+
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedAt
+
+
+ LastModifiedBy
+
+
+ LastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.TrackedResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.TrackedResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.TrackedResourceTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.TrackedResourceTags
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PrincipalId
+
+
+ TenantId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.UserAssignedIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.UserAssignedIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ClientId
+
+
+ PrincipalId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentity
+
+
+
+
+
+
+
+
+
+
+
+ ResourceId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.CheckQuotaAvailabilityResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.CheckQuotaAvailabilityResponse
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.CheckQuotaAvailabilityResponseProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.CheckQuotaAvailabilityResponseProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AvailabilityStatus
+
+
+ IsAvailable
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionProperties
+
+
+
+
+
+
+
+
+
+
+
+ KeyUrl
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EndpointDependency
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EndpointDependency
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ DomainName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EndpointDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EndpointDetail
+
+
+
+
+
+
+
+
+
+
+
+ Port
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DataPlaneUri
+
+
+ ProvisioningState
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ ResourceGroupName
+
+
+ Location
+
+
+ DataPlaneUri
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePageList
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePageList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyProperties
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyTags
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.OutboundEnvironmentEndpoint
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.OutboundEnvironmentEndpoint
+
+
+
+
+
+
+
+
+
+
+
+ Category
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.OutboundEnvironmentEndpointCollection
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.OutboundEnvironmentEndpointCollection
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequest
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CurrentQuota
+
+
+ CurrentUsage
+
+
+ NewQuota
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesDimensions
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesDimensions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+ SubscriptionId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourceList
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourceList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourceProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourceProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Limit
+
+
+ ProvisioningState
+
+
+ Usage
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/LoadTesting/Az.LoadTesting.psd1 b/src/LoadTesting/Az.LoadTesting.psd1
new file mode 100644
index 000000000000..bc064d944794
--- /dev/null
+++ b/src/LoadTesting/Az.LoadTesting.psd1
@@ -0,0 +1,132 @@
+#
+# Module manifest for module 'Az.LoadTesting'
+#
+# Generated by: Microsoft Corporation
+#
+# Generated on: 1/11/2023
+#
+
+@{
+
+# Script module or binary module file associated with this manifest.
+RootModule = './Az.LoadTesting.psm1'
+
+# Version number of this module.
+ModuleVersion = '0.1.0'
+
+# Supported PSEditions
+CompatiblePSEditions = 'Core', 'Desktop'
+
+# ID used to uniquely identify this module
+GUID = '739ddedf-3d49-40e0-bc84-00bedfe6b2ec'
+
+# Author of this module
+Author = 'Microsoft Corporation'
+
+# Company or vendor of this module
+CompanyName = 'Microsoft Corporation'
+
+# Copyright statement for this module
+Copyright = 'Microsoft Corporation. All rights reserved.'
+
+# Description of the functionality provided by this module
+Description = 'Microsoft Azure PowerShell: LoadTesting cmdlets'
+
+# Minimum version of the PowerShell engine required by this module
+PowerShellVersion = '5.1'
+
+# Name of the PowerShell host required by this module
+# PowerShellHostName = ''
+
+# Minimum version of the PowerShell host required by this module
+# PowerShellHostVersion = ''
+
+# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+DotNetFrameworkVersion = '4.7.2'
+
+# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+# ClrVersion = ''
+
+# Processor architecture (None, X86, Amd64) required by this module
+# ProcessorArchitecture = ''
+
+# Modules that must be imported into the global environment prior to importing this module
+RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.11.0'; })
+
+# Assemblies that must be loaded prior to importing this module
+RequiredAssemblies = './bin/Az.LoadTesting.private.dll'
+
+# Script files (.ps1) that are run in the caller's environment prior to importing this module.
+# ScriptsToProcess = @()
+
+# Type files (.ps1xml) to be loaded when importing this module
+# TypesToProcess = @()
+
+# Format files (.ps1xml) to be loaded when importing this module
+FormatsToProcess = './Az.LoadTesting.format.ps1xml'
+
+# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
+# NestedModules = @()
+
+# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
+FunctionsToExport = 'Get-AzLoad', 'New-AzLoad', 'Remove-AzLoad', 'Update-AzLoad'
+
+# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
+CmdletsToExport = @()
+
+# Variables to export from this module
+# VariablesToExport = @()
+
+# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
+AliasesToExport = '*'
+
+# DSC resources to export from this module
+# DscResourcesToExport = @()
+
+# List of all modules packaged with this module
+# ModuleList = @()
+
+# List of all files packaged with this module
+# FileList = @()
+
+# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
+PrivateData = @{
+
+ PSData = @{
+
+ # Tags applied to this module. These help with module discovery in online galleries.
+ Tags = 'Azure','ResourceManager','ARM','PSModule','LoadTesting'
+
+ # A URL to the license for this module.
+ LicenseUri = 'https://aka.ms/azps-license'
+
+ # A URL to the main website for this project.
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+
+ # A URL to an icon representing this module.
+ # IconUri = ''
+
+ # ReleaseNotes of this module
+ # ReleaseNotes = ''
+
+ # Prerelease string of this module
+ # Prerelease = ''
+
+ # Flag to indicate whether the module requires explicit user acceptance for install/update/save
+ # RequireLicenseAcceptance = $false
+
+ # External dependent modules of this module
+ # ExternalModuleDependencies = @()
+
+ } # End of PSData hashtable
+
+ } # End of PrivateData hashtable
+
+# HelpInfo URI of this module
+# HelpInfoURI = ''
+
+# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
+# DefaultCommandPrefix = ''
+
+}
+
diff --git a/src/LoadTesting/Az.LoadTesting.psm1 b/src/LoadTesting/Az.LoadTesting.psm1
new file mode 100644
index 000000000000..1899cf9d5a41
--- /dev/null
+++ b/src/LoadTesting/Az.LoadTesting.psm1
@@ -0,0 +1,115 @@
+# region Generated
+ # ----------------------------------------------------------------------------------
+ # 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,
+# 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.
+ # ----------------------------------------------------------------------------------
+ # Load required Az.Accounts module
+ $accountsName = 'Az.Accounts'
+ $accountsModule = Get-Module -Name $accountsName
+ if(-not $accountsModule) {
+ $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules'
+ if(Test-Path -Path $localAccountsPath) {
+ $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1
+ if($localAccounts) {
+ $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru
+ }
+ }
+ if(-not $accountsModule) {
+ $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0
+ if($hasAdequateVersion) {
+ $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru
+ }
+ }
+ }
+
+ if(-not $accountsModule) {
+ Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
+ } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) {
+ Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
+ }
+ Write-Information "Loaded Module '$($accountsModule.Name)'"
+
+ # Load the private module dll
+ $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.LoadTesting.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Module]::Instance
+
+ # Ask for the shared functionality table
+ $VTable = Register-AzModule
+
+ # Tweaks the pipeline on module load
+ $instance.OnModuleLoad = $VTable.OnModuleLoad
+
+ # Following two delegates are added for telemetry
+ $instance.GetTelemetryId = $VTable.GetTelemetryId
+ $instance.Telemetry = $VTable.Telemetry
+
+
+ # Tweaks the pipeline per call
+ $instance.OnNewRequest = $VTable.OnNewRequest
+
+ # Gets shared parameter values
+ $instance.GetParameterValue = $VTable.GetParameterValue
+
+ # Allows shared module to listen to events from this module
+ $instance.EventListener = $VTable.EventListener
+
+ # Gets shared argument completers
+ $instance.ArgumentCompleter = $VTable.ArgumentCompleter
+
+ # The name of the currently selected Azure profile
+ $instance.ProfileName = $VTable.ProfileName
+
+
+ # Load the custom module
+ $customModulePath = Join-Path $PSScriptRoot './custom/Az.LoadTesting.custom.psm1'
+ if(Test-Path $customModulePath) {
+ $null = Import-Module -Name $customModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export proxy cmdlet scripts
+ $exportsPath = Join-Path $PSScriptRoot './exports'
+ $directories = Get-ChildItem -Directory -Path $exportsPath
+ $profileDirectory = $null
+ if($instance.ProfileName) {
+ if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) {
+ $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName }
+ } else {
+ # Don't export anything if the profile doesn't exist for the module
+ $exportsPath = $null
+ Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded."
+ }
+ } elseif(($directories | Measure-Object).Count -gt 0) {
+ # Load the last folder if no profile is selected
+ $profileDirectory = $directories | Select-Object -Last 1
+ }
+
+ if($profileDirectory) {
+ Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
+ $exportsPath = $profileDirectory.FullName
+ }
+
+ if($exportsPath) {
+ Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath
+ Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias)
+ }
+
+ # Finalize initialization of this module
+ $instance.Init();
+ Write-Information "Loaded Module '$($instance.Name)'"
+# endregion
diff --git a/src/LoadTesting/Changelog.md b/src/LoadTesting/Changelog.md
new file mode 100644
index 000000000000..b8d5a815ac12
--- /dev/null
+++ b/src/LoadTesting/Changelog.md
@@ -0,0 +1,24 @@
+
+## Upcoming Release
+
+## Version 0.1.0
+* First preview release for module Az.LoadTesting
+
diff --git a/src/LoadTesting/LoadTesting.sln b/src/LoadTesting/LoadTesting.sln
new file mode 100644
index 000000000000..1aab2cfe6c75
--- /dev/null
+++ b/src/LoadTesting/LoadTesting.sln
@@ -0,0 +1,58 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{0D7EE99B-B401-4ECB-87D1-481944B1DD2D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{C87F09C3-95F7-41FB-AAE9-80F4F438D376}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{637C45A2-F0F8-46BF-B154-60394BF6B01F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{07A865F2-8DBA-431B-8ECF-38EA87830CD5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{73D70F88-8511-48C1-AB50-2308E0345487}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{F6A4DF78-0CB4-4997-ABEE-4C2957499B3D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.LoadTesting", "Az.LoadTesting.csproj", "{4732C889-340D-4B0C-94CA-7EB3B82A238C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0D7EE99B-B401-4ECB-87D1-481944B1DD2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0D7EE99B-B401-4ECB-87D1-481944B1DD2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0D7EE99B-B401-4ECB-87D1-481944B1DD2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0D7EE99B-B401-4ECB-87D1-481944B1DD2D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C87F09C3-95F7-41FB-AAE9-80F4F438D376}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C87F09C3-95F7-41FB-AAE9-80F4F438D376}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C87F09C3-95F7-41FB-AAE9-80F4F438D376}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C87F09C3-95F7-41FB-AAE9-80F4F438D376}.Release|Any CPU.Build.0 = Release|Any CPU
+ {637C45A2-F0F8-46BF-B154-60394BF6B01F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {637C45A2-F0F8-46BF-B154-60394BF6B01F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {637C45A2-F0F8-46BF-B154-60394BF6B01F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {637C45A2-F0F8-46BF-B154-60394BF6B01F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {07A865F2-8DBA-431B-8ECF-38EA87830CD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {07A865F2-8DBA-431B-8ECF-38EA87830CD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {07A865F2-8DBA-431B-8ECF-38EA87830CD5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {07A865F2-8DBA-431B-8ECF-38EA87830CD5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {73D70F88-8511-48C1-AB50-2308E0345487}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {73D70F88-8511-48C1-AB50-2308E0345487}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {73D70F88-8511-48C1-AB50-2308E0345487}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {73D70F88-8511-48C1-AB50-2308E0345487}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F6A4DF78-0CB4-4997-ABEE-4C2957499B3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F6A4DF78-0CB4-4997-ABEE-4C2957499B3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F6A4DF78-0CB4-4997-ABEE-4C2957499B3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F6A4DF78-0CB4-4997-ABEE-4C2957499B3D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4732C889-340D-4B0C-94CA-7EB3B82A238C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4732C889-340D-4B0C-94CA-7EB3B82A238C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4732C889-340D-4B0C-94CA-7EB3B82A238C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4732C889-340D-4B0C-94CA-7EB3B82A238C}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/src/LoadTesting/Properties/AssemblyInfo.cs b/src/LoadTesting/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000000..745bd7d5cb77
--- /dev/null
+++ b/src/LoadTesting/Properties/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// 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,
+// 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.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Microsoft Azure Powershell - LoadTesting")]
+[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("30a84d70-762c-469d-ae1c-7212c2b7ad23")]
+[assembly: AssemblyVersion("0.1.0")]
+[assembly: AssemblyFileVersion("0.1.0")]
diff --git a/src/LoadTesting/README.md b/src/LoadTesting/README.md
new file mode 100644
index 000000000000..17f458429205
--- /dev/null
+++ b/src/LoadTesting/README.md
@@ -0,0 +1,270 @@
+
+# Az.LoadTesting
+This directory contains the PowerShell module for the LoadTesting service.
+
+---
+## Status
+[](https://www.powershellgallery.com/packages/Az.LoadTesting/)
+
+## Info
+- Modifiable: yes
+- Generated: all
+- Committed: yes
+- Packaged: yes
+
+---
+## Detail
+This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.
+
+## Module Requirements
+- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater
+
+## Authentication
+AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
+
+## Development
+For information on how to develop for `Az.LoadTesting`, see [how-to.md](how-to.md).
+
+
+### AutoRest Configuration
+> see https://aka.ms/autorest
+
+``` yaml
+branch: 7d98899a9e242ef529368c9ba6d1686725a8b23b
+require:
+ - $(this-folder)/../readme.azure.noprofile.md
+input-file:
+ - $(repo)/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/loadtestservice.json
+
+title: LoadTesting
+module-version: 0.1.0
+subject-prefix: ""
+
+resourcegroup-append: true
+nested-object-to-string: true
+inlining-threshold: 200
+
+directive:
+ # https://stackoverflow.microsoft.com/questions/333196
+ - where:
+ subject: .*Quota.*
+ remove: true
+ - where:
+ subject: .*OutboundNetworkDependencyEndpoint.*
+ remove: true
+
+ # Changing the command name from LoadTest to Load (New-AzLoad)
+ - select: command
+ where:
+ subject: LoadTest
+ set:
+ subject: Load
+
+ - where:
+ variant: ^Create$|^Update$|.*ViaIdentity$|.*ViaIdentityExpanded$
+ remove: true
+
+ # Removing Set command
+ - where:
+ verb: Set
+ remove: true
+
+ # Renaming managed identity type parameter
+ - where:
+ parameter-name: ManagedServiceIdentityType
+ set:
+ parameter-name: IdentityType
+
+ # Renaming user assigned identity parameter
+ - where:
+ parameter-name: IdentityUserAssignedIdentity
+ set:
+ parameter-name: IdentityUserAssigned
+
+ # Renaming encryption key parameter
+ - where:
+ parameter-name: EncryptionKeyUrl
+ set:
+ parameter-name: EncryptionKey
+
+ # Renaming encryption identity type parameter
+ - where:
+ parameter-name: PropertiesEncryptionIdentityType
+ set:
+ parameter-name: EncryptionIdentityType
+
+ # Renaming encryption identity resource id parameter
+ - where:
+ parameter-name: IdentityResourceId
+ set:
+ parameter-name: EncryptionIdentityResourceId
+ - where:
+ parameter-name: Type
+ set:
+ parameter-name: IdentityType
+
+ # Renaming output variables
+ - where:
+ property-name: EncryptionKeyUrl
+ set:
+ property-name: EncryptionKey
+
+ - where:
+ property-name: IdentityResourceId
+ set:
+ property-name: EncryptionIdentityResourceId
+
+ - where:
+ property-name: PropertiesEncryptionIdentityType
+ set:
+ property-name: EncryptionIdentityType
+
+ - where:
+ property-name: ManagedServiceIdentityType
+ set:
+ property-name: IdentityType
+
+ # formatting the output
+ - where:
+ model-name: LoadTestResource
+ set:
+ format-table:
+ properties:
+ - Name
+ - ResourceGroupName
+ - Location
+ - DataPlaneUri
+ labels:
+ ResourceGroupName: Resource group
+ DataPlaneUri: DataPlane URL
+
+ # Hiding redundant SystemData property
+ - from: source-file-csharp
+ where: $
+ transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData SystemData', 'private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData SystemData');
+
+ - from: source-file-csharp
+ where: $
+ transform: $ = $.replace(/null != property.Key && null != property.Value/g, 'null != property.Key');
+
+ # Hiding description property
+ - where:
+ parameter-name: Description
+ hide: true
+
+ - from: swagger-document
+ where: $.definitions.LoadTestProperties
+ transform: >-
+ return {
+ "description": "LoadTest resource properties.",
+ "type": "object",
+ "properties": {
+ "provisioningState": {
+ "description": "Resource provisioning state.",
+ "$ref": "#/definitions/ResourceState",
+ "readOnly": true
+ },
+ "dataPlaneURI": {
+ "description": "Resource data plane URI.",
+ "maxLength": 2083,
+ "type": "string",
+ "readOnly": true
+ },
+ "encryption": {
+ "description": "CMK Encryption property.",
+ "type": "object",
+ "$ref": "#/definitions/EncryptionProperties"
+ }
+ }
+ }
+
+ # Remove Azure-Async Operation from header
+ - from: swagger-document
+ where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName}"].put
+ transform: >-
+ return {
+ "tags": [
+ "LoadTests"
+ ],
+ "description": "Create or update LoadTest resource.",
+ "operationId": "LoadTests_CreateOrUpdate",
+ "x-ms-long-running-operation": true,
+ "x-ms-long-running-operation-options": {
+ "final-state-via": "azure-async-operation"
+ },
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
+ },
+ {
+ "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/LoadTestNameParameter"
+ },
+ {
+ "in": "body",
+ "name": "LoadTestResource",
+ "description": "LoadTest resource data",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/LoadTestResource"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#/definitions/LoadTestResource"
+ }
+ },
+ "201": {
+ "description": "Created -- LoadTest resource created",
+ "schema": {
+ "$ref": "#/definitions/LoadTestResource"
+ }
+ },
+ "default": {
+ "description": "Resource provider error response about the failure.",
+ "schema": {
+ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-examples": {
+ "LoadTests_CreateOrUpdate": {
+ "$ref": "./examples/LoadTests_CreateOrUpdate.json"
+ }
+ }
+ }
+
+ - where:
+ verb: New
+ subject: Load
+ hide: true
+
+ - where:
+ verb: Update
+ subject: Load
+ hide: true
+
+ - where:
+ verb: Get
+ subject: Load
+ hide: true
+
+ - where:
+ verb: Remove
+ subject: Load
+ hide: true
+```
diff --git a/src/LoadTesting/build-module.ps1 b/src/LoadTesting/build-module.ps1
new file mode 100644
index 000000000000..788e7db8a450
--- /dev/null
+++ b/src/LoadTesting/build-module.ps1
@@ -0,0 +1,161 @@
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
+$ErrorActionPreference = 'Stop'
+
+if($PSEdition -ne 'Core') {
+ Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
+}
+
+if(-not $Isolated -and -not $Debugger) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+
+ if($LastExitCode -ne 0) {
+ # Build failed. Don't attempt to run the module.
+ return
+ }
+
+ if($Test) {
+ . (Join-Path $PSScriptRoot 'test-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Tests failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Docs) {
+ . (Join-Path $PSScriptRoot 'generate-help.ps1')
+ if($LastExitCode -ne 0) {
+ # Docs generation failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Pack) {
+ . (Join-Path $PSScriptRoot 'pack-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Packing failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1'
+ if($Code) {
+ . $runModulePath -Code
+ } elseif($Run) {
+ . $runModulePath
+ } else {
+ Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script."
+ }
+ return
+}
+
+$binFolder = Join-Path $PSScriptRoot 'bin'
+$objFolder = Join-Path $PSScriptRoot 'obj'
+
+if(-not $Debugger) {
+ Write-Host -ForegroundColor Green 'Cleaning build folders...'
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
+
+ if((Test-Path $binFolder) -or (Test-Path $objFolder)) {
+ Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?'
+ Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.'
+ }
+
+ Write-Host -ForegroundColor Green 'Compiling module...'
+ $buildConfig = 'Debug'
+ if($Release) {
+ $buildConfig = 'Release'
+ }
+ dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo
+ if($LastExitCode -ne 0) {
+ Write-Error 'Compilation failed.'
+ }
+
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release')
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.LoadTesting.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+
+# Load DLL to use build-time cmdlets
+$null = Import-Module -Name $dll
+
+$modulePaths = $dll
+$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.LoadTesting.custom.psm1'
+if(Test-Path $customPsm1) {
+ $modulePaths = @($dll, $customPsm1)
+}
+
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+if(Test-Path $exportsFolder) {
+ $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $exportsFolder
+
+$internalFolder = Join-Path $PSScriptRoot 'internal'
+if(Test-Path $internalFolder) {
+ $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $internalFolder
+
+$psd1 = Join-Path $PSScriptRoot './Az.LoadTesting.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.LoadTesting'
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+$null = New-Item -ItemType Directory -Force -Path $examplesFolder
+
+Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
+$modelCmdlets = @()
+if ($modelCmdlets.Count -gt 0) {
+ . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
+ CreateModelCmdlet($modelCmdlets)
+}
+
+if($NoDocs) {
+ Write-Host -ForegroundColor Green 'Creating exports...'
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
+} else {
+ Write-Host -ForegroundColor Green 'Creating exports and docs...'
+ $moduleDescription = 'Microsoft Azure PowerShell: LoadTesting cmdlets'
+ $docsFolder = Join-Path $PSScriptRoot 'docs'
+ if(Test-Path $docsFolder) {
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+ }
+ $null = New-Item -ItemType Directory -Force -Path $docsFolder
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
+}
+
+Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
+$formatPs1xml = Join-Path $PSScriptRoot './Az.LoadTesting.format.ps1xml'
+Export-FormatPs1xml -FilePath $formatPs1xml
+
+Write-Host -ForegroundColor Green 'Creating psd1...'
+$customFolder = Join-Path $PSScriptRoot 'custom'
+Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid
+
+Write-Host -ForegroundColor Green 'Creating test stubs...'
+$testFolder = Join-Path $PSScriptRoot 'test'
+$null = New-Item -ItemType Directory -Force -Path $testFolder
+Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder
+
+Write-Host -ForegroundColor Green 'Creating example stubs...'
+Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/src/LoadTesting/check-dependencies.ps1 b/src/LoadTesting/check-dependencies.ps1
new file mode 100644
index 000000000000..c29591c7bfe1
--- /dev/null
+++ b/src/LoadTesting/check-dependencies.ps1
@@ -0,0 +1,65 @@
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+$ErrorActionPreference = 'Stop'
+
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) {
+ if($predicate) {
+ $module = Get-Module -ListAvailable -Name $moduleName
+ if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) {
+ $null = New-Item -ItemType Directory -Force -Path $path
+ Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..."
+ if ($requiredVersion) {
+ Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path
+ }elseif($versionMinimum) {
+ Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path
+ } else {
+ Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path
+ }
+ }
+ }
+}
+
+$ProgressPreference = 'SilentlyContinue'
+$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1
+
+$localModulesPath = Join-Path $PSScriptRoot 'generated\modules'
+if(Test-Path -Path $localModulesPath) {
+ $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
+}
+
+DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5'
+DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
+
+$tools = Join-Path $PSScriptRoot 'tools'
+$resourceDir = Join-Path $tools 'Resources'
+$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1'
+
+if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) {
+ Write-Host -ForegroundColor Green "Building local Resource module used for test..."
+ Set-Location $resourceDir
+ $null = autorest .\README.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
+ $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
+ Set-Location $HOME/.PSSharedModules/Resources
+ $null = .\build-module.ps1
+ Set-Location $PSScriptRoot
+}
diff --git a/src/LoadTesting/create-model-cmdlets.ps1 b/src/LoadTesting/create-model-cmdlets.ps1
new file mode 100644
index 000000000000..aa7fec607bdd
--- /dev/null
+++ b/src/LoadTesting/create-model-cmdlets.ps1
@@ -0,0 +1,179 @@
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+function CreateModelCmdlet {
+
+ param([string[]]$Models)
+
+ if ($Models.Count -eq 0)
+ {
+ return
+ }
+
+ $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
+ $ModuleName = ''
+ $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
+ $null = New-Item -ItemType Directory -Force -Path $OutputDir
+
+ $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
+ $Content = ''
+ $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 )
+ { $Content += get-content $_.fullname -raw
+ } }
+
+ $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content)
+ $Nodes = $Tree.ChildNodes().ChildNodes()
+ foreach ($Model in $Models)
+ {
+ $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") }
+ if ($InterfaceNode.count -eq 0) {
+ continue
+ }
+ # through a queue, we iterate all the parent models.
+ $Queue = @($InterfaceNode)
+ $visited = @("I$Model")
+ $AllInterfaceNodes = @()
+ while ($Queue.count -ne 0)
+ {
+ $AllInterfaceNodes += $Queue[0]
+ # Baselist contains the direct parent models.
+ foreach ($parent in $Queue[0].BaseList.Types)
+ {
+ if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value)))
+ {
+ $Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) })
+ $visited = [Array]$visited + $parent.Type.Right.Identifier.Value
+ }
+ }
+ $first, $Queue = $Queue
+ }
+
+ $Namespace = $InterfaceNode.Parent.Name
+ $ObjectType = $Model
+ $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
+ # remove duplicated module name
+ if ($ObjectType.StartsWith($ModuleName)) {
+ $ModulePrefix = ''
+ } else {
+ $ModulePrefix = $ModuleName
+ }
+ $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir
+
+ $ParameterDefineScriptList = New-Object System.Collections.Generic.List[string]
+ $ParameterAssignScriptList = New-Object System.Collections.Generic.List[string]
+ foreach ($Node in $AllInterfaceNodes)
+ {
+ foreach ($Member in $Node.Members)
+ {
+ $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments
+ $Required = $false
+ $Description = ""
+ $Readonly = $False
+ foreach ($Argument in $Arguments)
+ {
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Required")
+ {
+ $Required = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Description")
+ {
+ $Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"')
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly")
+ {
+ $Readonly = $Argument.Expression.Token.Value
+ }
+ }
+ if ($Readonly)
+ {
+ continue
+ }
+ $Identifier = $Member.Identifier.Value
+ $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
+ $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string]
+ if ($Required)
+ {
+ $ParameterDefinePropertyList.Add("Mandatory")
+ }
+ if ($Description -ne "")
+ {
+ $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"")
+ }
+ $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList)
+ # check whether completer is needed
+ $completer = '';
+ if($Type.Split('.').Split('.')[-2] -eq 'Support') {
+ # If Type is an array, need to strip []
+ $strippedType = $Type.Replace('[]', '')
+ $completer += "`n [ArgumentCompleter([${strippedType}])]"
+ }
+ $ParameterDefineScript = "
+ [Parameter($ParameterDefineProperty)]${completer}
+ [${Type}]
+ `$${Identifier}"
+ $ParameterDefineScriptList.Add($ParameterDefineScript)
+ $ParameterAssignScriptList.Add("
+ if (`$PSBoundParameters.ContainsKey('${Identifier}')) {
+ `$Object.${Identifier} = `$${Identifier}
+ }")
+ }
+ }
+ $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator ","
+ $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator ""
+
+ $Script = "
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create an in-memory object for ${ObjectType}.
+.Description
+Create an in-memory object for ${ObjectType}.
+
+.Outputs
+${ObjectTypeWithNamespace}
+.Link
+https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
+#>
+function New-Az${ModulePrefix}${ObjectType}Object {
+ [OutputType('${ObjectTypeWithNamespace}')]
+ [CmdletBinding(PositionalBinding=`$false)]
+ Param(
+${ParameterDefineScript}
+ )
+
+ process {
+ `$Object = [${ObjectTypeWithNamespace}]::New()
+${ParameterAssignScript}
+ return `$Object
+ }
+}
+"
+ Set-Content -Path $OutputPath -Value $Script
+ }
+}
diff --git a/src/LoadTesting/custom/Az.LoadTesting.custom.psm1 b/src/LoadTesting/custom/Az.LoadTesting.custom.psm1
new file mode 100644
index 000000000000..f7fb31414326
--- /dev/null
+++ b/src/LoadTesting/custom/Az.LoadTesting.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.LoadTesting.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.LoadTesting.internal.psm1'
+ if(Test-Path $internalModulePath) {
+ $null = Import-Module -Name $internalModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export script cmdlets
+ Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias)
+# endregion
diff --git a/src/LoadTesting/custom/Get-AzLoad.ps1 b/src/LoadTesting/custom/Get-AzLoad.ps1
new file mode 100644
index 000000000000..a07695efadf8
--- /dev/null
+++ b/src/LoadTesting/custom/Get-AzLoad.ps1
@@ -0,0 +1,114 @@
+
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the details of an Azure Load Testing resource.
+.Description
+Get the details of an Azure Load Testing resource.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/get-azload
+#>
+function Get-AzLoad {
+ [OutputType([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource])]
+ [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+ param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+ )
+
+ process {
+ try {
+ Az.LoadTesting.internal\Get-AzLoad @PSBoundParameters
+ }
+ catch {
+ throw
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/src/LoadTesting/custom/LoadTestResourceCustom.cs b/src/LoadTesting/custom/LoadTestResourceCustom.cs
new file mode 100644
index 000000000000..80f1ffb01fed
--- /dev/null
+++ b/src/LoadTesting/custom/LoadTestResourceCustom.cs
@@ -0,0 +1,20 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ public partial class EncryptionPropertiesIdentity
+ {
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container){
+ if(string.Empty.Equals(this.ResourceId))
+ {
+ container.Remove("resourceId");
+ container.Add("resourceId", Runtime.Json.XNull.Instance);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/custom/New-AzLoad.ps1 b/src/LoadTesting/custom/New-AzLoad.ps1
new file mode 100644
index 000000000000..f927eb13d650
--- /dev/null
+++ b/src/LoadTesting/custom/New-AzLoad.ps1
@@ -0,0 +1,198 @@
+
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a new Azure Load Testing resource.
+.Description
+Creates a new Azure Load Testing resource in the resource group.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/new-azload
+#>
+function New-AzLoad {
+ [OutputType([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource])]
+ [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+ param(
+ [Parameter(Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the new Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # Location where the Azure Load Testing resource needs to be created.
+ ${Location},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # The managed identity for Customer-managed key settings defining which identity should be used to authenticate to Key Vault.
+ # Ex: '/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId' uses the given user-assigned managed identity.
+ ${EncryptionIdentity},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # Encryption key URL, versioned.
+ # Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78.
+ ${EncryptionKey},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType]
+ # Type of managed identity.
+ ${IdentityType},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities]))]
+ [System.Collections.Hashtable]
+ # The list of user assigned identities associated with the resource. The user identity will be ARM resource ids.
+ # The User Assigned Identity is a hashtable with keys in the form of an ARM resource id '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ # The values of the keys are empty objects ({}) in requests.
+ ${IdentityUserAssigned},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceTags]))]
+ [System.Collections.Hashtable]
+ # Key-value pairs in the form of a hash table set as tags on the server. For example: @{key0="value0";key1=$null;key2="value2"}.
+ ${Tag},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(ParameterSetName='CreateExpanded', DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(ParameterSetName='CreateExpanded', DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(ParameterSetName='CreateExpanded', DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(ParameterSetName='CreateExpanded', DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(ParameterSetName='CreateExpanded', DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(ParameterSetName='CreateExpanded', DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+ )
+
+ process {
+ try {
+ # if encyyption identity has a value, populate the encryption identity type and encryption identity resource id
+ # add the managed identity to the list of user assigned identities
+ if ($PSBoundParameters.ContainsKey('EncryptionIdentity')) {
+ $null = $PSBoundParameters.Add("EncryptionIdentityResourceId", $PSBoundParameters['EncryptionIdentity'])
+ $null = $PSBoundParameters.Add("EncryptionIdentityType", 'UserAssigned')
+ $null = $PSBoundParameters.Remove('EncryptionIdentity')
+
+ # Update the identity type
+ if($PSBoundParameters.ContainsKey('IdentityType')) {
+ if($PSBoundParameters['IdentityType'].ToString().ToLower() -eq 'none') {
+ $null = $PSBoundParameters.Add("IdentityType", 'UserAssigned')
+ }
+ elseif($PSBoundParameters['IdentityType'].ToString().ToLower() -eq 'systemassigned') {
+ $null = $PSBoundParameters.Add("IdentityType", 'SystemAssigned,UserAssigned')
+ }
+ }
+ else {
+ $null = $PSBoundParameters.Add("IdentityType", 'UserAssigned')
+ }
+
+ # Update the User Assigned Identities
+ if ($PSBoundParameters.ContainsKey('IdentityUserAssigned')) {
+ if ($null -eq $PSBoundParameters['IdentityUserAssigned']){
+ $PSBoundParameters['IdentityUserAssigned'] = @{}
+ }
+ $PSBoundParameters['IdentityUserAssigned'][$PSBoundParameters['EncryptionIdentityResourceId']] = @{}
+ }
+ else {
+ $null = $PSBoundParameters.Add("IdentityUserAssigned", @{ $PSBoundParameters['EncryptionIdentityResourceId'] = @{} })
+ }
+ }
+ Az.LoadTesting.internal\New-AzLoad @PSBoundParameters
+ }
+ catch {
+ throw
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/custom/README.md b/src/LoadTesting/custom/README.md
new file mode 100644
index 000000000000..35fd9a5da905
--- /dev/null
+++ b/src/LoadTesting/custom/README.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.LoadTesting` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.LoadTesting.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.LoadTesting` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*.
+
+For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.LoadTesting.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.
+
+For script cmdlets, these are loaded via the `Az.LoadTesting.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
+
+## Purpose
+This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
+
+## Usage
+The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
+- Break
+- DefaultProfile
+- HttpPipelineAppend
+- HttpPipelinePrepend
+- Proxy
+- ProxyCredential
+- ProxyUseDefaultCredentials
+
+These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.LoadTesting`. For C#, follow the usage seen in the `ProcessRecordAsync` method.
+
+### Attributes
+For processing the cmdlets, we've created some additional attributes:
+- `Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DescriptionAttribute`
+ - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
+- `Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.LoadTesting`.
+- `Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.LoadTesting`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.ProfileAttribute`
+ - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
\ No newline at end of file
diff --git a/src/LoadTesting/custom/Remove-AzLoad.ps1 b/src/LoadTesting/custom/Remove-AzLoad.ps1
new file mode 100644
index 000000000000..4579e27c950a
--- /dev/null
+++ b/src/LoadTesting/custom/Remove-AzLoad.ps1
@@ -0,0 +1,131 @@
+
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Delete an Azure Load Testing resource.
+.Description
+Delete an Azure Load Testing resource.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+System.Boolean
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/remove-azload
+#>
+function Remove-AzLoad {
+ [OutputType([System.Boolean])]
+ [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+ param(
+ [Parameter(Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+ )
+
+ process {
+ try {
+ Az.LoadTesting.internal\Remove-AzLoad @PSBoundParameters
+ }
+ catch {
+ throw
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/src/LoadTesting/custom/Update-AzLoad.ps1 b/src/LoadTesting/custom/Update-AzLoad.ps1
new file mode 100644
index 000000000000..b6785ebb2472
--- /dev/null
+++ b/src/LoadTesting/custom/Update-AzLoad.ps1
@@ -0,0 +1,211 @@
+
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Update an Azure Load Testing resource.
+.Description
+Updates an Azure Load Testing resource in a given resource group.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/update-azload
+#>
+function Update-AzLoad {
+ [OutputType([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource])]
+ [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+ param(
+ [Parameter(Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # The managed identity for Customer-managed key settings defining which identity should be used to authenticate to Key Vault.
+ # Ex: 'SystemAssigned' uses system-assigned managed identity, whereas '/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId' uses the given user-assigned managed identity.
+ ${EncryptionIdentity},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # Encryption key URL, versioned.
+ # Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78.
+ ${EncryptionKey},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType]
+ # Type of managed identity.
+ ${IdentityType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities]))]
+ [System.Collections.Hashtable]
+ # The list of user assigned identities associated with the resource. The user identity will be ARM resource ids.
+ # The User Assigned Identity is a hashtable with keys in the form of an ARM resource id '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ # The values of the keys can be empty objects ({}) to assign an identity and $null to remove an existing identity.
+ ${IdentityUserAssigned},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags]))]
+ [System.Collections.Hashtable]
+ # Key-value pairs in the form of a hash table set as tags on the server. For example: @{key0="value0";key1=$null;key2="value2"}.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+ )
+
+ process {
+ try {
+ # if encyyption identity has a value, populate the encryption identity type and encryption identity resource id
+ # if encryption identity has value SystemAssigned, populate the encryption identity type as SystemAssigned and encryption identity resource id as null
+ # else populate the encryption identity type as UserAssigned and encryption identity resource id as the value of encryption identity
+ if ($PSBoundParameters.ContainsKey('EncryptionIdentity')) {
+ if($PSBoundParameters['EncryptionIdentity'].ToLower() -eq 'systemassigned') {
+ $null = $PSBoundParameters.Add("EncryptionIdentityType", 'SystemAssigned')
+ if($PSBoundParameters.ContainsKey('EncryptionIdentityResourceId')) {
+ $PSBoundParameters['EncryptionIdentityResourceId'] = $null
+ }
+ else {
+ $PSBoundParameters.Add('EncryptionIdentityResourceId', $null)
+ }
+
+ # Update the identity type only if the input does not contain the encryption identity type
+ if($PSBoundParameters.ContainsKey('IdentityType')) {
+ if($PSBoundParameters['IdentityType'].ToString().ToLower() -eq 'none') {
+ $PSBoundParameters['IdentityType'] = 'SystemAssigned'
+ }
+ elseif($PSBoundParameters['IdentityType'].ToString().ToLower() -eq 'userassigned') {
+ $PSBoundParameters['IdentityType'] = 'SystemAssigned,UserAssigned'
+ }
+ }
+ }
+ else {
+ $null = $PSBoundParameters.Add("EncryptionIdentityResourceId", $PSBoundParameters['EncryptionIdentity'])
+ $null = $PSBoundParameters.Add("EncryptionIdentityType", 'UserAssigned')
+
+ # Update the identity type only if the input does not contain the encryption identity type
+ if($PSBoundParameters.ContainsKey('IdentityType')) {
+ if($PSBoundParameters['IdentityType'].ToString().ToLower() -eq 'none') {
+ $PSBoundParameters['IdentityType'] = 'UserAssigned'
+ }
+ if($PSBoundParameters['IdentityType'].ToString().ToLower() -eq 'systemassigned') {
+ $PSBoundParameters['IdentityType'] = 'SystemAssigned,UserAssigned'
+ }
+
+ if ($PSBoundParameters.ContainsKey('IdentityUserAssigned')) {
+ if ($null -eq $PSBoundParameters['IdentityUserAssigned']) {
+ $PSBoundParameters['IdentityUserAssigned'] = @{}
+ }
+ $PSBoundParameters['IdentityUserAssigned'][$PSBoundParameters['EncryptionIdentityResourceId']] = @{}
+ }
+ else {
+ $null = $PSBoundParameters.Add("IdentityUserAssigned", @{ $PSBoundParameters['EncryptionIdentityResourceId'] = @{} })
+ }
+ }
+ }
+ $null = $PSBoundParameters.Remove('EncryptionIdentity')
+ }
+ Az.LoadTesting.internal\Update-AzLoad @PSBoundParameters
+ }
+ catch {
+ throw
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/src/LoadTesting/custom/UserAssignedIdentitiesCustom.cs b/src/LoadTesting/custom/UserAssignedIdentitiesCustom.cs
new file mode 100644
index 000000000000..b08f68089f3e
--- /dev/null
+++ b/src/LoadTesting/custom/UserAssignedIdentitiesCustom.cs
@@ -0,0 +1,24 @@
+// 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.LoadTesting.Models.Api50
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+ public partial class UserAssignedIdentities
+ {
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container) {
+ if (this.__additionalProperties != null)
+ {
+ foreach (var key in this.__additionalProperties)
+ {
+ if (key.Value == null)
+ {
+ container.Add(key.Key, Runtime.Json.XNull.Instance);
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/examples/Get-AzLoad.md b/src/LoadTesting/examples/Get-AzLoad.md
new file mode 100644
index 000000000000..cfa1b49635ad
--- /dev/null
+++ b/src/LoadTesting/examples/Get-AzLoad.md
@@ -0,0 +1,40 @@
+### Example 1: Get all Azure Load Testing resources in a subscription
+```powershell
+Get-AzLoad
+```
+
+```output
+Name Resource group Location DataPlane URL
+---- -------------- -------- -------------
+sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
+sampleres1 sample-rg eastus 00000000-0000-0000-0000-000000000001.eastus.cnt-prod.loadtesting.azure.com
+```
+
+This command lists all Azure Load Testing resources in the subscription.
+
+### Example 2: Get all Azure Load Testing resources in a resource group
+```powershell
+Get-AzLoad -ResourceGroupName sample-rg
+```
+
+```output
+Name Resource group Location DataPlane URL
+---- -------------- -------- -------------
+sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
+sampleres1 sample-rg eastus 00000000-0000-0000-0000-000000000001.eastus.cnt-prod.loadtesting.azure.com
+```
+
+This command lists all Azure Load Testing resources in resource group named sample-rg.
+
+### Example 3: Get the details of an Azure Load Testing resource
+```powershell
+Get-AzLoad -Name sampleres -ResourceGroupName sample-rg
+```
+
+```output
+Name Resource group Location DataPlane URL
+---- -------------- -------- -------------
+sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
+```
+
+This command gets the details of the Azure Load Testing resource named sampleres in resource group named sample-rg.
diff --git a/src/LoadTesting/examples/New-AzLoad.md b/src/LoadTesting/examples/New-AzLoad.md
new file mode 100644
index 000000000000..afed23ea9f46
--- /dev/null
+++ b/src/LoadTesting/examples/New-AzLoad.md
@@ -0,0 +1,56 @@
+### Example 1: Create an Azure Load Testing resource
+```powershell
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus
+```
+
+```output
+Name Resource group Location DataPlane URL
+---- -------------- -------- -------------
+sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
+```
+
+This command creates a new Azure Load Testing resource named sampleres in resource group named sample-rg and in the region East US.
+
+### Example 2: Create an Azure Load Testing resource with Managed Identity
+```powershell
+$userAssigned = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" = @{}; "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2" = @{}}
+
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus -IdentityType "SystemAssigned,UserAssigned" -IdentityUserAssigned $userAssigned
+```
+
+```output
+Name Resource group Location DataPlane URL
+---- -------------- -------- -------------
+sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
+```
+
+This command creates a new Azure Load Testing resource named sampleres in resource group named sample-rg and in the region East US, with System-Assigned and 2 provided User-Assigned managed identities.
+
+### Example 3: Create an Azure Load Testing resource with Customer Managed key encryption
+```powershell
+$userAssigned = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" = @{}}
+
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus -IdentityType "SystemAssigned,UserAssigned" -IdentityUserAssigned $userAssigned -EncryptionIdentity "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" -EncryptionKey "https://sample-akv.vault.azure.net/keys/cmk/2d1ccd5c50234ea2a0858fe148b69cde"
+```
+
+```output
+Name Resource group Location DataPlane URL
+---- -------------- -------- -------------
+sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
+```
+
+This command creates a new Azure Load Testing resource named sampleres in resource group named sample-rg and in the region East US, with the provided User-Assigned managed identity and uses the Encryption Identity to access the Encryption Key for CMK encryption.
+
+### Example 4: Create an Azure Load Testing resource with tags
+```powershell
+$tag = @{"key1" = "value1"; "key2" = "value2"}
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus -Tag $tag
+```
+
+```output
+Name Resource group Location DataPlane URL
+---- -------------- -------- -------------
+sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
+```
+
+This command creates a new Azure Load Testing resource named sampleres in resource group named sample-rg and in the region East US with the provided tags.
diff --git a/src/LoadTesting/examples/Remove-AzLoad.md b/src/LoadTesting/examples/Remove-AzLoad.md
new file mode 100644
index 000000000000..b00826fbddfa
--- /dev/null
+++ b/src/LoadTesting/examples/Remove-AzLoad.md
@@ -0,0 +1,9 @@
+### Example 1: Delete an Azure Load Testing resource
+```powershell
+Remove-AzLoad -Name sampleres1 -ResourceGroupName sample-rg
+```
+
+```output
+```
+
+This command deletes the Azure Load Testing resource named sampleres1 in resource group named sample-rg.
diff --git a/src/LoadTesting/examples/Update-AzLoad.md b/src/LoadTesting/examples/Update-AzLoad.md
new file mode 100644
index 000000000000..b7707e1e512f
--- /dev/null
+++ b/src/LoadTesting/examples/Update-AzLoad.md
@@ -0,0 +1,41 @@
+### Example 1: Update an Azure Load Testing resource with tags
+```powershell
+$tag = @{"key0" = "value0"}
+Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -Tag $tag
+```
+
+```output
+Name Resource group Location DataPlane URL
+---- -------------- -------- -------------
+sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
+```
+
+This command updates the Azure Load Testing resource named sampleres in resource group named sample-rg with the provided tags.
+
+### Example 2: Update an Azure Load Testing resource to use System-Assigned identity for CMK encryption
+```powershell
+Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -IdentityType "SystemAssigned" -EncryptionIdentity "SystemAssigned" -EncryptionKey "https://sample-akv.vault.azure.net/keys/cmk/2d1ccd5c50234ea2a0858fe148b69cde"
+```
+
+```output
+Name Resource group Location DataPlane URL
+---- -------------- -------- -------------
+sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
+```
+
+This command updates the Azure Load Testing resource named sampleres in resource group named sample-rg, to use System-assigned identity for accessing the encryption key for CMK encryption.
+
+### Example 3: Update an Azure Load Testing resource to remove an existing User-Assigned managed identity
+```powershell
+$userAssigned = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" = @{}; "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2" = $null}
+
+Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -IdentityType "SystemAssigned,UserAssigned" -IdentityUserAssigned $userAssigned
+```
+
+```output
+Name Resource group Location DataPlane URL
+---- -------------- -------- -------------
+sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
+```
+
+This command updates the Azure Load Testing resource named sampleres in resource group named sample-rg, to remove the user-assigned managed identity "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2" if already assigned to the resource.
diff --git a/src/LoadTesting/export-surface.ps1 b/src/LoadTesting/export-surface.ps1
new file mode 100644
index 000000000000..e288a725bae0
--- /dev/null
+++ b/src/LoadTesting/export-surface.ps1
@@ -0,0 +1,41 @@
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.LoadTesting.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.LoadTesting'
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+$resourcesFolder = Join-Path $PSScriptRoot 'resources'
+
+Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'"
+
+Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'"
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/LoadTesting/exports/Get-AzLoad.ps1 b/src/LoadTesting/exports/Get-AzLoad.ps1
new file mode 100644
index 000000000000..814a5537b33d
--- /dev/null
+++ b/src/LoadTesting/exports/Get-AzLoad.ps1
@@ -0,0 +1,184 @@
+
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the details of an Azure Load Testing resource.
+.Description
+Get the details of an Azure Load Testing resource.
+.Example
+Get-AzLoad
+.Example
+Get-AzLoad -ResourceGroupName sample-rg
+.Example
+Get-AzLoad -Name sampleres -ResourceGroupName sample-rg
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/get-azload
+#>
+function Get-AzLoad {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.LoadTesting.custom\Get-AzLoad';
+ Get = 'Az.LoadTesting.custom\Get-AzLoad';
+ List1 = 'Az.LoadTesting.custom\Get-AzLoad';
+ }
+ if (('List', 'Get', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/LoadTesting/exports/New-AzLoad.ps1 b/src/LoadTesting/exports/New-AzLoad.ps1
new file mode 100644
index 000000000000..16d621b16fa8
--- /dev/null
+++ b/src/LoadTesting/exports/New-AzLoad.ps1
@@ -0,0 +1,245 @@
+
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a new Azure Load Testing resource.
+.Description
+Creates a new Azure Load Testing resource in the resource group.
+.Example
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus
+.Example
+$userAssigned = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" = @{}; "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2" = @{}}
+
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus -IdentityType "SystemAssigned,UserAssigned" -IdentityUserAssigned $userAssigned
+.Example
+$userAssigned = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" = @{}}
+
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus -IdentityType "SystemAssigned,UserAssigned" -IdentityUserAssigned $userAssigned -EncryptionIdentity "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" -EncryptionKey "https://sample-akv.vault.azure.net/keys/cmk/2d1ccd5c50234ea2a0858fe148b69cde"
+.Example
+$tag = @{"key1" = "value1"; "key2" = "value2"}
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus -Tag $tag
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/new-azload
+#>
+function New-AzLoad {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the new Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # Location where the Azure Load Testing resource needs to be created.
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # The managed identity for Customer-managed key settings defining which identity should be used to authenticate to Key Vault.
+ # Ex: '/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId' uses the given user-assigned managed identity.
+ ${EncryptionIdentity},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # Encryption key URL, versioned.
+ # Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78.
+ ${EncryptionKey},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType]
+ # Type of managed identity.
+ ${IdentityType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities]))]
+ [System.Collections.Hashtable]
+ # The list of user assigned identities associated with the resource.
+ # The user identity will be ARM resource ids.
+ # The User Assigned Identity is a hashtable with keys in the form of an ARM resource id '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ # The values of the keys are empty objects ({}) in requests.
+ ${IdentityUserAssigned},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceTags]))]
+ [System.Collections.Hashtable]
+ # Key-value pairs in the form of a hash table set as tags on the server.
+ # For example: @{key0="value0";key1=$null;key2="value2"}.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.LoadTesting.custom\New-AzLoad';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/LoadTesting/exports/ProxyCmdletDefinitions.ps1 b/src/LoadTesting/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..778d1174c9b7
--- /dev/null
+++ b/src/LoadTesting/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,815 @@
+
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the details of an Azure Load Testing resource.
+.Description
+Get the details of an Azure Load Testing resource.
+.Example
+Get-AzLoad
+.Example
+Get-AzLoad -ResourceGroupName sample-rg
+.Example
+Get-AzLoad -Name sampleres -ResourceGroupName sample-rg
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/get-azload
+#>
+function Get-AzLoad {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.LoadTesting.custom\Get-AzLoad';
+ Get = 'Az.LoadTesting.custom\Get-AzLoad';
+ List1 = 'Az.LoadTesting.custom\Get-AzLoad';
+ }
+ if (('List', 'Get', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Create a new Azure Load Testing resource.
+.Description
+Creates a new Azure Load Testing resource in the resource group.
+.Example
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus
+.Example
+$userAssigned = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" = @{}; "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2" = @{}}
+
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus -IdentityType "SystemAssigned,UserAssigned" -IdentityUserAssigned $userAssigned
+.Example
+$userAssigned = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" = @{}}
+
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus -IdentityType "SystemAssigned,UserAssigned" -IdentityUserAssigned $userAssigned -EncryptionIdentity "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" -EncryptionKey "https://sample-akv.vault.azure.net/keys/cmk/2d1ccd5c50234ea2a0858fe148b69cde"
+.Example
+$tag = @{"key1" = "value1"; "key2" = "value2"}
+New-AzLoad -Name sampleres -ResourceGroupName sample-rg -Location eastus -Tag $tag
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/new-azload
+#>
+function New-AzLoad {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the new Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # Location where the Azure Load Testing resource needs to be created.
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # The managed identity for Customer-managed key settings defining which identity should be used to authenticate to Key Vault.
+ # Ex: '/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId' uses the given user-assigned managed identity.
+ ${EncryptionIdentity},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # Encryption key URL, versioned.
+ # Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78.
+ ${EncryptionKey},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType]
+ # Type of managed identity.
+ ${IdentityType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities]))]
+ [System.Collections.Hashtable]
+ # The list of user assigned identities associated with the resource.
+ # The user identity will be ARM resource ids.
+ # The User Assigned Identity is a hashtable with keys in the form of an ARM resource id '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ # The values of the keys are empty objects ({}) in requests.
+ ${IdentityUserAssigned},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceTags]))]
+ [System.Collections.Hashtable]
+ # Key-value pairs in the form of a hash table set as tags on the server.
+ # For example: @{key0="value0";key1=$null;key2="value2"}.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.LoadTesting.custom\New-AzLoad';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Delete an Azure Load Testing resource.
+.Description
+Delete an Azure Load Testing resource.
+.Example
+Remove-AzLoad -Name sampleres1 -ResourceGroupName sample-rg
+
+.Outputs
+System.Boolean
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/remove-azload
+#>
+function Remove-AzLoad {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Delete = 'Az.LoadTesting.custom\Remove-AzLoad';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Update an Azure Load Testing resource.
+.Description
+Updates an Azure Load Testing resource in a given resource group.
+.Example
+$tag = @{"key0" = "value0"}
+Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -Tag $tag
+.Example
+Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -IdentityType "SystemAssigned" -EncryptionIdentity "SystemAssigned" -EncryptionKey "https://sample-akv.vault.azure.net/keys/cmk/2d1ccd5c50234ea2a0858fe148b69cde"
+.Example
+$userAssigned = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" = @{}; "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2" = $null}
+
+Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -IdentityType "SystemAssigned,UserAssigned" -IdentityUserAssigned $userAssigned
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/update-azload
+#>
+function Update-AzLoad {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # The managed identity for Customer-managed key settings defining which identity should be used to authenticate to Key Vault.
+ #
+ # Ex: 'SystemAssigned' uses system-assigned managed identity, whereas '/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId' uses the given user-assigned managed identity.
+ ${EncryptionIdentity},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # Encryption key URL, versioned.
+ # Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78.
+ ${EncryptionKey},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType]
+ # Type of managed identity.
+ ${IdentityType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities]))]
+ [System.Collections.Hashtable]
+ # The list of user assigned identities associated with the resource.
+ # The user identity will be ARM resource ids.
+ # The User Assigned Identity is a hashtable with keys in the form of an ARM resource id '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ # The values of the keys can be empty objects ({}) to assign an identity and $null to remove an existing identity.
+ ${IdentityUserAssigned},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags]))]
+ [System.Collections.Hashtable]
+ # Key-value pairs in the form of a hash table set as tags on the server.
+ # For example: @{key0="value0";key1=$null;key2="value2"}.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ UpdateExpanded = 'Az.LoadTesting.custom\Update-AzLoad';
+ }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/LoadTesting/exports/README.md b/src/LoadTesting/exports/README.md
new file mode 100644
index 000000000000..6edf7ea64cc7
--- /dev/null
+++ b/src/LoadTesting/exports/README.md
@@ -0,0 +1,20 @@
+# Exports
+This directory contains the cmdlets *exported by* `Az.LoadTesting`. No other cmdlets in this repository are directly exported. What that means is the `Az.LoadTesting` module will run [Export-ModuleMember](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation.
+
+## Info
+- Modifiable: no
+- Generated: all
+- Committed: no
+- Packaged: yes
+
+## Details
+The cmdlets generated here are created every time you run `build-module.ps1`. These cmdlets are a merge of all (excluding `InternalExport`) cmdlets from the private binary (`..\bin\Az.LoadTesting.private.dll`) and from the `..\custom\Az.LoadTesting.custom.psm1` module. Cmdlets that are *not merged* from those directories are decorated with the `InternalExport` attribute. This happens when you set the cmdlet to **hide** from configuration. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) or the [README.md](..\internal/README.md) in the `..\internal` folder.
+
+## Purpose
+We generate script cmdlets out of the binary cmdlets and custom cmdlets. The format of script cmdlets are simplistic; thus, easier to generate at build time. Generating the cmdlets is required as to allow merging of generated binary, hand-written binary, and hand-written custom cmdlets. For Azure cmdlets, having script cmdlets simplifies the mechanism for exporting Azure profiles.
+
+## Structure
+The cmdlets generated here will flat in the directory (no sub-folders) as long as there are no Azure profiles specified for any cmdlets. Azure profiles (the `Profiles` attribute) is only applied when generating with the `--azure` attribute (or `azure: true` in the configuration). When Azure profiles are applied, the folder structure has a folder per profile. Each profile folder has only those cmdlets that apply to that profile.
+
+## Usage
+When `./Az.LoadTesting.psm1` is loaded, it dynamically exports cmdlets here based on the folder structure and on the selected profile. If there are no sub-folders, it exports all cmdlets at the root of this folder. If there are sub-folders, it checks to see the selected profile. If no profile is selected, it exports the cmdlets in the last sub-folder (alphabetically). If a profile is selected, it exports the cmdlets in the sub-folder that matches the profile name. If there is no sub-folder that matches the profile name, it exports no cmdlets and writes a warning message.
\ No newline at end of file
diff --git a/src/LoadTesting/exports/Remove-AzLoad.ps1 b/src/LoadTesting/exports/Remove-AzLoad.ps1
new file mode 100644
index 000000000000..b7f03151fb95
--- /dev/null
+++ b/src/LoadTesting/exports/Remove-AzLoad.ps1
@@ -0,0 +1,195 @@
+
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Delete an Azure Load Testing resource.
+.Description
+Delete an Azure Load Testing resource.
+.Example
+Remove-AzLoad -Name sampleres1 -ResourceGroupName sample-rg
+
+.Outputs
+System.Boolean
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/remove-azload
+#>
+function Remove-AzLoad {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Delete = 'Az.LoadTesting.custom\Remove-AzLoad';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/LoadTesting/exports/Update-AzLoad.ps1 b/src/LoadTesting/exports/Update-AzLoad.ps1
new file mode 100644
index 000000000000..e7aebcf293f9
--- /dev/null
+++ b/src/LoadTesting/exports/Update-AzLoad.ps1
@@ -0,0 +1,236 @@
+
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Update an Azure Load Testing resource.
+.Description
+Updates an Azure Load Testing resource in a given resource group.
+.Example
+$tag = @{"key0" = "value0"}
+Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -Tag $tag
+.Example
+Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -IdentityType "SystemAssigned" -EncryptionIdentity "SystemAssigned" -EncryptionKey "https://sample-akv.vault.azure.net/keys/cmk/2d1ccd5c50234ea2a0858fe148b69cde"
+.Example
+$userAssigned = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" = @{}; "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2" = $null}
+
+Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -IdentityType "SystemAssigned,UserAssigned" -IdentityUserAssigned $userAssigned
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource
+.Link
+https://learn.microsoft.com/powershell/module/az.loadtesting/update-azload
+#>
+function Update-AzLoad {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('LoadTestName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the Azure Load Testing resource.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [System.String]
+ # Name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # The managed identity for Customer-managed key settings defining which identity should be used to authenticate to Key Vault.
+ #
+ # Ex: 'SystemAssigned' uses system-assigned managed identity, whereas '/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId' uses the given user-assigned managed identity.
+ ${EncryptionIdentity},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [System.String]
+ # Encryption key URL, versioned.
+ # Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78.
+ ${EncryptionKey},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType]
+ # Type of managed identity.
+ ${IdentityType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities]))]
+ [System.Collections.Hashtable]
+ # The list of user assigned identities associated with the resource.
+ # The user identity will be ARM resource ids.
+ # The User Assigned Identity is a hashtable with keys in the form of an ARM resource id '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ # The values of the keys can be empty objects ({}) to assign an identity and $null to remove an existing identity.
+ ${IdentityUserAssigned},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags]))]
+ [System.Collections.Hashtable]
+ # Key-value pairs in the form of a hash table set as tags on the server.
+ # For example: @{key0="value0";key1=$null;key2="value2"}.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ UpdateExpanded = 'Az.LoadTesting.custom\Update-AzLoad';
+ }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/LoadTesting/generate-help.ps1 b/src/LoadTesting/generate-help.ps1
new file mode 100644
index 000000000000..6702651aacc6
--- /dev/null
+++ b/src/LoadTesting/generate-help.ps1
@@ -0,0 +1,74 @@
+# ----------------------------------------------------------------------------------
+# 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,
+# 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.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+if(-not (Test-Path $exportsFolder)) {
+ Write-Error "Exports folder '$exportsFolder' was not found."
+}
+
+$directories = Get-ChildItem -Directory -Path $exportsFolder
+$hasProfiles = ($directories | Measure-Object).Count -gt 0
+if(-not $hasProfiles) {
+ $directories = Get-Item -Path $exportsFolder
+}
+
+$docsFolder = Join-Path $PSScriptRoot 'docs'
+if(Test-Path $docsFolder) {
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $docsFolder -ErrorAction SilentlyContinue
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+
+$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.LoadTesting.psd1')
+$modulePath = $modulePsd1.FullName
+$moduleName = $modulePsd1.BaseName
+
+# Load DLL to use build-time cmdlets
+Import-Module -Name $modulePath
+Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.LoadTesting.private.dll')
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Module]::Instance
+# Module info is shared per profile
+$moduleInfo = Get-Module -Name $moduleName
+
+foreach($directory in $directories)
+{
+ if($hasProfiles) {
+ Select-AzProfile -Name $directory.Name
+ }
+ # Reload module per profile
+ Import-Module -Name $modulePath -Force
+
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $directory.FullName
+ $cmdletHelpInfo = $cmdletNames | ForEach-Object { Get-Help -Name $_ -Full }
+ $cmdletFunctionInfo = Get-ScriptCmdlet -ScriptFolder $directory.FullName -AsFunctionInfo
+
+ $docsPath = Join-Path $docsFolder $directory.Name
+ $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue
+ $examplesPath = Join-Path $examplesFolder $directory.Name
+
+ Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath
+ Write-Host -ForegroundColor Green "Created documentation in '$docsPath'"
+}
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/LoadTesting/generate-info.json b/src/LoadTesting/generate-info.json
new file mode 100644
index 000000000000..3a653d26e3e2
--- /dev/null
+++ b/src/LoadTesting/generate-info.json
@@ -0,0 +1,8 @@
+{
+ "swagger_commit": "71121282e39bccae590462648e77bca283df6d2b",
+ "node": "v14.15.5",
+ "autorest": "`-- (empty)",
+ "autorest_core": "3.9.4",
+ "autorest_modelerfour": "4.15.414",
+ "autorest_powershell": "3.0.498"
+}
diff --git a/src/LoadTesting/generated/Module.cs b/src/LoadTesting/generated/Module.cs
new file mode 100644
index 000000000000..cfc82b0addb5
--- /dev/null
+++ b/src/LoadTesting/generated/Module.cs
@@ -0,0 +1,181 @@
+// 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.LoadTesting
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+ using SendAsyncStepDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>;
+ using PipelineChangeDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>;
+ using GetParameterDelegate = global::System.Func;
+ using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>;
+ using ArgumentCompleterDelegate = global::System.Func;
+ using GetTelemetryIdDelegate = global::System.Func;
+ using TelemetryDelegate = global::System.Action;
+ using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>;
+ using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>;
+ using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>;
+ using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>;
+
+ /// A class that contains the module-common code and data.
+ public partial class Module
+ {
+ /// The currently selected profile.
+ public string Profile = global::System.String.Empty;
+
+ public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler();
+
+ /// the ISendAsync pipeline instance
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpPipeline _pipeline;
+
+ /// the ISendAsync pipeline instance (when proxy is enabled)
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpPipeline _pipelineWithProxy;
+
+ public bool _useProxy = false;
+
+ public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy();
+
+ /// Gets completion data for azure specific fields
+ public ArgumentCompleterDelegate ArgumentCompleter { get; set; }
+
+ /// The instance of the Client API
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.LoadTesting ClientAPI { get; set; }
+
+ /// A delegate that gets called for each signalled event
+ public EventListenerDelegate EventListener { get; set; }
+
+ /// The delegate to call to get parameter data from a common module.
+ public GetParameterDelegate GetParameterValue { get; set; }
+
+ /// The delegate to get the telemetry Id.
+ public GetTelemetryIdDelegate GetTelemetryId { get; set; }
+
+ /// Backing field for property.
+ private static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Module _instance;
+
+ /// the singleton of this module class
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Module());
+
+ /// The Name of this module
+ public string Name => @"Az.LoadTesting";
+
+ /// The delegate to call when this module is loaded (supporting a commmon module).
+ public ModuleLoadPipelineDelegate OnModuleLoad { get; set; }
+
+ /// The delegate to call before each new request (supporting a commmon module).
+ public NewRequestPipelineDelegate OnNewRequest { get; set; }
+
+ /// The name of the currently selected Azure profile
+ public global::System.String ProfileName { get; set; }
+
+ /// The ResourceID for this module (azure arm).
+ public string ResourceId => @"Az.LoadTesting";
+
+ /// The delegate for creating a telemetry.
+ public TelemetryDelegate Telemetry { get; set; }
+
+ /// The from the cmdlet
+ /// The HttpPipeline for the request
+
+ partial void AfterCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpPipeline pipeline);
+
+ /// The from the cmdlet
+ /// The HttpPipeline for the request
+
+ partial void BeforeCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpPipeline pipeline);
+
+ partial void CustomInit();
+
+ /// Creates an instance of the HttpPipeline for each call.
+ /// The from the cmdlet
+ /// the cmdlet's correlation id.
+ /// the cmdlet's process record correlation id.
+ /// the cmdlet's parameterset name.
+ /// a dict for extensible parameters
+ /// An instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpPipeline for the remote call.
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpPipeline CreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, string parameterSetName = null, global::System.Collections.Generic.IDictionary extensibleParameters = null)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpPipeline pipeline = null;
+ BeforeCreatePipeline(invocationInfo, ref pipeline);
+ pipeline = (pipeline ?? (_useProxy ? _pipelineWithProxy : _pipeline)).Clone();
+ AfterCreatePipeline(invocationInfo, ref pipeline);
+ pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync);
+ OnNewRequest?.Invoke( invocationInfo, correlationId,processRecordId, (step)=> { pipeline.Prepend(step); } , (step)=> { pipeline.Append(step); } );
+ return pipeline;
+ }
+
+ /// Gets parameters from a common module.
+ /// The from the cmdlet
+ /// the cmdlet's correlation id.
+ /// The name of the parameter to get the value for.
+ ///
+ /// The parameter value from the common module. (Note: this should be type converted on the way back)
+ ///
+ public object GetParameter(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string parameterName) => GetParameterValue?.Invoke( ResourceId, Name, invocationInfo, correlationId,parameterName );
+
+ /// 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();
+ }
+
+ /// Creates the module instance.
+ private Module()
+ {
+ // constructor
+ ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.LoadTesting();
+ _handler.Proxy = _webProxy;
+ _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient()));
+ _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient(_handler)));
+ }
+
+ /// The HTTP Proxy to use.
+ /// The HTTP Proxy Credentials
+ /// True if the proxy should use default credentials
+ public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials)
+ {
+ _useProxy = proxy != null;
+ if (proxy == null)
+ {
+ return;
+ }
+ // set the proxy configuration
+ _webProxy.Address = proxy;
+ _webProxy.BypassProxyOnLocal = false;
+ if (proxyUseDefaultCredentials)
+ {
+ _webProxy.Credentials = null;
+ _webProxy.UseDefaultCredentials = true;
+ }
+ else
+ {
+ _webProxy.UseDefaultCredentials = false;
+ _webProxy.Credentials = proxyCredential ?.GetNetworkCredential();
+ }
+ }
+
+ /// Called to dispatch events to the common module listener
+ /// The ID of the event
+ /// The cancellation token for the event
+ /// A delegate to get the detailed event data
+ /// The callback for the event dispatcher
+ /// The from the cmdlet
+ /// the cmdlet's parameterset name.
+ /// the cmdlet's correlation id.
+ /// the cmdlet's process record correlation id.
+ /// the exception that is being thrown (if available)
+ ///
+ /// A that will be complete when handling of the event is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Func getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, global::System.Exception exception)
+ {
+ using( NoSynchronizationContext )
+ {
+ await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName, correlationId,processRecordId,exception);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/LoadTesting.cs b/src/LoadTesting/generated/api/LoadTesting.cs
new file mode 100644
index 000000000000..b79422dfc5a4
--- /dev/null
+++ b/src/LoadTesting/generated/api/LoadTesting.cs
@@ -0,0 +1,2164 @@
+// 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.LoadTesting
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// Low-level API implementation for the LoadTesting service.
+ /// LoadTest client provides access to LoadTest Resource and it's status operations.
+ ///
+ public partial class LoadTesting
+ {
+
+ /// Create or update LoadTest resource.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// Load Test name.
+ /// LoadTest resource data
+ /// 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.LoadTesting.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 LoadTestsCreateOrUpdate(string subscriptionId, string resourceGroupName, string loadTestName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests/"
+ + global::System.Uri.EscapeDataString(loadTestName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Create or update LoadTest resource.
+ ///
+ /// LoadTest resource data
+ /// 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.LoadTesting.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 LoadTestsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests/(?[^/]+)$", 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.LoadTestService/loadTests/{loadTestName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var loadTestName = _match.Groups["loadTestName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.LoadTestService/loadTests/"
+ + loadTestName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsCreateOrUpdate_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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 LoadTestsCreateOrUpdate_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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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: azure-async-operation
+ 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.LoadTesting.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.LoadTesting.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.LoadTesting.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.LoadTesting.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// Load Test name.
+ /// LoadTest resource data
+ /// 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 LoadTestsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string loadTestName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource body, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(loadTestName),loadTestName);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ /// Delete a LoadTest resource.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// Load Test name.
+ /// 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.LoadTesting.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 LoadTestsDelete(string subscriptionId, string resourceGroupName, string loadTestName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests/"
+ + global::System.Uri.EscapeDataString(loadTestName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Delete a LoadTest resource.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 LoadTestsDeleteViaIdentity(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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests/(?[^/]+)$", 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.LoadTestService/loadTests/{loadTestName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var loadTestName = _match.Groups["loadTestName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.LoadTestService/loadTests/"
+ + loadTestName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 LoadTestsDelete_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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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: location
+ var _finalUri = _response.GetFirstHeader(@"Location");
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+
+ // get the delay before polling. (default to 30 seconds if not present)
+ int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.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.LoadTesting.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.LoadTesting.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response);
+ break;
+ }
+ case global::System.Net.HttpStatusCode.NoContent:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onNoContent(_response);
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// Load Test name.
+ /// 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 LoadTestsDelete_Validate(string subscriptionId, string resourceGroupName, string loadTestName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(loadTestName),loadTestName);
+ }
+ }
+
+ /// Get a LoadTest resource.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// Load Test name.
+ /// 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.LoadTesting.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 LoadTestsGet(string subscriptionId, string resourceGroupName, string loadTestName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests/"
+ + global::System.Uri.EscapeDataString(loadTestName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsGet_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Get a LoadTest resource.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 LoadTestsGetViaIdentity(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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests/(?[^/]+)$", 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.LoadTestService/loadTests/{loadTestName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var loadTestName = _match.Groups["loadTestName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.LoadTestService/loadTests/"
+ + loadTestName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsGet_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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 LoadTestsGet_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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.ResponseCreated, _response); 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.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// Load Test name.
+ /// 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 LoadTestsGet_Validate(string subscriptionId, string resourceGroupName, string loadTestName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(loadTestName),loadTestName);
+ }
+ }
+
+ /// Lists loadtest resources in a resource group.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// 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.LoadTesting.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 LoadTestsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Lists loadtest resources in a resource group.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 LoadTestsListByResourceGroupViaIdentity(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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests$", 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.LoadTestService/loadTests'");
+ }
+
+ // 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.LoadTestService/loadTests"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsListByResourceGroup_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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 LoadTestsListByResourceGroup_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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.ResponseCreated, _response); 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.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePageList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// 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 LoadTestsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ }
+ }
+
+ /// Lists loadtests resources in a subscription.
+ /// The ID of the target subscription.
+ /// 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.LoadTesting.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 LoadTestsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.LoadTestService/loadTests"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsListBySubscription_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Lists loadtests resources in a subscription.
+ ///
+ /// 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.LoadTesting.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 LoadTestsListBySubscriptionViaIdentity(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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/loadTests'");
+ }
+
+ // 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.LoadTestService/loadTests"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsListBySubscription_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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 LoadTestsListBySubscription_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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.ResponseCreated, _response); 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.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePageList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// The ID of the target subscription.
+ /// 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 LoadTestsListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ }
+ }
+
+ /// Lists the endpoints that agents may call as part of load testing.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// Load Test name.
+ /// 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.LoadTesting.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 LoadTestsListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string loadTestName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests/"
+ + global::System.Uri.EscapeDataString(loadTestName)
+ + "/outboundNetworkDependenciesEndpoints"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsListOutboundNetworkDependenciesEndpoints_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Lists the endpoints that agents may call as part of load testing.
+ ///
+ /// 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.LoadTesting.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 LoadTestsListOutboundNetworkDependenciesEndpointsViaIdentity(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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests/(?[^/]+)/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.LoadTestService/loadTests/{loadTestName}/outboundNetworkDependenciesEndpoints'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var loadTestName = _match.Groups["loadTestName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.LoadTestService/loadTests/"
+ + loadTestName
+ + "/outboundNetworkDependenciesEndpoints"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsListOutboundNetworkDependenciesEndpoints_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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 LoadTestsListOutboundNetworkDependenciesEndpoints_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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.ResponseCreated, _response); 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.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.OutboundEnvironmentEndpointCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// Load Test name.
+ /// 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 LoadTestsListOutboundNetworkDependenciesEndpoints_Validate(string subscriptionId, string resourceGroupName, string loadTestName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(loadTestName),loadTestName);
+ }
+ }
+
+ /// Update a loadtest resource.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// Load Test name.
+ /// LoadTest resource update data
+ /// 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.LoadTesting.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 LoadTestsUpdate(string subscriptionId, string resourceGroupName, string loadTestName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests/"
+ + global::System.Uri.EscapeDataString(loadTestName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Update a loadtest resource.
+ ///
+ /// LoadTest resource update data
+ /// 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.LoadTesting.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 LoadTestsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/loadTests/(?[^/]+)$", 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.LoadTestService/loadTests/{loadTestName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var loadTestName = _match.Groups["loadTestName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.LoadTestService/loadTests/"
+ + loadTestName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.LoadTestsUpdate_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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 LoadTestsUpdate_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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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: azure-async-operation
+ 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.LoadTesting.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.LoadTesting.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.LoadTesting.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.LoadTesting.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// Load Test name.
+ /// LoadTest resource update data
+ /// 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 LoadTestsUpdate_Validate(string subscriptionId, string resourceGroupName, string loadTestName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(loadTestName),loadTestName);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ /// Lists all the available API operations for Load Test Resource.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.LoadTestService/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Lists all the available API operations for Load Test Resource.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.LoadTestService/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.LoadTestService/operations'");
+ }
+
+ // replace URI parameters with values from identity
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.LoadTestService/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.OperationsList_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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.ResponseCreated, _response); 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.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// 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 OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+
+ }
+ }
+
+ /// Check Quota Availability on quota bucket per region per subscription.
+ /// The ID of the target subscription.
+ /// The name of Azure region.
+ /// Quota Bucket name.
+ /// Quota Bucket Request data
+ /// 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.LoadTesting.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 QuotasCheckAvailability(string subscriptionId, string location, string quotaBucketName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.LoadTestService/locations/"
+ + global::System.Uri.EscapeDataString(location)
+ + "/quotas/"
+ + global::System.Uri.EscapeDataString(quotaBucketName)
+ + "/checkAvailability"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Post, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.QuotasCheckAvailability_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Check Quota Availability on quota bucket per region per subscription.
+ ///
+ /// Quota Bucket Request data
+ /// 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.LoadTesting.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 QuotasCheckAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/locations/(?[^/]+)/quotas/(?[^/]+)/checkAvailability$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas/{quotaBucketName}/checkAvailability'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var location = _match.Groups["location"].Value;
+ var quotaBucketName = _match.Groups["quotaBucketName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/providers/Microsoft.LoadTestService/locations/"
+ + location
+ + "/quotas/"
+ + quotaBucketName
+ + "/checkAvailability"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Post, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.QuotasCheckAvailability_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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 QuotasCheckAvailability_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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.ResponseCreated, _response); 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.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.CheckQuotaAvailabilityResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// The ID of the target subscription.
+ /// The name of Azure region.
+ /// Quota Bucket name.
+ /// Quota Bucket Request data
+ /// 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 QuotasCheckAvailability_Validate(string subscriptionId, string location, string quotaBucketName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequest body, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(location),location);
+ await eventListener.AssertMinimumLength(nameof(location),location,1);
+ await eventListener.AssertNotNull(nameof(quotaBucketName),quotaBucketName);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ /// Get the available quota for a quota bucket per region per subscription.
+ /// The ID of the target subscription.
+ /// The name of Azure region.
+ /// Quota Bucket name.
+ /// 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.LoadTesting.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 QuotasGet(string subscriptionId, string location, string quotaBucketName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.LoadTestService/locations/"
+ + global::System.Uri.EscapeDataString(location)
+ + "/quotas/"
+ + global::System.Uri.EscapeDataString(quotaBucketName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.QuotasGet_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Get the available quota for a quota bucket per region per subscription.
+ ///
+ /// 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.LoadTesting.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 QuotasGetViaIdentity(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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/locations/(?[^/]+)/quotas/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas/{quotaBucketName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var location = _match.Groups["location"].Value;
+ var quotaBucketName = _match.Groups["quotaBucketName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/providers/Microsoft.LoadTestService/locations/"
+ + location
+ + "/quotas/"
+ + quotaBucketName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.QuotasGet_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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 QuotasGet_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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.ResponseCreated, _response); 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.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// The ID of the target subscription.
+ /// The name of Azure region.
+ /// Quota Bucket name.
+ /// 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 QuotasGet_Validate(string subscriptionId, string location, string quotaBucketName, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(location),location);
+ await eventListener.AssertMinimumLength(nameof(location),location,1);
+ await eventListener.AssertNotNull(nameof(quotaBucketName),quotaBucketName);
+ }
+ }
+
+ /// Lists all the available quota per region per subscription.
+ /// The ID of the target subscription.
+ /// The name of Azure region.
+ /// 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.LoadTesting.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 QuotasList(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.LoadTestService/locations/"
+ + global::System.Uri.EscapeDataString(location)
+ + "/quotas"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.QuotasList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Lists all the available quota per region per subscription.
+ ///
+ /// 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.LoadTesting.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 QuotasListViaIdentity(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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-12-01";
+ // 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.LoadTestService/locations/(?[^/]+)/quotas$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/quotas'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var location = _match.Groups["location"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/providers/Microsoft.LoadTestService/locations/"
+ + location
+ + "/quotas"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.QuotasList_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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 QuotasList_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.LoadTesting.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.ResponseCreated, _response); 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.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.
+ ///
+ /// The ID of the target subscription.
+ /// The name of Azure region.
+ /// 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 QuotasList_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(location),location);
+ await eventListener.AssertMinimumLength(nameof(location),location,1);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Any.PowerShell.cs b/src/LoadTesting/generated/api/Models/Any.PowerShell.cs
new file mode 100644
index 000000000000..218e9119c8a1
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Any.PowerShell.cs
@@ -0,0 +1,156 @@
+// 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.LoadTesting.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Any object
+ [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))]
+ public partial class Any
+ {
+
+ ///
+ /// 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 Any(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal Any(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ 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.LoadTesting.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new Any(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.LoadTesting.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new Any(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.LoadTesting.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Any object
+ [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))]
+ public partial interface IAny
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Any.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Any.TypeConverter.cs
new file mode 100644
index 000000000000..0813e91a749a
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Any.TypeConverter.cs
@@ -0,0 +1,146 @@
+// 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.LoadTesting.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Any.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Any.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Any.cs b/src/LoadTesting/generated/api/Models/Any.cs
new file mode 100644
index 000000000000..13373c439bd1
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Any.cs
@@ -0,0 +1,34 @@
+// 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.LoadTesting.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Any object
+ public partial class Any :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAnyInternal
+ {
+
+ /// Creates an new instance.
+ public Any()
+ {
+
+ }
+ }
+ /// Any object
+ public partial interface IAny :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+
+ }
+ /// Any object
+ internal partial interface IAnyInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Any.json.cs b/src/LoadTesting/generated/api/Models/Any.json.cs
new file mode 100644
index 000000000000..a5c8e547aecf
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Any.json.cs
@@ -0,0 +1,104 @@
+// 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.LoadTesting.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Any object
+ public partial class Any
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal Any(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny.
+ ///
+ /// a to deserialize from.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny.
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new Any(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.PowerShell.cs
new file mode 100644
index 000000000000..e899f44a7f0f
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.PowerShell.cs
@@ -0,0 +1,262 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Check quota availability response object.
+ [System.ComponentModel.TypeConverter(typeof(CheckQuotaAvailabilityResponseTypeConverter))]
+ public partial class CheckQuotaAvailabilityResponse
+ {
+
+ ///
+ /// 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 CheckQuotaAvailabilityResponse(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.CheckQuotaAvailabilityResponsePropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsAvailable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).IsAvailable = (bool?) content.GetValueForProperty("IsAvailable",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).IsAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("AvailabilityStatus"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).AvailabilityStatus = (string) content.GetValueForProperty("AvailabilityStatus",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).AvailabilityStatus, 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 CheckQuotaAvailabilityResponse(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.CheckQuotaAvailabilityResponsePropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsAvailable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).IsAvailable = (bool?) content.GetValueForProperty("IsAvailable",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).IsAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("AvailabilityStatus"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).AvailabilityStatus = (string) content.GetValueForProperty("AvailabilityStatus",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal)this).AvailabilityStatus, 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.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponse DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CheckQuotaAvailabilityResponse(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.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CheckQuotaAvailabilityResponse(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.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.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();
+ }
+ }
+ /// Check quota availability response object.
+ [System.ComponentModel.TypeConverter(typeof(CheckQuotaAvailabilityResponseTypeConverter))]
+ public partial interface ICheckQuotaAvailabilityResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.TypeConverter.cs
new file mode 100644
index 000000000000..38205af76da1
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.TypeConverter.cs
@@ -0,0 +1,148 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CheckQuotaAvailabilityResponseTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CheckQuotaAvailabilityResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CheckQuotaAvailabilityResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CheckQuotaAvailabilityResponse.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.cs b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.cs
new file mode 100644
index 000000000000..1b99b834bd8b
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.cs
@@ -0,0 +1,160 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Check quota availability response object.
+ public partial class CheckQuotaAvailabilityResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.Resource();
+
+ /// Message indicating additional details to add to quota support request.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string AvailabilityStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)Property).AvailabilityStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)Property).AvailabilityStatus = value ?? null; }
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Id; }
+
+ ///
+ /// True/False indicating whether the quota request be granted based on availability.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public bool? IsAvailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)Property).IsAvailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)Property).IsAvailable = value ?? default(bool); }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.CheckQuotaAvailabilityResponseProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemData = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Type = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties _property;
+
+ /// Check quota availability response properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.CheckQuotaAvailabilityResponseProperties()); set => this._property = value; }
+
+ /// Gets the resource group name
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ 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); }
+
+ ///
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemData; }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType)""); }
+
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType)""); }
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Type; }
+
+ /// Creates an new instance.
+ public CheckQuotaAvailabilityResponse()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// Check quota availability response object.
+ public partial interface ICheckQuotaAvailabilityResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResource
+ {
+ /// Message indicating additional details to add to quota support request.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Message indicating additional details to add to quota support request.",
+ SerializedName = @"availabilityStatus",
+ PossibleTypes = new [] { typeof(string) })]
+ string AvailabilityStatus { get; set; }
+ ///
+ /// True/False indicating whether the quota request be granted based on availability.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"True/False indicating whether the quota request be granted based on availability.",
+ SerializedName = @"isAvailable",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsAvailable { get; set; }
+
+ }
+ /// Check quota availability response object.
+ internal partial interface ICheckQuotaAvailabilityResponseInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal
+ {
+ /// Message indicating additional details to add to quota support request.
+ string AvailabilityStatus { get; set; }
+ ///
+ /// True/False indicating whether the quota request be granted based on availability.
+ ///
+ bool? IsAvailable { get; set; }
+ /// Check quota availability response properties.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties Property { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.json.cs
new file mode 100644
index 000000000000..f461ff68ca01
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponse.json.cs
@@ -0,0 +1,110 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Check quota availability response object.
+ public partial class CheckQuotaAvailabilityResponse
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal CheckQuotaAvailabilityResponse(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.Resource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.CheckQuotaAvailabilityResponseProperties.FromJson(__jsonProperties) : Property;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new CheckQuotaAvailabilityResponse(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __resource?.ToJson(container, serializationMode);
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.PowerShell.cs
new file mode 100644
index 000000000000..42dcac84b192
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.PowerShell.cs
@@ -0,0 +1,177 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Check quota availability response properties.
+ [System.ComponentModel.TypeConverter(typeof(CheckQuotaAvailabilityResponsePropertiesTypeConverter))]
+ public partial class CheckQuotaAvailabilityResponseProperties
+ {
+
+ ///
+ /// 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 CheckQuotaAvailabilityResponseProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("IsAvailable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)this).IsAvailable = (bool?) content.GetValueForProperty("IsAvailable",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)this).IsAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("AvailabilityStatus"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)this).AvailabilityStatus = (string) content.GetValueForProperty("AvailabilityStatus",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)this).AvailabilityStatus, 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 CheckQuotaAvailabilityResponseProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("IsAvailable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)this).IsAvailable = (bool?) content.GetValueForProperty("IsAvailable",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)this).IsAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("AvailabilityStatus"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)this).AvailabilityStatus = (string) content.GetValueForProperty("AvailabilityStatus",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal)this).AvailabilityStatus, 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.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CheckQuotaAvailabilityResponseProperties(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.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CheckQuotaAvailabilityResponseProperties(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.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.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();
+ }
+ }
+ /// Check quota availability response properties.
+ [System.ComponentModel.TypeConverter(typeof(CheckQuotaAvailabilityResponsePropertiesTypeConverter))]
+ public partial interface ICheckQuotaAvailabilityResponseProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.TypeConverter.cs
new file mode 100644
index 000000000000..c736ee6740f3
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.TypeConverter.cs
@@ -0,0 +1,151 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CheckQuotaAvailabilityResponsePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise
+ /// false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CheckQuotaAvailabilityResponseProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CheckQuotaAvailabilityResponseProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CheckQuotaAvailabilityResponseProperties.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.cs b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.cs
new file mode 100644
index 000000000000..e993b9ba28d1
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.cs
@@ -0,0 +1,76 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Check quota availability response properties.
+ public partial class CheckQuotaAvailabilityResponseProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponsePropertiesInternal
+ {
+
+ /// Backing field for property.
+ private string _availabilityStatus;
+
+ /// Message indicating additional details to add to quota support request.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string AvailabilityStatus { get => this._availabilityStatus; set => this._availabilityStatus = value; }
+
+ /// Backing field for property.
+ private bool? _isAvailable;
+
+ ///
+ /// True/False indicating whether the quota request be granted based on availability.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public bool? IsAvailable { get => this._isAvailable; set => this._isAvailable = value; }
+
+ ///
+ /// Creates an new instance.
+ ///
+ public CheckQuotaAvailabilityResponseProperties()
+ {
+
+ }
+ }
+ /// Check quota availability response properties.
+ public partial interface ICheckQuotaAvailabilityResponseProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// Message indicating additional details to add to quota support request.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Message indicating additional details to add to quota support request.",
+ SerializedName = @"availabilityStatus",
+ PossibleTypes = new [] { typeof(string) })]
+ string AvailabilityStatus { get; set; }
+ ///
+ /// True/False indicating whether the quota request be granted based on availability.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"True/False indicating whether the quota request be granted based on availability.",
+ SerializedName = @"isAvailable",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsAvailable { get; set; }
+
+ }
+ /// Check quota availability response properties.
+ internal partial interface ICheckQuotaAvailabilityResponsePropertiesInternal
+
+ {
+ /// Message indicating additional details to add to quota support request.
+ string AvailabilityStatus { get; set; }
+ ///
+ /// True/False indicating whether the quota request be granted based on availability.
+ ///
+ bool? IsAvailable { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.json.cs
new file mode 100644
index 000000000000..03bd8dbaf25b
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/CheckQuotaAvailabilityResponseProperties.json.cs
@@ -0,0 +1,112 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Check quota availability response properties.
+ public partial class CheckQuotaAvailabilityResponseProperties
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal CheckQuotaAvailabilityResponseProperties(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_isAvailable = If( json?.PropertyT("isAvailable"), out var __jsonIsAvailable) ? (bool?)__jsonIsAvailable : IsAvailable;}
+ {_availabilityStatus = If( json?.PropertyT("availabilityStatus"), out var __jsonAvailabilityStatus) ? (string)__jsonAvailabilityStatus : (string)AvailabilityStatus;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ICheckQuotaAvailabilityResponseProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new CheckQuotaAvailabilityResponseProperties(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._isAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonBoolean((bool)this._isAvailable) : null, "isAvailable" ,container.Add );
+ AddIf( null != (((object)this._availabilityStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._availabilityStatus.ToString()) : null, "availabilityStatus" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.PowerShell.cs
new file mode 100644
index 000000000000..799adfd23795
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.PowerShell.cs
@@ -0,0 +1,190 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// Key and identity details for Customer Managed Key encryption of load test resource
+ ///
+ [System.ComponentModel.TypeConverter(typeof(EncryptionPropertiesTypeConverter))]
+ public partial class EncryptionProperties
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new EncryptionProperties(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.LoadTesting.Models.Api20221201.IEncryptionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new EncryptionProperties(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal EncryptionProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Identity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("KeyUrl"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).KeyUrl = (string) content.GetValueForProperty("KeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).KeyUrl, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("EncryptionIdentityResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).EncryptionIdentityResourceId = (string) content.GetValueForProperty("EncryptionIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).EncryptionIdentityResourceId, 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 EncryptionProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Identity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("KeyUrl"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).KeyUrl = (string) content.GetValueForProperty("KeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).KeyUrl, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("EncryptionIdentityResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).EncryptionIdentityResourceId = (string) content.GetValueForProperty("EncryptionIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)this).EncryptionIdentityResourceId, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(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.LoadTesting.Models.Api20221201.IEncryptionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.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();
+ }
+ }
+ /// Key and identity details for Customer Managed Key encryption of load test resource
+ [System.ComponentModel.TypeConverter(typeof(EncryptionPropertiesTypeConverter))]
+ public partial interface IEncryptionProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.TypeConverter.cs
new file mode 100644
index 000000000000..41ae59a2d2ae
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class EncryptionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return EncryptionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return EncryptionProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return EncryptionProperties.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.cs b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.cs
new file mode 100644
index 000000000000..77b2c46ef447
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.cs
@@ -0,0 +1,115 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// Key and identity details for Customer Managed Key encryption of load test resource
+ ///
+ public partial class EncryptionProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal
+ {
+
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string EncryptionIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)Identity).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)Identity).ResourceId = value ?? null; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity _identity;
+
+ ///
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentity()); set => this._identity = value; }
+
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type)""); }
+
+ /// Backing field for property.
+ private string _keyUrl;
+
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string KeyUrl { get => this._keyUrl; set => this._keyUrl = value; }
+
+ /// Internal Acessors for Identity
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentity()); set { {_identity = value;} } }
+
+ /// Creates an new instance.
+ public EncryptionProperties()
+ {
+
+ }
+ }
+ /// Key and identity details for Customer Managed Key encryption of load test resource
+ public partial interface IEncryptionProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId",
+ SerializedName = @"resourceId",
+ PossibleTypes = new [] { typeof(string) })]
+ string EncryptionIdentityResourceId { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Managed identity type to use for accessing encryption key Url",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? IdentityType { get; set; }
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek.",
+ SerializedName = @"keyUrl",
+ PossibleTypes = new [] { typeof(string) })]
+ string KeyUrl { get; set; }
+
+ }
+ /// Key and identity details for Customer Managed Key encryption of load test resource
+ internal partial interface IEncryptionPropertiesInternal
+
+ {
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ string EncryptionIdentityResourceId { get; set; }
+ ///
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity Identity { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? IdentityType { get; set; }
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ string KeyUrl { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.json.cs
new file mode 100644
index 000000000000..4136e70764b2
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionProperties.json.cs
@@ -0,0 +1,112 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// Key and identity details for Customer Managed Key encryption of load test resource
+ ///
+ public partial class EncryptionProperties
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal EncryptionProperties(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentity.FromJson(__jsonIdentity) : Identity;}
+ {_keyUrl = If( json?.PropertyT("keyUrl"), out var __jsonKeyUrl) ? (string)__jsonKeyUrl : (string)KeyUrl;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new EncryptionProperties(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add );
+ AddIf( null != (((object)this._keyUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._keyUrl.ToString()) : null, "keyUrl" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.PowerShell.cs
new file mode 100644
index 000000000000..7e7757139ea5
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.PowerShell.cs
@@ -0,0 +1,176 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(EncryptionPropertiesIdentityTypeConverter))]
+ public partial class EncryptionPropertiesIdentity
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new EncryptionPropertiesIdentity(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.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new EncryptionPropertiesIdentity(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal EncryptionPropertiesIdentity(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("ResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)this).ResourceId, 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 EncryptionPropertiesIdentity(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("ResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal)this).ResourceId, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(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.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.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();
+ }
+ }
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ [System.ComponentModel.TypeConverter(typeof(EncryptionPropertiesIdentityTypeConverter))]
+ public partial interface IEncryptionPropertiesIdentity
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.TypeConverter.cs
new file mode 100644
index 000000000000..e4a329998725
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class EncryptionPropertiesIdentityTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return EncryptionPropertiesIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return EncryptionPropertiesIdentity.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return EncryptionPropertiesIdentity.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.cs b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.cs
new file mode 100644
index 000000000000..76c391cbf633
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.cs
@@ -0,0 +1,79 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ ///
+ public partial class EncryptionPropertiesIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentityInternal
+ {
+
+ /// Backing field for property.
+ private string _resourceId;
+
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string ResourceId { get => this._resourceId; set => this._resourceId = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? _type;
+
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? Type { get => this._type; set => this._type = value; }
+
+ /// Creates an new instance.
+ public EncryptionPropertiesIdentity()
+ {
+
+ }
+ }
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ public partial interface IEncryptionPropertiesIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId",
+ SerializedName = @"resourceId",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceId { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Managed identity type to use for accessing encryption key Url",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? Type { get; set; }
+
+ }
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ internal partial interface IEncryptionPropertiesIdentityInternal
+
+ {
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ string ResourceId { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.json.cs
new file mode 100644
index 000000000000..e68c797e5200
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EncryptionPropertiesIdentity.json.cs
@@ -0,0 +1,112 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ ///
+ public partial class EncryptionPropertiesIdentity
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal EncryptionPropertiesIdentity(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
+ {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new EncryptionPropertiesIdentity(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.PowerShell.cs
new file mode 100644
index 000000000000..553292ef3dfc
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.PowerShell.cs
@@ -0,0 +1,180 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// A domain name and connection details used to access a dependency.
+ [System.ComponentModel.TypeConverter(typeof(EndpointDependencyTypeConverter))]
+ public partial class EndpointDependency
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new EndpointDependency(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.LoadTesting.Models.Api20221201.IEndpointDependency DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new EndpointDependency(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal EndpointDependency(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("DomainName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).DomainName, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).Description, global::System.Convert.ToString);
+ }
+ if (content.Contains("EndpointDetail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).EndpointDetail = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail[]) content.GetValueForProperty("EndpointDetail",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).EndpointDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EndpointDetailTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal EndpointDependency(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("DomainName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).DomainName, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).Description, global::System.Convert.ToString);
+ }
+ if (content.Contains("EndpointDetail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).EndpointDetail = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail[]) content.GetValueForProperty("EndpointDetail",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal)this).EndpointDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EndpointDetailTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(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.LoadTesting.Models.Api20221201.IEndpointDependency FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.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();
+ }
+ }
+ /// A domain name and connection details used to access a dependency.
+ [System.ComponentModel.TypeConverter(typeof(EndpointDependencyTypeConverter))]
+ public partial interface IEndpointDependency
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.TypeConverter.cs
new file mode 100644
index 000000000000..549bd4b1bee2
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class EndpointDependencyTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return EndpointDependency.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return EndpointDependency.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return EndpointDependency.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.cs b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.cs
new file mode 100644
index 000000000000..1a92b0e620fb
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.cs
@@ -0,0 +1,106 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// A domain name and connection details used to access a dependency.
+ public partial class EndpointDependency :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal
+ {
+
+ /// Backing field for property.
+ private string _description;
+
+ ///
+ /// Human-readable supplemental information about the dependency and when it is applicable.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string Description { get => this._description; }
+
+ /// Backing field for property.
+ private string _domainName;
+
+ ///
+ /// The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string DomainName { get => this._domainName; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail[] _endpointDetail;
+
+ /// The list of connection details for this endpoint.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail[] EndpointDetail { get => this._endpointDetail; }
+
+ /// Internal Acessors for Description
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal.Description { get => this._description; set { {_description = value;} } }
+
+ /// Internal Acessors for DomainName
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal.DomainName { get => this._domainName; set { {_domainName = value;} } }
+
+ /// Internal Acessors for EndpointDetail
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail[] Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependencyInternal.EndpointDetail { get => this._endpointDetail; set { {_endpointDetail = value;} } }
+
+ /// Creates an new instance.
+ public EndpointDependency()
+ {
+
+ }
+ }
+ /// A domain name and connection details used to access a dependency.
+ public partial interface IEndpointDependency :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ ///
+ /// Human-readable supplemental information about the dependency and when it is applicable.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Human-readable supplemental information about the dependency and when it is applicable.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; }
+ ///
+ /// The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard.",
+ SerializedName = @"domainName",
+ PossibleTypes = new [] { typeof(string) })]
+ string DomainName { get; }
+ /// The list of connection details for this endpoint.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The list of connection details for this endpoint.",
+ SerializedName = @"endpointDetails",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail[] EndpointDetail { get; }
+
+ }
+ /// A domain name and connection details used to access a dependency.
+ internal partial interface IEndpointDependencyInternal
+
+ {
+ ///
+ /// Human-readable supplemental information about the dependency and when it is applicable.
+ ///
+ string Description { get; set; }
+ ///
+ /// The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard.
+ ///
+ string DomainName { get; set; }
+ /// The list of connection details for this endpoint.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail[] EndpointDetail { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.json.cs
new file mode 100644
index 000000000000..ff045df2f62d
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDependency.json.cs
@@ -0,0 +1,129 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// A domain name and connection details used to access a dependency.
+ public partial class EndpointDependency
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal EndpointDependency(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_domainName = If( json?.PropertyT("domainName"), out var __jsonDomainName) ? (string)__jsonDomainName : (string)DomainName;}
+ {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;}
+ {_endpointDetail = If( json?.PropertyT("endpointDetails"), out var __jsonEndpointDetails) ? If( __jsonEndpointDetails as Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Models.Api20221201.IEndpointDetail) (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EndpointDetail.FromJson(__u) )) ))() : null : EndpointDetail;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new EndpointDependency(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._domainName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._domainName.ToString()) : null, "domainName" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._endpointDetail)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.XNodeArray();
+ foreach( var __x in this._endpointDetail )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("endpointDetails",__w);
+ }
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.PowerShell.cs
new file mode 100644
index 000000000000..e2411adbaef8
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.PowerShell.cs
@@ -0,0 +1,164 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Details about the connection between the Batch service and the endpoint.
+ [System.ComponentModel.TypeConverter(typeof(EndpointDetailTypeConverter))]
+ public partial class EndpointDetail
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new EndpointDetail(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.LoadTesting.Models.Api20221201.IEndpointDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new EndpointDetail(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal EndpointDetail(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Port"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetailInternal)this).Port = (int?) content.GetValueForProperty("Port",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetailInternal)this).Port, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal EndpointDetail(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Port"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetailInternal)this).Port = (int?) content.GetValueForProperty("Port",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetailInternal)this).Port, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ AfterDeserializePSObject(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.LoadTesting.Models.Api20221201.IEndpointDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.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();
+ }
+ }
+ /// Details about the connection between the Batch service and the endpoint.
+ [System.ComponentModel.TypeConverter(typeof(EndpointDetailTypeConverter))]
+ public partial interface IEndpointDetail
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.TypeConverter.cs
new file mode 100644
index 000000000000..5329b91bf2b6
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class EndpointDetailTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return EndpointDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return EndpointDetail.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return EndpointDetail.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.cs b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.cs
new file mode 100644
index 000000000000..44b495e8c6ab
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.cs
@@ -0,0 +1,54 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Details about the connection between the Batch service and the endpoint.
+ public partial class EndpointDetail :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetailInternal
+ {
+
+ /// Internal Acessors for Port
+ int? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetailInternal.Port { get => this._port; set { {_port = value;} } }
+
+ /// Backing field for property.
+ private int? _port;
+
+ /// The port an endpoint is connected to.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public int? Port { get => this._port; }
+
+ /// Creates an new instance.
+ public EndpointDetail()
+ {
+
+ }
+ }
+ /// Details about the connection between the Batch service and the endpoint.
+ public partial interface IEndpointDetail :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// The port an endpoint is connected to.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The port an endpoint is connected to.",
+ SerializedName = @"port",
+ PossibleTypes = new [] { typeof(int) })]
+ int? Port { get; }
+
+ }
+ /// Details about the connection between the Batch service and the endpoint.
+ internal partial interface IEndpointDetailInternal
+
+ {
+ /// The port an endpoint is connected to.
+ int? Port { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.json.cs
new file mode 100644
index 000000000000..5b0736d560f5
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/EndpointDetail.json.cs
@@ -0,0 +1,111 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Details about the connection between the Batch service and the endpoint.
+ public partial class EndpointDetail
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal EndpointDetail(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_port = If( json?.PropertyT("port"), out var __jsonPort) ? (int?)__jsonPort : Port;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new EndpointDetail(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._port ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNumber((int)this._port) : null, "port" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.PowerShell.cs
new file mode 100644
index 000000000000..49a38a3e5bca
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.PowerShell.cs
@@ -0,0 +1,212 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// LoadTest resource properties.
+ [System.ComponentModel.TypeConverter(typeof(LoadTestPropertiesTypeConverter))]
+ public partial class LoadTestProperties
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new LoadTestProperties(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.LoadTesting.Models.Api20221201.ILoadTestProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new LoadTestProperties(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.LoadTesting.Models.Api20221201.ILoadTestProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal LoadTestProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Encryption"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState.CreateFrom);
+ }
+ if (content.Contains("DataPlaneUri"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).DataPlaneUri = (string) content.GetValueForProperty("DataPlaneUri",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).DataPlaneUri, global::System.Convert.ToString);
+ }
+ if (content.Contains("EncryptionIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity) content.GetValueForProperty("EncryptionIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EncryptionKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionKey = (string) content.GetValueForProperty("EncryptionKey",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("EncryptionIdentityResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionIdentityResourceId = (string) content.GetValueForProperty("EncryptionIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionIdentityResourceId, 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 LoadTestProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Encryption"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState.CreateFrom);
+ }
+ if (content.Contains("DataPlaneUri"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).DataPlaneUri = (string) content.GetValueForProperty("DataPlaneUri",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).DataPlaneUri, global::System.Convert.ToString);
+ }
+ if (content.Contains("EncryptionIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity) content.GetValueForProperty("EncryptionIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EncryptionKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionKey = (string) content.GetValueForProperty("EncryptionKey",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("EncryptionIdentityResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionIdentityResourceId = (string) content.GetValueForProperty("EncryptionIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)this).EncryptionIdentityResourceId, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// LoadTest resource properties.
+ [System.ComponentModel.TypeConverter(typeof(LoadTestPropertiesTypeConverter))]
+ public partial interface ILoadTestProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.TypeConverter.cs
new file mode 100644
index 000000000000..106b7b7416b4
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class LoadTestPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return LoadTestProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return LoadTestProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return LoadTestProperties.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.cs
new file mode 100644
index 000000000000..f5df71f88c27
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.cs
@@ -0,0 +1,153 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// LoadTest resource properties.
+ public partial class LoadTestProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private string _dataPlaneUri;
+
+ /// Resource data plane URI.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string DataPlaneUri { get => this._dataPlaneUri; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties _encryption;
+
+ /// CMK Encryption property.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionProperties()); set => this._encryption = value; }
+
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string EncryptionIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).EncryptionIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).EncryptionIdentityResourceId = value ?? null; }
+
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string EncryptionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).KeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).KeyUrl = value ?? null; }
+
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).IdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type)""); }
+
+ /// Internal Acessors for DataPlaneUri
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal.DataPlaneUri { get => this._dataPlaneUri; set { {_dataPlaneUri = value;} } }
+
+ /// Internal Acessors for Encryption
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionProperties()); set { {_encryption = value;} } }
+
+ /// Internal Acessors for EncryptionIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal.EncryptionIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).Identity = value; }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? _provisioningState;
+
+ /// Resource provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get => this._provisioningState; }
+
+ /// Creates an new instance.
+ public LoadTestProperties()
+ {
+
+ }
+ }
+ /// LoadTest resource properties.
+ public partial interface ILoadTestProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// Resource data plane URI.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource data plane URI.",
+ SerializedName = @"dataPlaneURI",
+ PossibleTypes = new [] { typeof(string) })]
+ string DataPlaneUri { get; }
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId",
+ SerializedName = @"resourceId",
+ PossibleTypes = new [] { typeof(string) })]
+ string EncryptionIdentityResourceId { get; set; }
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek.",
+ SerializedName = @"keyUrl",
+ PossibleTypes = new [] { typeof(string) })]
+ string EncryptionKey { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Managed identity type to use for accessing encryption key Url",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? IdentityType { get; set; }
+ /// Resource provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource provisioning state.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get; }
+
+ }
+ /// LoadTest resource properties.
+ internal partial interface ILoadTestPropertiesInternal
+
+ {
+ /// Resource data plane URI.
+ string DataPlaneUri { get; set; }
+ /// CMK Encryption property.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties Encryption { get; set; }
+ ///
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity EncryptionIdentity { get; set; }
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ string EncryptionIdentityResourceId { get; set; }
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ string EncryptionKey { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? IdentityType { get; set; }
+ /// Resource provisioning state.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.json.cs
new file mode 100644
index 000000000000..e33fe19ebec1
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestProperties.json.cs
@@ -0,0 +1,118 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// LoadTest resource properties.
+ public partial class LoadTestProperties
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new LoadTestProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal LoadTestProperties(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionProperties.FromJson(__jsonEncryption) : Encryption;}
+ {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;}
+ {_dataPlaneUri = If( json?.PropertyT("dataPlaneURI"), out var __jsonDataPlaneUri) ? (string)__jsonDataPlaneUri : (string)DataPlaneUri;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._encryption ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._encryption.ToJson(null,serializationMode) : null, "encryption" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._dataPlaneUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._dataPlaneUri.ToString()) : null, "dataPlaneURI" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.PowerShell.cs
new file mode 100644
index 000000000000..aa10cdd35140
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.PowerShell.cs
@@ -0,0 +1,356 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// LoadTest details
+ [System.ComponentModel.TypeConverter(typeof(LoadTestResourceTypeConverter))]
+ public partial class LoadTestResource
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new LoadTestResource(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.LoadTesting.Models.Api20221201.ILoadTestResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new LoadTestResource(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.LoadTesting.Models.Api20221201.ILoadTestResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal LoadTestResource(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Identity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("Encryption"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState.CreateFrom);
+ }
+ if (content.Contains("DataPlaneUri"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).DataPlaneUri = (string) content.GetValueForProperty("DataPlaneUri",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).DataPlaneUri, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityPrincipalId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityPrincipalId, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityTenantId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityTenantId, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType.CreateFrom);
+ }
+ if (content.Contains("IdentityUserAssignedIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.UserAssignedIdentitiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EncryptionIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity) content.GetValueForProperty("EncryptionIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EncryptionKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionKey = (string) content.GetValueForProperty("EncryptionKey",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("EncryptionIdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("EncryptionIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("EncryptionIdentityResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentityResourceId = (string) content.GetValueForProperty("EncryptionIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentityResourceId, 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 LoadTestResource(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Identity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("Encryption"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState.CreateFrom);
+ }
+ if (content.Contains("DataPlaneUri"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).DataPlaneUri = (string) content.GetValueForProperty("DataPlaneUri",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).DataPlaneUri, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityPrincipalId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityPrincipalId, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityTenantId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityTenantId, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType.CreateFrom);
+ }
+ if (content.Contains("IdentityUserAssignedIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.UserAssignedIdentitiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EncryptionIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity) content.GetValueForProperty("EncryptionIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EncryptionKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionKey = (string) content.GetValueForProperty("EncryptionKey",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("EncryptionIdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("EncryptionIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("EncryptionIdentityResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentityResourceId = (string) content.GetValueForProperty("EncryptionIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal)this).EncryptionIdentityResourceId, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// LoadTest details
+ [System.ComponentModel.TypeConverter(typeof(LoadTestResourceTypeConverter))]
+ public partial interface ILoadTestResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.TypeConverter.cs
new file mode 100644
index 000000000000..8b89caeac86c
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class LoadTestResourceTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return LoadTestResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return LoadTestResource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return LoadTestResource.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.cs
new file mode 100644
index 000000000000..b3d4b9f28bbc
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.cs
@@ -0,0 +1,369 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// LoadTest details
+ public partial class LoadTestResource :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.TrackedResource();
+
+ /// Resource data plane URI.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.FormatTable(Index = 3, Label = @"DataPlane URL")]
+ public string DataPlaneUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).DataPlaneUri; }
+
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public string EncryptionIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).EncryptionIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).EncryptionIdentityResourceId = value ?? null; }
+
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? EncryptionIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).IdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type)""); }
+
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public string EncryptionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).EncryptionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).EncryptionKey = value ?? null; }
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).Id; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity _identity;
+
+ /// The type of identity used for the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentity()); set => this._identity = value; }
+
+ ///
+ /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).PrincipalId; }
+
+ ///
+ /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).TenantId; }
+
+ ///
+ /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType)""); }
+
+ ///
+ /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
+ /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ /// The dictionary values can be empty objects ({}) in requests.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; }
+
+ /// The geo-location where the resource lives
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.FormatTable(Index = 2)]
+ public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)__trackedResource).Location = value ; }
+
+ /// Internal Acessors for DataPlaneUri
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal.DataPlaneUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).DataPlaneUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).DataPlaneUri = value; }
+
+ /// Internal Acessors for Encryption
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).Encryption = value; }
+
+ /// Internal Acessors for EncryptionIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal.EncryptionIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).EncryptionIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).EncryptionIdentity = value; }
+
+ /// Internal Acessors for Identity
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentity()); set { {_identity = value;} } }
+
+ /// Internal Acessors for IdentityPrincipalId
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).PrincipalId = value; }
+
+ /// Internal Acessors for IdentityTenantId
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).TenantId = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).ProvisioningState = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).Name = value; }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemData = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).Type = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.FormatTable(Index = 0)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).Name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties _property;
+
+ /// Load Test resource properties
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestProperties()); set => this._property = value; }
+
+ /// Resource provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestPropertiesInternal)Property).ProvisioningState; }
+
+ /// Gets the resource group name
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.FormatTable(Index = 1, Label = @"Resource group")]
+ 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); }
+
+ ///
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemData; }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType)""); }
+
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType)""); }
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; }
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.DoNotFormat]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__trackedResource).Type; }
+
+ /// Creates an new instance.
+ public LoadTestResource()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource);
+ await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource);
+ }
+ }
+ /// LoadTest details
+ public partial interface ILoadTestResource :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResource
+ {
+ /// Resource data plane URI.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource data plane URI.",
+ SerializedName = @"dataPlaneURI",
+ PossibleTypes = new [] { typeof(string) })]
+ string DataPlaneUri { get; }
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId",
+ SerializedName = @"resourceId",
+ PossibleTypes = new [] { typeof(string) })]
+ string EncryptionIdentityResourceId { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Managed identity type to use for accessing encryption key Url",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? EncryptionIdentityType { get; set; }
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek.",
+ SerializedName = @"keyUrl",
+ PossibleTypes = new [] { typeof(string) })]
+ string EncryptionKey { get; set; }
+ ///
+ /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.",
+ SerializedName = @"principalId",
+ PossibleTypes = new [] { typeof(string) })]
+ string IdentityPrincipalId { get; }
+ ///
+ /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.",
+ SerializedName = @"tenantId",
+ PossibleTypes = new [] { typeof(string) })]
+ string IdentityTenantId { get; }
+ ///
+ /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType? IdentityType { get; set; }
+ ///
+ /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
+ /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ /// The dictionary values can be empty objects ({}) in requests.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.",
+ SerializedName = @"userAssignedIdentities",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; }
+ /// Resource provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource provisioning state.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get; }
+
+ }
+ /// LoadTest details
+ internal partial interface ILoadTestResourceInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ITrackedResourceInternal
+ {
+ /// Resource data plane URI.
+ string DataPlaneUri { get; set; }
+ /// CMK Encryption property.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties Encryption { get; set; }
+ ///
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity EncryptionIdentity { get; set; }
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ string EncryptionIdentityResourceId { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? EncryptionIdentityType { get; set; }
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ string EncryptionKey { get; set; }
+ /// The type of identity used for the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity Identity { get; set; }
+ ///
+ /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ string IdentityPrincipalId { get; set; }
+ ///
+ /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ string IdentityTenantId { get; set; }
+ ///
+ /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType? IdentityType { get; set; }
+ ///
+ /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
+ /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ /// The dictionary values can be empty objects ({}) in requests.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; }
+ /// Load Test resource properties
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestProperties Property { get; set; }
+ /// Resource provisioning state.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.json.cs
new file mode 100644
index 000000000000..236edc4b543e
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResource.json.cs
@@ -0,0 +1,112 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// LoadTest details
+ public partial class LoadTestResource
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new LoadTestResource(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal LoadTestResource(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.TrackedResource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestProperties.FromJson(__jsonProperties) : Property;}
+ {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __trackedResource?.ToJson(container, serializationMode);
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.PowerShell.cs
new file mode 100644
index 000000000000..7195803c316f
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.PowerShell.cs
@@ -0,0 +1,174 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// List of resources page result.
+ [System.ComponentModel.TypeConverter(typeof(LoadTestResourcePageListTypeConverter))]
+ public partial class LoadTestResourcePageList
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new LoadTestResourcePageList(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.LoadTesting.Models.Api20221201.ILoadTestResourcePageList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new LoadTestResourcePageList(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.LoadTesting.Models.Api20221201.ILoadTestResourcePageList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal LoadTestResourcePageList(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourceTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageListInternal)this).NextLink, 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 LoadTestResourcePageList(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourceTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageListInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 resources page result.
+ [System.ComponentModel.TypeConverter(typeof(LoadTestResourcePageListTypeConverter))]
+ public partial interface ILoadTestResourcePageList
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.TypeConverter.cs
new file mode 100644
index 000000000000..fb4f61ea6a21
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class LoadTestResourcePageListTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageList).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return LoadTestResourcePageList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return LoadTestResourcePageList.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return LoadTestResourcePageList.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.cs
new file mode 100644
index 000000000000..51668ec20bb1
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.cs
@@ -0,0 +1,68 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// List of resources page result.
+ public partial class LoadTestResourcePageList :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageList,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageListInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// Link to next page of resources.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource[] _value;
+
+ /// List of resources in current page.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public LoadTestResourcePageList()
+ {
+
+ }
+ }
+ /// List of resources page result.
+ public partial interface ILoadTestResourcePageList :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// Link to next page of resources.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Link to next page of resources.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// List of resources in current page.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"List of resources in current page.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource[] Value { get; set; }
+
+ }
+ /// List of resources page result.
+ internal partial interface ILoadTestResourcePageListInternal
+
+ {
+ /// Link to next page of resources.
+ string NextLink { get; set; }
+ /// List of resources in current page.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResource[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.json.cs
new file mode 100644
index 000000000000..dffbdab46d77
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePageList.json.cs
@@ -0,0 +1,118 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// List of resources page result.
+ public partial class LoadTestResourcePageList
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageList.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageList.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePageList FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new LoadTestResourcePageList(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal LoadTestResourcePageList(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Models.Api20221201.ILoadTestResource) (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResource.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (null != this._value)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.PowerShell.cs
new file mode 100644
index 000000000000..373ec2b35778
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.PowerShell.cs
@@ -0,0 +1,262 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// LoadTest resource patch request body.
+ [System.ComponentModel.TypeConverter(typeof(LoadTestResourcePatchRequestBodyTypeConverter))]
+ public partial class LoadTestResourcePatchRequestBody
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new LoadTestResourcePatchRequestBody(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.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new LoadTestResourcePatchRequestBody(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.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal LoadTestResourcePatchRequestBody(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Identity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("IdentityPrincipalId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityPrincipalId, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityTenantId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityTenantId, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType.CreateFrom);
+ }
+ if (content.Contains("IdentityUserAssignedIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.UserAssignedIdentitiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Encryption"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Description, global::System.Convert.ToString);
+ }
+ if (content.Contains("EncryptionIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity) content.GetValueForProperty("EncryptionIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EncryptionKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionKey = (string) content.GetValueForProperty("EncryptionKey",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("EncryptionIdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("EncryptionIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("EncryptionIdentityResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentityResourceId = (string) content.GetValueForProperty("EncryptionIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentityResourceId, 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 LoadTestResourcePatchRequestBody(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Identity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("IdentityPrincipalId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityPrincipalId, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityTenantId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityTenantId, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType.CreateFrom);
+ }
+ if (content.Contains("IdentityUserAssignedIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.UserAssignedIdentitiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Encryption"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).Description, global::System.Convert.ToString);
+ }
+ if (content.Contains("EncryptionIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity) content.GetValueForProperty("EncryptionIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EncryptionKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionKey = (string) content.GetValueForProperty("EncryptionKey",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("EncryptionIdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("EncryptionIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("EncryptionIdentityResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentityResourceId = (string) content.GetValueForProperty("EncryptionIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal)this).EncryptionIdentityResourceId, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// LoadTest resource patch request body.
+ [System.ComponentModel.TypeConverter(typeof(LoadTestResourcePatchRequestBodyTypeConverter))]
+ public partial interface ILoadTestResourcePatchRequestBody
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.TypeConverter.cs
new file mode 100644
index 000000000000..a16df4e590b8
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.TypeConverter.cs
@@ -0,0 +1,148 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class LoadTestResourcePatchRequestBodyTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return LoadTestResourcePatchRequestBody.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return LoadTestResourcePatchRequestBody.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return LoadTestResourcePatchRequestBody.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.cs
new file mode 100644
index 000000000000..276cb42ccb8a
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.cs
@@ -0,0 +1,253 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// LoadTest resource patch request body.
+ public partial class LoadTestResourcePatchRequestBody :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal
+ {
+
+ /// Description of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).Description = value ?? null; }
+
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string EncryptionIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).EncryptionIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).EncryptionIdentityResourceId = value ?? null; }
+
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? EncryptionIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).IdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type)""); }
+
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string EncryptionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).EncryptionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).EncryptionKey = value ?? null; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity _identity;
+
+ /// The type of identity used for the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentity()); set => this._identity = value; }
+
+ ///
+ /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).PrincipalId; }
+
+ ///
+ /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).TenantId; }
+
+ ///
+ /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
+ /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ /// The dictionary values can be empty objects ({}) in requests.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; }
+
+ /// Internal Acessors for Encryption
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).Encryption = value; }
+
+ /// Internal Acessors for EncryptionIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal.EncryptionIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).EncryptionIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)Property).EncryptionIdentity = value; }
+
+ /// Internal Acessors for Identity
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentity()); set { {_identity = value;} } }
+
+ /// Internal Acessors for IdentityPrincipalId
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).PrincipalId = value; }
+
+ /// Internal Acessors for IdentityTenantId
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).TenantId = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyProperties()); set { {_property = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties _property;
+
+ /// Load Test resource properties
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyProperties()); set => this._property = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags _tag;
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyTags()); set => this._tag = value; }
+
+ ///
+ /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType)""); }
+
+ /// Creates an new instance.
+ public LoadTestResourcePatchRequestBody()
+ {
+
+ }
+ }
+ /// LoadTest resource patch request body.
+ public partial interface ILoadTestResourcePatchRequestBody :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// Description of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Description of the resource.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; set; }
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId",
+ SerializedName = @"resourceId",
+ PossibleTypes = new [] { typeof(string) })]
+ string EncryptionIdentityResourceId { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Managed identity type to use for accessing encryption key Url",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? EncryptionIdentityType { get; set; }
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek.",
+ SerializedName = @"keyUrl",
+ PossibleTypes = new [] { typeof(string) })]
+ string EncryptionKey { get; set; }
+ ///
+ /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.",
+ SerializedName = @"principalId",
+ PossibleTypes = new [] { typeof(string) })]
+ string IdentityPrincipalId { get; }
+ ///
+ /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.",
+ SerializedName = @"tenantId",
+ PossibleTypes = new [] { typeof(string) })]
+ string IdentityTenantId { get; }
+ ///
+ /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
+ /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ /// The dictionary values can be empty objects ({}) in requests.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.",
+ SerializedName = @"userAssignedIdentities",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; }
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource tags.",
+ SerializedName = @"tags",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags Tag { get; set; }
+ ///
+ /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType? Type { get; set; }
+
+ }
+ /// LoadTest resource patch request body.
+ internal partial interface ILoadTestResourcePatchRequestBodyInternal
+
+ {
+ /// Description of the resource.
+ string Description { get; set; }
+ /// CMK Encryption property.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties Encryption { get; set; }
+ ///
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity EncryptionIdentity { get; set; }
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ string EncryptionIdentityResourceId { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? EncryptionIdentityType { get; set; }
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ string EncryptionKey { get; set; }
+ /// The type of identity used for the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IManagedServiceIdentity Identity { get; set; }
+ ///
+ /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ string IdentityPrincipalId { get; set; }
+ ///
+ /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ ///
+ string IdentityTenantId { get; set; }
+ ///
+ /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
+ /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
+ /// The dictionary values can be empty objects ({}) in requests.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; }
+ /// Load Test resource properties
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties Property { get; set; }
+ /// Resource tags.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags Tag { get; set; }
+ ///
+ /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ManagedServiceIdentityType? Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.json.cs
new file mode 100644
index 000000000000..ec43b1746690
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBody.json.cs
@@ -0,0 +1,112 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// LoadTest resource patch request body.
+ public partial class LoadTestResourcePatchRequestBody
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new LoadTestResourcePatchRequestBody(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal LoadTestResourcePatchRequestBody(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api50.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;}
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyProperties.FromJson(__jsonProperties) : Property;}
+ {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyTags.FromJson(__jsonTags) : Tag;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add );
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.PowerShell.cs
new file mode 100644
index 000000000000..8a4b8aeb872a
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.PowerShell.cs
@@ -0,0 +1,209 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Load Test resource properties
+ [System.ComponentModel.TypeConverter(typeof(LoadTestResourcePatchRequestBodyPropertiesTypeConverter))]
+ public partial class LoadTestResourcePatchRequestBodyProperties
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new LoadTestResourcePatchRequestBodyProperties(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.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new LoadTestResourcePatchRequestBodyProperties(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.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal LoadTestResourcePatchRequestBodyProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Encryption"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).Description, global::System.Convert.ToString);
+ }
+ if (content.Contains("EncryptionIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity) content.GetValueForProperty("EncryptionIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EncryptionKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionKey = (string) content.GetValueForProperty("EncryptionKey",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("EncryptionIdentityResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionIdentityResourceId = (string) content.GetValueForProperty("EncryptionIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionIdentityResourceId, 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 LoadTestResourcePatchRequestBodyProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Encryption"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).Description, global::System.Convert.ToString);
+ }
+ if (content.Contains("EncryptionIdentity"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionIdentity = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity) content.GetValueForProperty("EncryptionIdentity",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionIdentity, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionPropertiesIdentityTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EncryptionKey"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionKey = (string) content.GetValueForProperty("EncryptionKey",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionKey, global::System.Convert.ToString);
+ }
+ if (content.Contains("IdentityType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type.CreateFrom);
+ }
+ if (content.Contains("EncryptionIdentityResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionIdentityResourceId = (string) content.GetValueForProperty("EncryptionIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal)this).EncryptionIdentityResourceId, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// Load Test resource properties
+ [System.ComponentModel.TypeConverter(typeof(LoadTestResourcePatchRequestBodyPropertiesTypeConverter))]
+ public partial interface ILoadTestResourcePatchRequestBodyProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.TypeConverter.cs
new file mode 100644
index 000000000000..1131ce6df8e7
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.TypeConverter.cs
@@ -0,0 +1,151 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class LoadTestResourcePatchRequestBodyPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise
+ /// false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return LoadTestResourcePatchRequestBodyProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return LoadTestResourcePatchRequestBodyProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return LoadTestResourcePatchRequestBodyProperties.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.cs
new file mode 100644
index 000000000000..f59000a04e48
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.cs
@@ -0,0 +1,132 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Load Test resource properties
+ public partial class LoadTestResourcePatchRequestBodyProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private string _description;
+
+ /// Description of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string Description { get => this._description; set => this._description = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties _encryption;
+
+ /// CMK Encryption property.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionProperties()); set => this._encryption = value; }
+
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string EncryptionIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).EncryptionIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).EncryptionIdentityResourceId = value ?? null; }
+
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string EncryptionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).KeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).KeyUrl = value ?? null; }
+
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).IdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type)""); }
+
+ /// Internal Acessors for Encryption
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionProperties()); set { {_encryption = value;} } }
+
+ /// Internal Acessors for EncryptionIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyPropertiesInternal.EncryptionIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesInternal)Encryption).Identity = value; }
+
+ ///
+ /// Creates an new instance.
+ ///
+ public LoadTestResourcePatchRequestBodyProperties()
+ {
+
+ }
+ }
+ /// Load Test resource properties
+ public partial interface ILoadTestResourcePatchRequestBodyProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// Description of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Description of the resource.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; set; }
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId",
+ SerializedName = @"resourceId",
+ PossibleTypes = new [] { typeof(string) })]
+ string EncryptionIdentityResourceId { get; set; }
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek.",
+ SerializedName = @"keyUrl",
+ PossibleTypes = new [] { typeof(string) })]
+ string EncryptionKey { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Managed identity type to use for accessing encryption key Url",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? IdentityType { get; set; }
+
+ }
+ /// Load Test resource properties
+ internal partial interface ILoadTestResourcePatchRequestBodyPropertiesInternal
+
+ {
+ /// Description of the resource.
+ string Description { get; set; }
+ /// CMK Encryption property.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionProperties Encryption { get; set; }
+ ///
+ /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEncryptionPropertiesIdentity EncryptionIdentity { get; set; }
+ ///
+ /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId
+ ///
+ string EncryptionIdentityResourceId { get; set; }
+ ///
+ /// key encryption key Url, versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
+ /// or https://contosovault.vault.azure.net/keys/contosokek.
+ ///
+ string EncryptionKey { get; set; }
+ /// Managed identity type to use for accessing encryption key Url
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Type? IdentityType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.json.cs
new file mode 100644
index 000000000000..af0eead921c4
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyProperties.json.cs
@@ -0,0 +1,112 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Load Test resource properties
+ public partial class LoadTestResourcePatchRequestBodyProperties
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new LoadTestResourcePatchRequestBodyProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal LoadTestResourcePatchRequestBodyProperties(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EncryptionProperties.FromJson(__jsonEncryption) : Encryption;}
+ {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._encryption ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._encryption.ToJson(null,serializationMode) : null, "encryption" ,container.Add );
+ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.PowerShell.cs
new file mode 100644
index 000000000000..05ee9b193452
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.PowerShell.cs
@@ -0,0 +1,164 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(LoadTestResourcePatchRequestBodyTagsTypeConverter))]
+ public partial class LoadTestResourcePatchRequestBodyTags
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new LoadTestResourcePatchRequestBodyTags(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.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new LoadTestResourcePatchRequestBodyTags(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.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal LoadTestResourcePatchRequestBodyTags(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal LoadTestResourcePatchRequestBodyTags(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 tags.
+ [System.ComponentModel.TypeConverter(typeof(LoadTestResourcePatchRequestBodyTagsTypeConverter))]
+ public partial interface ILoadTestResourcePatchRequestBodyTags
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.TypeConverter.cs
new file mode 100644
index 000000000000..d4539fdde4f1
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.TypeConverter.cs
@@ -0,0 +1,150 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class LoadTestResourcePatchRequestBodyTagsTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise
+ /// false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return LoadTestResourcePatchRequestBodyTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return LoadTestResourcePatchRequestBodyTags.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return LoadTestResourcePatchRequestBodyTags.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.cs
new file mode 100644
index 000000000000..e3b7b398c72b
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.cs
@@ -0,0 +1,35 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class LoadTestResourcePatchRequestBodyTags :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTagsInternal
+ {
+
+ /// Creates an new instance.
+ public LoadTestResourcePatchRequestBodyTags()
+ {
+
+ }
+ }
+ /// Resource tags.
+ public partial interface ILoadTestResourcePatchRequestBodyTags :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IAssociativeArray
+ {
+
+ }
+ /// Resource tags.
+ internal partial interface ILoadTestResourcePatchRequestBodyTagsInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.dictionary.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.dictionary.cs
new file mode 100644
index 000000000000..079df2e10e5b
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.dictionary.cs
@@ -0,0 +1,75 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ public partial class LoadTestResourcePatchRequestBodyTags :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IAssociativeArray
+ {
+ protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary();
+
+ global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; }
+
+ int Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; }
+
+ public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; }
+
+ ///
+ ///
+ public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value);
+
+ public void Clear() => __additionalProperties.Clear();
+
+ ///
+ public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key);
+
+ ///
+ public void CopyFrom(global::System.Collections.IDictionary source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public void CopyFrom(global::System.Management.Automation.PSObject source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public bool Remove(global::System.String key) => __additionalProperties.Remove( key);
+
+ ///
+ ///
+ public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value);
+
+ ///
+
+ public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.LoadTestResourcePatchRequestBodyTags source) => source.__additionalProperties;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.json.cs
new file mode 100644
index 000000000000..27172e29d3c9
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/LoadTestResourcePatchRequestBodyTags.json.cs
@@ -0,0 +1,110 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class LoadTestResourcePatchRequestBodyTags
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.ILoadTestResourcePatchRequestBodyTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new LoadTestResourcePatchRequestBodyTags(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ ///
+ internal LoadTestResourcePatchRequestBodyTags(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions );
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IAssociativeArray)this).AdditionalProperties, container);
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.PowerShell.cs
new file mode 100644
index 000000000000..5762634c6dce
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.PowerShell.cs
@@ -0,0 +1,176 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A collection of related endpoints from the same service for which the Batch service requires outbound access.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(OutboundEnvironmentEndpointTypeConverter))]
+ public partial class OutboundEnvironmentEndpoint
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OutboundEnvironmentEndpoint(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.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OutboundEnvironmentEndpoint(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.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OutboundEnvironmentEndpoint(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Category"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal)this).Category, global::System.Convert.ToString);
+ }
+ if (content.Contains("Endpoint"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency[]) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal)this).Endpoint, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EndpointDependencyTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal OutboundEnvironmentEndpoint(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Category"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal)this).Category, global::System.Convert.ToString);
+ }
+ if (content.Contains("Endpoint"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency[]) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal)this).Endpoint, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EndpointDependencyTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// A collection of related endpoints from the same service for which the Batch service requires outbound access.
+ [System.ComponentModel.TypeConverter(typeof(OutboundEnvironmentEndpointTypeConverter))]
+ public partial interface IOutboundEnvironmentEndpoint
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.TypeConverter.cs
new file mode 100644
index 000000000000..6547848c74b1
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OutboundEnvironmentEndpointTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OutboundEnvironmentEndpoint.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OutboundEnvironmentEndpoint.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OutboundEnvironmentEndpoint.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.cs b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.cs
new file mode 100644
index 000000000000..f1fcdeb30a7b
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.cs
@@ -0,0 +1,76 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// A collection of related endpoints from the same service for which the Batch service requires outbound access.
+ ///
+ public partial class OutboundEnvironmentEndpoint :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal
+ {
+
+ /// Backing field for property.
+ private string _category;
+
+ /// The type of service that Azure Load Testing connects to.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string Category { get => this._category; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency[] _endpoint;
+
+ /// The endpoints for this service to which the Batch service makes outbound calls.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency[] Endpoint { get => this._endpoint; }
+
+ /// Internal Acessors for Category
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal.Category { get => this._category; set { {_category = value;} } }
+
+ /// Internal Acessors for Endpoint
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency[] Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointInternal.Endpoint { get => this._endpoint; set { {_endpoint = value;} } }
+
+ /// Creates an new instance.
+ public OutboundEnvironmentEndpoint()
+ {
+
+ }
+ }
+ /// A collection of related endpoints from the same service for which the Batch service requires outbound access.
+ public partial interface IOutboundEnvironmentEndpoint :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// The type of service that Azure Load Testing connects to.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The type of service that Azure Load Testing connects to.",
+ SerializedName = @"category",
+ PossibleTypes = new [] { typeof(string) })]
+ string Category { get; }
+ /// The endpoints for this service to which the Batch service makes outbound calls.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The endpoints for this service to which the Batch service makes outbound calls.",
+ SerializedName = @"endpoints",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency[] Endpoint { get; }
+
+ }
+ /// A collection of related endpoints from the same service for which the Batch service requires outbound access.
+ internal partial interface IOutboundEnvironmentEndpointInternal
+
+ {
+ /// The type of service that Azure Load Testing connects to.
+ string Category { get; set; }
+ /// The endpoints for this service to which the Batch service makes outbound calls.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IEndpointDependency[] Endpoint { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.json.cs
new file mode 100644
index 000000000000..f723c2834c63
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpoint.json.cs
@@ -0,0 +1,126 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// A collection of related endpoints from the same service for which the Batch service requires outbound access.
+ ///
+ public partial class OutboundEnvironmentEndpoint
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new OutboundEnvironmentEndpoint(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal OutboundEnvironmentEndpoint(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_category = If( json?.PropertyT("category"), out var __jsonCategory) ? (string)__jsonCategory : (string)Category;}
+ {_endpoint = If( json?.PropertyT("endpoints"), out var __jsonEndpoints) ? If( __jsonEndpoints as Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Models.Api20221201.IEndpointDependency) (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.EndpointDependency.FromJson(__u) )) ))() : null : Endpoint;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._category)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._category.ToString()) : null, "category" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._endpoint)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.XNodeArray();
+ foreach( var __x in this._endpoint )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("endpoints",__w);
+ }
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.PowerShell.cs
new file mode 100644
index 000000000000..a6e4f9eeb9e2
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.PowerShell.cs
@@ -0,0 +1,177 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Values returned by the List operation.
+ [System.ComponentModel.TypeConverter(typeof(OutboundEnvironmentEndpointCollectionTypeConverter))]
+ public partial class OutboundEnvironmentEndpointCollection
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollection DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OutboundEnvironmentEndpointCollection(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.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OutboundEnvironmentEndpointCollection(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.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OutboundEnvironmentEndpointCollection(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.OutboundEnvironmentEndpointTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink, 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 OutboundEnvironmentEndpointCollection(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.OutboundEnvironmentEndpointTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// Values returned by the List operation.
+ [System.ComponentModel.TypeConverter(typeof(OutboundEnvironmentEndpointCollectionTypeConverter))]
+ public partial interface IOutboundEnvironmentEndpointCollection
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.TypeConverter.cs
new file mode 100644
index 000000000000..a31dcf2e2b88
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.TypeConverter.cs
@@ -0,0 +1,150 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OutboundEnvironmentEndpointCollectionTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise
+ /// false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollection ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollection).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OutboundEnvironmentEndpointCollection.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OutboundEnvironmentEndpointCollection.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OutboundEnvironmentEndpointCollection.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.cs b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.cs
new file mode 100644
index 000000000000..1cac3016deaa
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.cs
@@ -0,0 +1,77 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Values returned by the List operation.
+ public partial class OutboundEnvironmentEndpointCollection :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollection,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollectionInternal
+ {
+
+ /// Internal Acessors for Value
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint[] Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollectionInternal.Value { get => this._value; set { {_value = value;} } }
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// The continuation token.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint[] _value;
+
+ ///
+ /// The collection of outbound network dependency endpoints returned by the listing operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint[] Value { get => this._value; }
+
+ /// Creates an new instance.
+ public OutboundEnvironmentEndpointCollection()
+ {
+
+ }
+ }
+ /// Values returned by the List operation.
+ public partial interface IOutboundEnvironmentEndpointCollection :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// The continuation token.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The continuation token.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ ///
+ /// The collection of outbound network dependency endpoints returned by the listing operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The collection of outbound network dependency endpoints returned by the listing operation.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint[] Value { get; }
+
+ }
+ /// Values returned by the List operation.
+ internal partial interface IOutboundEnvironmentEndpointCollectionInternal
+
+ {
+ /// The continuation token.
+ string NextLink { get; set; }
+ ///
+ /// The collection of outbound network dependency endpoints returned by the listing operation.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.json.cs
new file mode 100644
index 000000000000..40b1ac237d9e
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/OutboundEnvironmentEndpointCollection.json.cs
@@ -0,0 +1,122 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Values returned by the List operation.
+ public partial class OutboundEnvironmentEndpointCollection
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollection.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollection.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpointCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new OutboundEnvironmentEndpointCollection(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal OutboundEnvironmentEndpointCollection(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Models.Api20221201.IOutboundEnvironmentEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.OutboundEnvironmentEndpoint.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._value)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ }
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.PowerShell.cs
new file mode 100644
index 000000000000..3283514d36b5
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.PowerShell.cs
@@ -0,0 +1,292 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Request object of new quota for a quota bucket.
+ [System.ComponentModel.TypeConverter(typeof(QuotaBucketRequestTypeConverter))]
+ public partial class QuotaBucketRequest
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequest DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaBucketRequest(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.LoadTesting.Models.Api20221201.IQuotaBucketRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaBucketRequest(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.LoadTesting.Models.Api20221201.IQuotaBucketRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaBucketRequest(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Dimension"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).Dimension = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions) content.GetValueForProperty("Dimension",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).Dimension, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesDimensionsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("CurrentUsage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).CurrentUsage = (int?) content.GetValueForProperty("CurrentUsage",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).CurrentUsage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("CurrentQuota"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).CurrentQuota = (int?) content.GetValueForProperty("CurrentQuota",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).CurrentQuota, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("NewQuota"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).NewQuota = (int?) content.GetValueForProperty("NewQuota",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).NewQuota, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("DimensionSubscriptionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).DimensionSubscriptionId = (string) content.GetValueForProperty("DimensionSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).DimensionSubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("DimensionLocation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).DimensionLocation = (string) content.GetValueForProperty("DimensionLocation",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).DimensionLocation, 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 QuotaBucketRequest(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Dimension"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).Dimension = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions) content.GetValueForProperty("Dimension",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).Dimension, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesDimensionsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("CurrentUsage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).CurrentUsage = (int?) content.GetValueForProperty("CurrentUsage",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).CurrentUsage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("CurrentQuota"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).CurrentQuota = (int?) content.GetValueForProperty("CurrentQuota",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).CurrentQuota, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("NewQuota"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).NewQuota = (int?) content.GetValueForProperty("NewQuota",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).NewQuota, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("DimensionSubscriptionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).DimensionSubscriptionId = (string) content.GetValueForProperty("DimensionSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).DimensionSubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("DimensionLocation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).DimensionLocation = (string) content.GetValueForProperty("DimensionLocation",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal)this).DimensionLocation, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// Request object of new quota for a quota bucket.
+ [System.ComponentModel.TypeConverter(typeof(QuotaBucketRequestTypeConverter))]
+ public partial interface IQuotaBucketRequest
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.TypeConverter.cs
new file mode 100644
index 000000000000..662169eba99c
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaBucketRequestTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequest ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequest).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaBucketRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaBucketRequest.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaBucketRequest.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.cs
new file mode 100644
index 000000000000..8244e2e01e10
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.cs
@@ -0,0 +1,197 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Request object of new quota for a quota bucket.
+ public partial class QuotaBucketRequest :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequest,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.Resource();
+
+ /// Current quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public int? CurrentQuota { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).CurrentQuota; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).CurrentQuota = value ?? default(int); }
+
+ /// Current quota usage of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public int? CurrentUsage { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).CurrentUsage; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).CurrentUsage = value ?? default(int); }
+
+ /// Location dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string DimensionLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).DimensionLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).DimensionLocation = value ?? null; }
+
+ /// Subscription Id dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string DimensionSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).DimensionSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).DimensionSubscriptionId = value ?? null; }
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Id; }
+
+ /// Internal Acessors for Dimension
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal.Dimension { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).Dimension; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).Dimension = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemData = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Type = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Name; }
+
+ /// New quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public int? NewQuota { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).NewQuota; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)Property).NewQuota = value ?? default(int); }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties _property;
+
+ /// New quota request request properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestProperties()); set => this._property = value; }
+
+ ///
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemData; }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType)""); }
+
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType)""); }
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Type; }
+
+ /// Creates an new instance.
+ public QuotaBucketRequest()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// Request object of new quota for a quota bucket.
+ public partial interface IQuotaBucketRequest :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResource
+ {
+ /// Current quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Current quota limit of the quota bucket.",
+ SerializedName = @"currentQuota",
+ PossibleTypes = new [] { typeof(int) })]
+ int? CurrentQuota { get; set; }
+ /// Current quota usage of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Current quota usage of the quota bucket.",
+ SerializedName = @"currentUsage",
+ PossibleTypes = new [] { typeof(int) })]
+ int? CurrentUsage { get; set; }
+ /// Location dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Location dimension for new quota request of the quota bucket.",
+ SerializedName = @"location",
+ PossibleTypes = new [] { typeof(string) })]
+ string DimensionLocation { get; set; }
+ /// Subscription Id dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Subscription Id dimension for new quota request of the quota bucket.",
+ SerializedName = @"subscriptionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string DimensionSubscriptionId { get; set; }
+ /// New quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"New quota limit of the quota bucket.",
+ SerializedName = @"newQuota",
+ PossibleTypes = new [] { typeof(int) })]
+ int? NewQuota { get; set; }
+
+ }
+ /// Request object of new quota for a quota bucket.
+ internal partial interface IQuotaBucketRequestInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal
+ {
+ /// Current quota limit of the quota bucket.
+ int? CurrentQuota { get; set; }
+ /// Current quota usage of the quota bucket.
+ int? CurrentUsage { get; set; }
+ /// Dimensions for new quota request.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions Dimension { get; set; }
+ /// Location dimension for new quota request of the quota bucket.
+ string DimensionLocation { get; set; }
+ /// Subscription Id dimension for new quota request of the quota bucket.
+ string DimensionSubscriptionId { get; set; }
+ /// New quota limit of the quota bucket.
+ int? NewQuota { get; set; }
+ /// New quota request request properties.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties Property { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.json.cs
new file mode 100644
index 000000000000..a04e140b614a
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequest.json.cs
@@ -0,0 +1,110 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Request object of new quota for a quota bucket.
+ public partial class QuotaBucketRequest
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequest.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequest.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new QuotaBucketRequest(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaBucketRequest(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.Resource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestProperties.FromJson(__jsonProperties) : Property;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __resource?.ToJson(container, serializationMode);
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.PowerShell.cs
new file mode 100644
index 000000000000..f85924677844
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.PowerShell.cs
@@ -0,0 +1,206 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// New quota request request properties.
+ [System.ComponentModel.TypeConverter(typeof(QuotaBucketRequestPropertiesTypeConverter))]
+ public partial class QuotaBucketRequestProperties
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaBucketRequestProperties(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.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaBucketRequestProperties(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.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaBucketRequestProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Dimension"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).Dimension = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions) content.GetValueForProperty("Dimension",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).Dimension, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesDimensionsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("CurrentUsage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).CurrentUsage = (int?) content.GetValueForProperty("CurrentUsage",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).CurrentUsage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("CurrentQuota"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).CurrentQuota = (int?) content.GetValueForProperty("CurrentQuota",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).CurrentQuota, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("NewQuota"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).NewQuota = (int?) content.GetValueForProperty("NewQuota",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).NewQuota, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("DimensionSubscriptionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).DimensionSubscriptionId = (string) content.GetValueForProperty("DimensionSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).DimensionSubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("DimensionLocation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).DimensionLocation = (string) content.GetValueForProperty("DimensionLocation",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).DimensionLocation, 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 QuotaBucketRequestProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Dimension"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).Dimension = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions) content.GetValueForProperty("Dimension",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).Dimension, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesDimensionsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("CurrentUsage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).CurrentUsage = (int?) content.GetValueForProperty("CurrentUsage",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).CurrentUsage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("CurrentQuota"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).CurrentQuota = (int?) content.GetValueForProperty("CurrentQuota",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).CurrentQuota, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("NewQuota"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).NewQuota = (int?) content.GetValueForProperty("NewQuota",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).NewQuota, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("DimensionSubscriptionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).DimensionSubscriptionId = (string) content.GetValueForProperty("DimensionSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).DimensionSubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("DimensionLocation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).DimensionLocation = (string) content.GetValueForProperty("DimensionLocation",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal)this).DimensionLocation, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// New quota request request properties.
+ [System.ComponentModel.TypeConverter(typeof(QuotaBucketRequestPropertiesTypeConverter))]
+ public partial interface IQuotaBucketRequestProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.TypeConverter.cs
new file mode 100644
index 000000000000..0c5ef81c59fd
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaBucketRequestPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaBucketRequestProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaBucketRequestProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaBucketRequestProperties.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.cs
new file mode 100644
index 000000000000..9b7ba4673dbd
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.cs
@@ -0,0 +1,125 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// New quota request request properties.
+ public partial class QuotaBucketRequestProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private int? _currentQuota;
+
+ /// Current quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public int? CurrentQuota { get => this._currentQuota; set => this._currentQuota = value; }
+
+ /// Backing field for property.
+ private int? _currentUsage;
+
+ /// Current quota usage of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public int? CurrentUsage { get => this._currentUsage; set => this._currentUsage = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions _dimension;
+
+ /// Dimensions for new quota request.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions Dimension { get => (this._dimension = this._dimension ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesDimensions()); set => this._dimension = value; }
+
+ /// Location dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string DimensionLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)Dimension).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)Dimension).Location = value ?? null; }
+
+ /// Subscription Id dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string DimensionSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)Dimension).SubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)Dimension).SubscriptionId = value ?? null; }
+
+ /// Internal Acessors for Dimension
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesInternal.Dimension { get => (this._dimension = this._dimension ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesDimensions()); set { {_dimension = value;} } }
+
+ /// Backing field for property.
+ private int? _newQuota;
+
+ /// New quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public int? NewQuota { get => this._newQuota; set => this._newQuota = value; }
+
+ /// Creates an new instance.
+ public QuotaBucketRequestProperties()
+ {
+
+ }
+ }
+ /// New quota request request properties.
+ public partial interface IQuotaBucketRequestProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// Current quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Current quota limit of the quota bucket.",
+ SerializedName = @"currentQuota",
+ PossibleTypes = new [] { typeof(int) })]
+ int? CurrentQuota { get; set; }
+ /// Current quota usage of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Current quota usage of the quota bucket.",
+ SerializedName = @"currentUsage",
+ PossibleTypes = new [] { typeof(int) })]
+ int? CurrentUsage { get; set; }
+ /// Location dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Location dimension for new quota request of the quota bucket.",
+ SerializedName = @"location",
+ PossibleTypes = new [] { typeof(string) })]
+ string DimensionLocation { get; set; }
+ /// Subscription Id dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Subscription Id dimension for new quota request of the quota bucket.",
+ SerializedName = @"subscriptionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string DimensionSubscriptionId { get; set; }
+ /// New quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"New quota limit of the quota bucket.",
+ SerializedName = @"newQuota",
+ PossibleTypes = new [] { typeof(int) })]
+ int? NewQuota { get; set; }
+
+ }
+ /// New quota request request properties.
+ internal partial interface IQuotaBucketRequestPropertiesInternal
+
+ {
+ /// Current quota limit of the quota bucket.
+ int? CurrentQuota { get; set; }
+ /// Current quota usage of the quota bucket.
+ int? CurrentUsage { get; set; }
+ /// Dimensions for new quota request.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions Dimension { get; set; }
+ /// Location dimension for new quota request of the quota bucket.
+ string DimensionLocation { get; set; }
+ /// Subscription Id dimension for new quota request of the quota bucket.
+ string DimensionSubscriptionId { get; set; }
+ /// New quota limit of the quota bucket.
+ int? NewQuota { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.json.cs
new file mode 100644
index 000000000000..45d435e9625d
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestProperties.json.cs
@@ -0,0 +1,114 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// New quota request request properties.
+ public partial class QuotaBucketRequestProperties
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new QuotaBucketRequestProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaBucketRequestProperties(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_dimension = If( json?.PropertyT("dimensions"), out var __jsonDimensions) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaBucketRequestPropertiesDimensions.FromJson(__jsonDimensions) : Dimension;}
+ {_currentUsage = If( json?.PropertyT("currentUsage"), out var __jsonCurrentUsage) ? (int?)__jsonCurrentUsage : CurrentUsage;}
+ {_currentQuota = If( json?.PropertyT("currentQuota"), out var __jsonCurrentQuota) ? (int?)__jsonCurrentQuota : CurrentQuota;}
+ {_newQuota = If( json?.PropertyT("newQuota"), out var __jsonNewQuota) ? (int?)__jsonNewQuota : NewQuota;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._dimension ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._dimension.ToJson(null,serializationMode) : null, "dimensions" ,container.Add );
+ AddIf( null != this._currentUsage ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNumber((int)this._currentUsage) : null, "currentUsage" ,container.Add );
+ AddIf( null != this._currentQuota ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNumber((int)this._currentQuota) : null, "currentQuota" ,container.Add );
+ AddIf( null != this._newQuota ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNumber((int)this._newQuota) : null, "newQuota" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.PowerShell.cs
new file mode 100644
index 000000000000..ad470563c13e
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.PowerShell.cs
@@ -0,0 +1,177 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Dimensions for new quota request.
+ [System.ComponentModel.TypeConverter(typeof(QuotaBucketRequestPropertiesDimensionsTypeConverter))]
+ public partial class QuotaBucketRequestPropertiesDimensions
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaBucketRequestPropertiesDimensions(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.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaBucketRequestPropertiesDimensions(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.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaBucketRequestPropertiesDimensions(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SubscriptionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)this).SubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)this).Location, 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 QuotaBucketRequestPropertiesDimensions(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SubscriptionId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)this).SubscriptionId, global::System.Convert.ToString);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal)this).Location, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// Dimensions for new quota request.
+ [System.ComponentModel.TypeConverter(typeof(QuotaBucketRequestPropertiesDimensionsTypeConverter))]
+ public partial interface IQuotaBucketRequestPropertiesDimensions
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.TypeConverter.cs
new file mode 100644
index 000000000000..895882aeabdf
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.TypeConverter.cs
@@ -0,0 +1,151 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaBucketRequestPropertiesDimensionsTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise
+ /// false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaBucketRequestPropertiesDimensions.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaBucketRequestPropertiesDimensions.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaBucketRequestPropertiesDimensions.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.cs
new file mode 100644
index 000000000000..1d52c5b0cedd
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.cs
@@ -0,0 +1,68 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Dimensions for new quota request.
+ public partial class QuotaBucketRequestPropertiesDimensions :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensionsInternal
+ {
+
+ /// Backing field for property.
+ private string _location;
+
+ /// Location dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string Location { get => this._location; set => this._location = value; }
+
+ /// Backing field for property.
+ private string _subscriptionId;
+
+ /// Subscription Id dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; }
+
+ /// Creates an new instance.
+ public QuotaBucketRequestPropertiesDimensions()
+ {
+
+ }
+ }
+ /// Dimensions for new quota request.
+ public partial interface IQuotaBucketRequestPropertiesDimensions :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// Location dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Location dimension for new quota request of the quota bucket.",
+ SerializedName = @"location",
+ PossibleTypes = new [] { typeof(string) })]
+ string Location { get; set; }
+ /// Subscription Id dimension for new quota request of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Subscription Id dimension for new quota request of the quota bucket.",
+ SerializedName = @"subscriptionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string SubscriptionId { get; set; }
+
+ }
+ /// Dimensions for new quota request.
+ internal partial interface IQuotaBucketRequestPropertiesDimensionsInternal
+
+ {
+ /// Location dimension for new quota request of the quota bucket.
+ string Location { get; set; }
+ /// Subscription Id dimension for new quota request of the quota bucket.
+ string SubscriptionId { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.json.cs
new file mode 100644
index 000000000000..6ce6f0aafe9e
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaBucketRequestPropertiesDimensions.json.cs
@@ -0,0 +1,111 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Dimensions for new quota request.
+ public partial class QuotaBucketRequestPropertiesDimensions
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaBucketRequestPropertiesDimensions FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new QuotaBucketRequestPropertiesDimensions(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaBucketRequestPropertiesDimensions(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;}
+ {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add );
+ AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.PowerShell.cs
new file mode 100644
index 000000000000..5ca5c7aa1fa8
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.PowerShell.cs
@@ -0,0 +1,268 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Quota bucket details object.
+ [System.ComponentModel.TypeConverter(typeof(QuotaResourceTypeConverter))]
+ public partial class QuotaResource
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaResource(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.LoadTesting.Models.Api20221201.IQuotaResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaResource(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.LoadTesting.Models.Api20221201.IQuotaResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaResource(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourcePropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Limit = (int?) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Limit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("Usage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Usage = (int?) content.GetValueForProperty("Usage",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Usage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState.CreateFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal QuotaResource(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourcePropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Limit = (int?) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Limit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("Usage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Usage = (int?) content.GetValueForProperty("Usage",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).Usage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState.CreateFrom);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// Quota bucket details object.
+ [System.ComponentModel.TypeConverter(typeof(QuotaResourceTypeConverter))]
+ public partial interface IQuotaResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.TypeConverter.cs
new file mode 100644
index 000000000000..9565223aecfc
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaResourceTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaResource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaResource.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.cs
new file mode 100644
index 000000000000..27eb77d35665
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.cs
@@ -0,0 +1,171 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Quota bucket details object.
+ public partial class QuotaResource :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.Resource();
+
+ ///
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Id; }
+
+ /// Current quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public int? Limit { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)Property).Limit; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)Property).Limit = value ?? default(int); }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourceProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)Property).ProvisioningState = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemData = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Type = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties _property;
+
+ /// Quota bucket resource properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourceProperties()); set => this._property = value; }
+
+ /// Resource provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)Property).ProvisioningState; }
+
+ /// Gets the resource group name
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ 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); }
+
+ ///
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemData; }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType)""); }
+
+ /// The timestamp of resource last modification (UTC)
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.CreatedByType)""); }
+
+ ///
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal)__resource).Type; }
+
+ /// Current quota usage of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public int? Usage { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)Property).Usage; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)Property).Usage = value ?? default(int); }
+
+ /// Creates an new instance.
+ public QuotaResource()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// Quota bucket details object.
+ public partial interface IQuotaResource :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResource
+ {
+ /// Current quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Current quota limit of the quota bucket.",
+ SerializedName = @"limit",
+ PossibleTypes = new [] { typeof(int) })]
+ int? Limit { get; set; }
+ /// Resource provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource provisioning state.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get; }
+ /// Current quota usage of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Current quota usage of the quota bucket.",
+ SerializedName = @"usage",
+ PossibleTypes = new [] { typeof(int) })]
+ int? Usage { get; set; }
+
+ }
+ /// Quota bucket details object.
+ internal partial interface IQuotaResourceInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IResourceInternal
+ {
+ /// Current quota limit of the quota bucket.
+ int? Limit { get; set; }
+ /// Quota bucket resource properties.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties Property { get; set; }
+ /// Resource provisioning state.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get; set; }
+ /// Current quota usage of the quota bucket.
+ int? Usage { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.json.cs
new file mode 100644
index 000000000000..5bdd1cf4560f
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResource.json.cs
@@ -0,0 +1,110 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Quota bucket details object.
+ public partial class QuotaResource
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new QuotaResource(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaResource(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.Resource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourceProperties.FromJson(__jsonProperties) : Property;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __resource?.ToJson(container, serializationMode);
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.PowerShell.cs
new file mode 100644
index 000000000000..f2710ffc7525
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.PowerShell.cs
@@ -0,0 +1,174 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// List of quota bucket objects. It contains a URL link to get the next set of results.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(QuotaResourceListTypeConverter))]
+ public partial class QuotaResourceList
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaResourceList(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.LoadTesting.Models.Api20221201.IQuotaResourceList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaResourceList(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.LoadTesting.Models.Api20221201.IQuotaResourceList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaResourceList(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourceTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal)this).NextLink, 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 QuotaResourceList(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResourceTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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 quota bucket objects. It contains a URL link to get the next set of results.
+ [System.ComponentModel.TypeConverter(typeof(QuotaResourceListTypeConverter))]
+ public partial interface IQuotaResourceList
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.TypeConverter.cs
new file mode 100644
index 000000000000..0ec71b49e57c
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaResourceListTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceList).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaResourceList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaResourceList.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaResourceList.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.cs
new file mode 100644
index 000000000000..d5d731e7f7b0
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.cs
@@ -0,0 +1,76 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// List of quota bucket objects. It contains a URL link to get the next set of results.
+ ///
+ public partial class QuotaResourceList :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceList,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal
+ {
+
+ /// Internal Acessors for NextLink
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } }
+
+ /// Internal Acessors for Value
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource[] Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceListInternal.Value { get => this._value; set { {_value = value;} } }
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// URL to get the next set of quota bucket objects results (if there are any).
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource[] _value;
+
+ /// List of quota bucket objects provided by the loadtestservice.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource[] Value { get => this._value; }
+
+ /// Creates an new instance.
+ public QuotaResourceList()
+ {
+
+ }
+ }
+ /// List of quota bucket objects. It contains a URL link to get the next set of results.
+ public partial interface IQuotaResourceList :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// URL to get the next set of quota bucket objects results (if there are any).
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"URL to get the next set of quota bucket objects results (if there are any).",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; }
+ /// List of quota bucket objects provided by the loadtestservice.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"List of quota bucket objects provided by the loadtestservice.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource[] Value { get; }
+
+ }
+ /// List of quota bucket objects. It contains a URL link to get the next set of results.
+ internal partial interface IQuotaResourceListInternal
+
+ {
+ /// URL to get the next set of quota bucket objects results (if there are any).
+ string NextLink { get; set; }
+ /// List of quota bucket objects provided by the loadtestservice.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResource[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.json.cs
new file mode 100644
index 000000000000..a6de60ee3f49
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceList.json.cs
@@ -0,0 +1,126 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// List of quota bucket objects. It contains a URL link to get the next set of results.
+ ///
+ public partial class QuotaResourceList
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceList.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceList.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new QuotaResourceList(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaResourceList(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Models.Api20221201.IQuotaResource) (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.QuotaResource.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._value)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.PowerShell.cs
new file mode 100644
index 000000000000..c4e0aed8bd9e
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.PowerShell.cs
@@ -0,0 +1,182 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// Quota bucket resource properties.
+ [System.ComponentModel.TypeConverter(typeof(QuotaResourcePropertiesTypeConverter))]
+ public partial class QuotaResourceProperties
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaResourceProperties(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.LoadTesting.Models.Api20221201.IQuotaResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaResourceProperties(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.LoadTesting.Models.Api20221201.IQuotaResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaResourceProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).Limit = (int?) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).Limit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("Usage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).Usage = (int?) content.GetValueForProperty("Usage",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).Usage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState.CreateFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal QuotaResourceProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).Limit = (int?) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).Limit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("Usage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).Usage = (int?) content.GetValueForProperty("Usage",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).Usage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState.CreateFrom);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// Quota bucket resource properties.
+ [System.ComponentModel.TypeConverter(typeof(QuotaResourcePropertiesTypeConverter))]
+ public partial interface IQuotaResourceProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.TypeConverter.cs
new file mode 100644
index 000000000000..8c4fbd533b70
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaResourcePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaResourceProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaResourceProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaResourceProperties.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.cs
new file mode 100644
index 000000000000..fd6fb181945a
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.cs
@@ -0,0 +1,88 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Quota bucket resource properties.
+ public partial class QuotaResourceProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal
+ {
+
+ /// Backing field for property.
+ private int? _limit;
+
+ /// Current quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public int? Limit { get => this._limit; set => this._limit = value; }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? _provisioningState;
+
+ /// Resource provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get => this._provisioningState; }
+
+ /// Backing field for property.
+ private int? _usage;
+
+ /// Current quota usage of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public int? Usage { get => this._usage; set => this._usage = value; }
+
+ /// Creates an new instance.
+ public QuotaResourceProperties()
+ {
+
+ }
+ }
+ /// Quota bucket resource properties.
+ public partial interface IQuotaResourceProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// Current quota limit of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Current quota limit of the quota bucket.",
+ SerializedName = @"limit",
+ PossibleTypes = new [] { typeof(int) })]
+ int? Limit { get; set; }
+ /// Resource provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource provisioning state.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get; }
+ /// Current quota usage of the quota bucket.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Current quota usage of the quota bucket.",
+ SerializedName = @"usage",
+ PossibleTypes = new [] { typeof(int) })]
+ int? Usage { get; set; }
+
+ }
+ /// Quota bucket resource properties.
+ internal partial interface IQuotaResourcePropertiesInternal
+
+ {
+ /// Current quota limit of the quota bucket.
+ int? Limit { get; set; }
+ /// Resource provisioning state.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ResourceState? ProvisioningState { get; set; }
+ /// Current quota usage of the quota bucket.
+ int? Usage { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.json.cs b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.json.cs
new file mode 100644
index 000000000000..8d08f100a14a
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api20221201/QuotaResourceProperties.json.cs
@@ -0,0 +1,115 @@
+// 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.LoadTesting.Models.Api20221201
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// Quota bucket resource properties.
+ public partial class QuotaResourceProperties
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api20221201.IQuotaResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new QuotaResourceProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_limit = If( json?.PropertyT("limit"), out var __jsonLimit) ? (int?)__jsonLimit : Limit;}
+ {_usage = If( json?.PropertyT("usage"), out var __jsonUsage) ? (int?)__jsonUsage : Usage;}
+ {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._limit ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNumber((int)this._limit) : null, "limit" ,container.Add );
+ AddIf( null != this._usage ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNumber((int)this._usage) : null, "usage" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs
new file mode 100644
index 000000000000..2142366dffa9
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs
@@ -0,0 +1,172 @@
+// 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.LoadTesting.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// The resource management error additional info.
+ [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))]
+ public partial class ErrorAdditionalInfo
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ErrorAdditionalInfo(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.LoadTesting.Models.Api30.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ErrorAdditionalInfo(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ErrorAdditionalInfo(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Info"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.AnyTypeConverter.ConvertFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Info"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.AnyTypeConverter.ConvertFrom);
+ }
+ AfterDeserializePSObject(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.LoadTesting.Models.Api30.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// The resource management error additional info.
+ [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))]
+ public partial interface IErrorAdditionalInfo
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs
new file mode 100644
index 000000000000..327a3d727fab
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorAdditionalInfoTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorAdditionalInfo.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorAdditionalInfo.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorAdditionalInfo.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.cs
new file mode 100644
index 000000000000..e35247f86690
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.cs
@@ -0,0 +1,74 @@
+// 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.LoadTesting.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// The resource management error additional info.
+ public partial class ErrorAdditionalInfo :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny _info;
+
+ /// The additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Any()); }
+
+ /// Internal Acessors for Info
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Any()); set { {_info = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// The additional info type.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Creates an new instance.
+ public ErrorAdditionalInfo()
+ {
+
+ }
+ }
+ /// The resource management error additional info.
+ public partial interface IErrorAdditionalInfo :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// The additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The additional info.",
+ SerializedName = @"info",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny Info { get; }
+ /// The additional info type.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The additional info type.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ /// The resource management error additional info.
+ internal partial interface IErrorAdditionalInfoInternal
+
+ {
+ /// The additional info.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.IAny Info { get; set; }
+ /// The additional info type.
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs
new file mode 100644
index 000000000000..7d037477d4d5
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs
@@ -0,0 +1,116 @@
+// 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.LoadTesting.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// The resource management error additional info.
+ public partial class ErrorAdditionalInfo
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
+ {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Any.FromJson(__jsonInfo) : Info;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.PowerShell.cs
new file mode 100644
index 000000000000..7549cc6e5d1b
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.PowerShell.cs
@@ -0,0 +1,196 @@
+// 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.LoadTesting.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ /// The error detail.
+ [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))]
+ public partial class ErrorDetail
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ErrorDetail(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.LoadTesting.Models.Api30.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ErrorDetail(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ErrorDetail(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetailTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AdditionalInfo"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ErrorDetail(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetailTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AdditionalInfo"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(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.LoadTesting.Models.Api30.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.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 detail.
+ [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))]
+ public partial interface IErrorDetail
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs
new file mode 100644
index 000000000000..e25aaad21381
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorDetail.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorDetail.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.cs
new file mode 100644
index 000000000000..4e7fbb7acd43
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.cs
@@ -0,0 +1,134 @@
+// 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.LoadTesting.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// The error detail.
+ public partial class ErrorDetail :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[] _additionalInfo;
+
+ /// The error additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; }
+
+ /// Backing field for property.
+ private string _code;
+
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string Code { get => this._code; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[] _detail;
+
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[] Detail { get => this._detail; }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string Message { get => this._message; }
+
+ /// Internal Acessors for AdditionalInfo
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } }
+
+ /// Internal Acessors for Detail
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } }
+
+ /// Internal Acessors for Target
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } }
+
+ /// Backing field for property.
+ private string _target;
+
+ /// The error target.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string Target { get => this._target; }
+
+ /// Creates an new instance.
+ public ErrorDetail()
+ {
+
+ }
+ }
+ /// The error detail.
+ public partial interface IErrorDetail :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// The error additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error additional info.",
+ SerializedName = @"additionalInfo",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; }
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[] Detail { get; }
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// The error target.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error target.",
+ SerializedName = @"target",
+ PossibleTypes = new [] { typeof(string) })]
+ string Target { get; }
+
+ }
+ /// The error detail.
+ internal partial interface IErrorDetailInternal
+
+ {
+ /// The error additional info.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; }
+ /// The error code.
+ string Code { get; set; }
+ /// The error details.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[] Detail { get; set; }
+ /// The error message.
+ string Message { get; set; }
+ /// The error target.
+ string Target { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.json.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.json.cs
new file mode 100644
index 000000000000..f39d6825afda
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorDetail.json.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ /// The error detail.
+ public partial class ErrorDetail
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;}
+ {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;}
+ {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;}
+ {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.Models.Api30.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetail.FromJson(__u) )) ))() : null : Detail;}
+ {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._detail)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.XNodeArray();
+ foreach( var __x in this._detail )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("details",__w);
+ }
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._additionalInfo)
+ {
+ var __r = new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.XNodeArray();
+ foreach( var __s in this._additionalInfo )
+ {
+ AddIf(__s?.ToJson(null, serializationMode) ,__r.Add);
+ }
+ container.Add("additionalInfo",__r);
+ }
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.PowerShell.cs
new file mode 100644
index 000000000000..8d1a3d148349
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.PowerShell.cs
@@ -0,0 +1,208 @@
+// 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.LoadTesting.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ ///
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))]
+ public partial class ErrorResponse
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ErrorResponse(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.LoadTesting.Models.Api30.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ErrorResponse(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ErrorResponse(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetailTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AdditionalInfo"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ErrorResponse(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetailTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("AdditionalInfo"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(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.LoadTesting.Models.Api30.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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.LoadTesting.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();
+ }
+ }
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))]
+ public partial interface IErrorResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs
new file mode 100644
index 000000000000..cf729468a77a
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs
@@ -0,0 +1,147 @@
+// 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.LoadTesting.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorResponse.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.cs
new file mode 100644
index 000000000000..9dd019f2283a
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.cs
@@ -0,0 +1,136 @@
+// 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.LoadTesting.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ ///
+ public partial class ErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal
+ {
+
+ /// The error additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo; }
+
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Code; }
+
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Detail; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail _error;
+
+ /// The error object.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetail()); set => this._error = value; }
+
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Message; }
+
+ /// Internal Acessors for AdditionalInfo
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo = value; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Code = value; }
+
+ /// Internal Acessors for Detail
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Detail = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetail()); set { {_error = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Message = value; }
+
+ /// Internal Acessors for Target
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Target = value; }
+
+ /// The error target.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetailInternal)Error).Target; }
+
+ /// Creates an new instance.
+ public ErrorResponse()
+ {
+
+ }
+ }
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ public partial interface IErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ /// The error additional info.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error additional info.",
+ SerializedName = @"additionalInfo",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; }
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// The error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[] Detail { get; }
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// The error target.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error target.",
+ SerializedName = @"target",
+ PossibleTypes = new [] { typeof(string) })]
+ string Target { get; }
+
+ }
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ internal partial interface IErrorResponseInternal
+
+ {
+ /// The error additional info.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; }
+ /// The error code.
+ string Code { get; set; }
+ /// The error details.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail[] Detail { get; set; }
+ /// The error object.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorDetail Error { get; set; }
+ /// The error message.
+ string Message { get; set; }
+ /// The error target.
+ string Target { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.json.cs b/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.json.cs
new file mode 100644
index 000000000000..87e2bb58a5f4
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/ErrorResponse.json.cs
@@ -0,0 +1,111 @@
+// 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.LoadTesting.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows
+ /// the OData error response format.).
+ ///
+ public partial class ErrorResponse
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.ErrorDetail.FromJson(__jsonError) : Error;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/Operation.PowerShell.cs b/src/LoadTesting/generated/api/Models/Api30/Operation.PowerShell.cs
new file mode 100644
index 000000000000..de16455f4fc4
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/Operation.PowerShell.cs
@@ -0,0 +1,230 @@
+// 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.LoadTesting.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ ///
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial class Operation
+ {
+
+ ///
+ /// 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 an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new Operation(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.LoadTesting.Models.Api30.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new Operation(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.LoadTesting.Models.Api30.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal Operation(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Display"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsDataAction"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Origin"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Origin.CreateFrom);
+ }
+ if (content.Contains("ActionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ActionType.CreateFrom);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayDescription, 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 Operation(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Display"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsDataAction"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Origin"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Origin.CreateFrom);
+ }
+ if (content.Contains("ActionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ActionType.CreateFrom);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.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();
+ }
+ }
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial interface IOperation
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/Operation.TypeConverter.cs b/src/LoadTesting/generated/api/Models/Api30/Operation.TypeConverter.cs
new file mode 100644
index 000000000000..edc37e9c7452
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/Operation.TypeConverter.cs
@@ -0,0 +1,146 @@
+// 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.LoadTesting.Models.Api30
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperation ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperation).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Operation.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Operation.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/Operation.cs b/src/LoadTesting/generated/api/Models/Api30/Operation.cs
new file mode 100644
index 000000000000..9fea17122887
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/Operation.cs
@@ -0,0 +1,256 @@
+// 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.LoadTesting.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ ///
+ public partial class Operation :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperation,
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ActionType? _actionType;
+
+ ///
+ /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ActionType? ActionType { get => this._actionType; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplay _display;
+
+ /// Localized display information for this particular operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.OperationDisplay()); set => this._display = value; }
+
+ ///
+ /// The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Description; }
+
+ ///
+ /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine",
+ /// "Restart Virtual Machine".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Operation; }
+
+ ///
+ /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Provider; }
+
+ ///
+ /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Inlined)]
+ public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Resource; }
+
+ /// Backing field for property.
+ private bool? _isDataAction;
+
+ ///
+ /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
+ /// operations.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public bool? IsDataAction { get => this._isDataAction; }
+
+ /// Internal Acessors for ActionType
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ActionType? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } }
+
+ /// Internal Acessors for Display
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.OperationDisplay()); set { {_display = value;} } }
+
+ /// Internal Acessors for DisplayDescription
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Description = value; }
+
+ /// Internal Acessors for DisplayOperation
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Operation = value; }
+
+ /// Internal Acessors for DisplayProvider
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Provider = value; }
+
+ /// Internal Acessors for DisplayResource
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplayInternal)Display).Resource = value; }
+
+ /// Internal Acessors for IsDataAction
+ bool? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Origin
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Origin? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ ///
+ /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
+ /// "Microsoft.Compute/virtualMachines/capture/action"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Origin? _origin;
+
+ ///
+ /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is
+ /// "user,system"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Origin(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Origin? Origin { get => this._origin; }
+
+ /// Creates an new instance.
+ public Operation()
+ {
+
+ }
+ }
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ public partial interface IOperation :
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.IJsonSerializable
+ {
+ ///
+ /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Enum. Indicates the action type. ""Internal"" refers to actions that are for internal only APIs.",
+ SerializedName = @"actionType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ActionType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ActionType? ActionType { get; }
+ ///
+ /// The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayDescription { get; }
+ ///
+ /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine",
+ /// "Restart Virtual Machine".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayOperation { get; }
+ ///
+ /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayProvider { get; }
+ ///
+ /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayResource { get; }
+ ///
+ /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
+ /// operations.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Whether the operation applies to data-plane. This is ""true"" for data-plane operations and ""false"" for ARM/control-plane operations.",
+ SerializedName = @"isDataAction",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsDataAction { get; }
+ ///
+ /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
+ /// "Microsoft.Compute/virtualMachines/capture/action"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The name of the operation, as per Resource-Based Access Control (RBAC). Examples: ""Microsoft.Compute/virtualMachines/write"", ""Microsoft.Compute/virtualMachines/capture/action""",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ ///
+ /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is
+ /// "user,system"
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is ""user,system""",
+ SerializedName = @"origin",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Origin) })]
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Origin? Origin { get; }
+
+ }
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ internal partial interface IOperationInternal
+
+ {
+ ///
+ /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.ActionType? ActionType { get; set; }
+ /// Localized display information for this particular operation.
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperationDisplay Display { get; set; }
+ ///
+ /// The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ ///
+ string DisplayDescription { get; set; }
+ ///
+ /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine",
+ /// "Restart Virtual Machine".
+ ///
+ string DisplayOperation { get; set; }
+ ///
+ /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ ///
+ string DisplayProvider { get; set; }
+ ///
+ /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ ///
+ string DisplayResource { get; set; }
+ ///
+ /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
+ /// operations.
+ ///
+ bool? IsDataAction { get; set; }
+ ///
+ /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
+ /// "Microsoft.Compute/virtualMachines/capture/action"
+ ///
+ string Name { get; set; }
+ ///
+ /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is
+ /// "user,system"
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Support.Origin? Origin { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/LoadTesting/generated/api/Models/Api30/Operation.json.cs b/src/LoadTesting/generated/api/Models/Api30/Operation.json.cs
new file mode 100644
index 000000000000..22353f2a7063
--- /dev/null
+++ b/src/LoadTesting/generated/api/Models/Api30/Operation.json.cs
@@ -0,0 +1,130 @@
+// 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.LoadTesting.Models.Api30
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Extensions;
+
+ ///
+ /// Details of a REST API operation, returned from the Resource Provider Operations API
+ ///
+ public partial class Operation
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json 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 JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperation.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperation.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json ? new Operation(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject instance to deserialize from.
+ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.LoadTesting.Models.Api30.OperationDisplay.FromJson(__jsonDisplay) : Display;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ {_isDataAction = If( json?.PropertyT