diff --git a/.gitattributes b/.gitattributes
index 679d5721eae1..687208f8f61f 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -9,3 +9,6 @@
*.psm1 text eol=crlf
*.ps1xml text eol=crlf
build.proj text eol=crlf
+generated/** linguist-generated
+generated/ linguist-generated
+*.cs linguist-generated
diff --git a/src/Quota1/Quota.Autorest/Az.Quota.csproj b/src/Quota1/Quota.Autorest/Az.Quota.csproj
new file mode 100644
index 000000000000..b793ed9ec099
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/Az.Quota.csproj
@@ -0,0 +1,10 @@
+
+
+ Quota
+ Quota
+
+
+
+
+
+
diff --git a/src/Quota1/Quota.Autorest/Az.Quota.format.ps1xml b/src/Quota1/Quota.Autorest/Az.Quota.format.ps1xml
new file mode 100644
index 000000000000..f246e1015730
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/Az.Quota.format.ps1xml
@@ -0,0 +1,847 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CommonResourceProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CommonResourceProperties
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBase
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBase
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ NameLocalizedValue
+
+
+ Unit
+
+
+ ETag
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentUsagesBase
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentUsagesBase
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ NameLocalizedValue
+
+
+ UsageUsagesType
+
+
+ UsageValue
+
+
+ ETag
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LimitType
+
+
+ Value
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationList
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationResponse
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Origin
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Id1
+
+
+ ResourceName
+
+
+ Scope
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaLimits
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaLimits
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ETag
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaLimitsResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaLimitsResponse
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IsQuotaApplicable
+
+
+ QuotaPeriod
+
+
+ ResourceType
+
+
+ Unit
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestDetails
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestDetails
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ ProvisioningState
+
+
+ ErrorMessage
+
+
+ Code
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestDetailsList
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestDetailsList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestOneResourceProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestOneResourceProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CurrentValue
+
+
+ IsQuotaApplicable
+
+
+ Message
+
+
+ ProvisioningState
+
+
+ QuotaPeriod
+
+
+ RequestSubmitTime
+
+
+ ResourceType
+
+
+ Unit
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestOneResourceSubmitResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestOneResourceSubmitResponse
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Message
+
+
+ ProvisioningState
+
+
+ RequestSubmitTime
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestStatusDetails
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestStatusDetails
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Message
+
+
+ ProvisioningState
+
+
+ QuotaPeriod
+
+
+ ResourceType
+
+
+ Unit
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestSubmitResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestSubmitResponse
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestSubmitResponse202
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestSubmitResponse202
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LocalizedValue
+
+
+ Value
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceError
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.SubRequest
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.SubRequest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Message
+
+
+ ProvisioningState
+
+
+ ResourceType
+
+
+ Unit
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesLimits
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesLimits
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ETag
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesObject
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesObject
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UsagesType
+
+
+ Value
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IsQuotaApplicable
+
+
+ QuotaPeriod
+
+
+ ResourceType
+
+
+ Unit
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/Az.Quota.psd1 b/src/Quota1/Quota.Autorest/Az.Quota.psd1
new file mode 100644
index 000000000000..3545d2ff4cc2
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/Az.Quota.psd1
@@ -0,0 +1,23 @@
+@{
+ GUID = 'bd26548c-ac2c-4447-9d5d-2e4d8c622495'
+ RootModule = './Az.Quota.psm1'
+ ModuleVersion = '0.1.0'
+ CompatiblePSEditions = 'Core', 'Desktop'
+ Author = 'Microsoft Corporation'
+ CompanyName = 'Microsoft Corporation'
+ Copyright = 'Microsoft Corporation. All rights reserved.'
+ Description = 'Microsoft Azure PowerShell: Quota cmdlets'
+ PowerShellVersion = '5.1'
+ DotNetFrameworkVersion = '4.7.2'
+ RequiredAssemblies = './bin/Az.Quota.private.dll'
+ FormatsToProcess = './Az.Quota.format.ps1xml'
+ FunctionsToExport = 'Get-AzQuota', 'Get-AzQuotaOperation', 'Get-AzQuotaRequestStatus', 'Get-AzQuotaUsage', 'New-AzQuota', 'New-AzQuotaLimitObject', 'Update-AzQuota'
+ PrivateData = @{
+ PSData = @{
+ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Quota'
+ LicenseUri = 'https://aka.ms/azps-license'
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+ ReleaseNotes = ''
+ }
+ }
+}
diff --git a/src/Quota1/Quota.Autorest/Az.Quota.psm1 b/src/Quota1/Quota.Autorest/Az.Quota.psm1
new file mode 100644
index 000000000000..0378d1b80404
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/Az.Quota.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://learn.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.Quota.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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/Quota1/Quota.Autorest/README.md b/src/Quota1/Quota.Autorest/README.md
new file mode 100644
index 000000000000..547dcca13f22
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/README.md
@@ -0,0 +1,130 @@
+
+# Az.Quota
+This directory contains the PowerShell module for the Quota service.
+
+---
+## Status
+[](https://www.powershellgallery.com/packages/Az.Quota/)
+
+## 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.Quota`, see [how-to.md](how-to.md).
+
+
+### AutoRest Configuration
+> see https://aka.ms/autorest
+
+``` yaml
+# lock the commit
+commit: 4442e8121686218ce2951ab4dc734e489aa5bc08
+require:
+ - $(this-folder)/../../readme.azure.noprofile.md
+input-file:
+ - $(repo)/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-01/quota.json
+
+title: Quota
+module-version: 0.1.0
+
+identity-correction-for-post: true
+resourcegroup-append: true
+nested-object-to-string: true
+auto-switch-view: false
+
+inlining-threshold: 50
+
+use-extension:
+ "@autorest/powershell": "4.x"
+
+directive:
+ # The regex(^/(?[^/]+)/) mathch failed because the scope inlcude '/' character.
+ # Replace regex to fixed it.
+ - from: source-file-csharp
+ where: $
+ transform: $ = $.replace(/global::System.Text.RegularExpressions.Regex\(\"\^\/\(\?\\[\^\/\]\+\)/g, 'global::System.Text.RegularExpressions.Regex("^/(?.+)');
+
+ # Remove the set Workspace cmdlet
+ - where:
+ variant: ^(Create|Update).*(?",
+ "-Scope "
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Get the quota request details and status by quota request ID for the resources of the resource provider at a specific location. The quota request ID **id** is returned in the response of the PUT operation.",
+ "parameters": [
+ {
+ "name": "-Id",
+ "value": "[Path.id]"
+ },
+ {
+ "name": "-Scope",
+ "value": "[Path.scope]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Quota1/Quota.Autorest/UX/Microsoft.Quota/quotas.json b/src/Quota1/Quota.Autorest/UX/Microsoft.Quota/quotas.json
new file mode 100644
index 000000000000..18ac4ae0e7df
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/UX/Microsoft.Quota/quotas.json
@@ -0,0 +1,42 @@
+{
+ "resourceType": "quotas",
+ "apiVersion": "2023-02-01",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.quota"
+ },
+ "commands": [
+ {
+ "name": "Get-AzQuota",
+ "description": "Get the quota limit of a resource.\nThe response can be used to determine the remaining quota to calculate a new quota limit that can be submitted with a PUT request.",
+ "path": "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.quota/get-azquota"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-ResourceName ",
+ "-Scope "
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new quota limit that can be submitted with a PUT request.",
+ "parameters": [
+ {
+ "name": "-ResourceName",
+ "value": "[Path.resourceName]"
+ },
+ {
+ "name": "-Scope",
+ "value": "[Path.scope]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Quota1/Quota.Autorest/UX/Microsoft.Quota/usages.json b/src/Quota1/Quota.Autorest/UX/Microsoft.Quota/usages.json
new file mode 100644
index 000000000000..874abe22ded1
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/UX/Microsoft.Quota/usages.json
@@ -0,0 +1,42 @@
+{
+ "resourceType": "usages",
+ "apiVersion": "2023-02-01",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.quota"
+ },
+ "commands": [
+ {
+ "name": "Get-AzQuotaUsage",
+ "description": "Get the current usage of a resource.",
+ "path": "/{scope}/providers/Microsoft.Quota/usages/{resourceName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.quota/get-azquotausage"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-Name ",
+ "-Scope "
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Get the current usage of a resource.",
+ "parameters": [
+ {
+ "name": "-Name",
+ "value": "[Path.resourceName]"
+ },
+ {
+ "name": "-Scope",
+ "value": "[Path.scope]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Quota1/Quota.Autorest/build-module.ps1 b/src/Quota1/Quota.Autorest/build-module.ps1
new file mode 100644
index 000000000000..3da3c9730fa0
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/build-module.ps1
@@ -0,0 +1,180 @@
+# ----------------------------------------------------------------------------------
+# 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]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
+$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 $NotIsolated -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 -NotIsolated
+
+ 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($UX) {
+ . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
+ if($LastExitCode -ne 0) {
+ # UX 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.Quota.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.Quota.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.Quota.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.Quota'
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+$null = New-Item -ItemType Directory -Force -Path $examplesFolder
+
+Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
+$modelCmdlets = @(@{modelName="LimitObject"; cmdletName="New-AzQuotaLimitObject"})
+$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
+if (Test-Path $modelCmdletFolder) {
+ $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
+}
+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: Quota 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
+ $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
+}
+
+Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
+$formatPs1xml = Join-Path $PSScriptRoot './Az.Quota.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
+
+if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
+{
+ Write-Host -ForegroundColor Green 'Creating ux metadata...'
+ . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
+}
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/src/Quota1/Quota.Autorest/check-dependencies.ps1 b/src/Quota1/Quota.Autorest/check-dependencies.ps1
new file mode 100644
index 000000000000..90ca9867ae40
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/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]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+$ErrorActionPreference = 'Stop'
+
+if(-not $NotIsolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
+ 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/Quota1/Quota.Autorest/create-model-cmdlets.ps1 b/src/Quota1/Quota.Autorest/create-model-cmdlets.ps1
new file mode 100644
index 000000000000..c89de00f1ea9
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/create-model-cmdlets.ps1
@@ -0,0 +1,262 @@
+# ----------------------------------------------------------------------------------
+# 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([Hashtable[]]$Models)
+
+ if ($Models.Count -eq 0)
+ {
+ return
+ }
+
+ $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
+ $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
+ $null = New-Item -ItemType Directory -Force -Path $OutputDir
+ if (''.length -gt 0) {
+ $ModuleName = ''
+ } else {
+ $ModuleName = 'Az.Quota'
+ }
+ $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()
+ $classConstantMember = @{}
+ foreach ($Model in $Models)
+ {
+ $ModelName = $Model.modelName
+ $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$ModelName") }
+ $ClassNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'class') -and ($_.Identifier.value -eq "$ModelName") }
+ $classConstantMember = @()
+ foreach ($class in $ClassNode) {
+ foreach ($member in $class.Members) {
+ $isConstant = $false
+ foreach ($attr in $member.AttributeLists) {
+ $memberName = $attr.Attributes.Name.ToString()
+ if ($memberName.EndsWith('.Constant')) {
+ $isConstant = $true
+ break
+ }
+ }
+ if (($member.Modifiers.ToString() -eq 'public') -and $isConstant) {
+ $classConstantMember += $member.Identifier.Value
+ }
+ }
+ }
+ if ($InterfaceNode.count -eq 0) {
+ continue
+ }
+ # through a queue, we iterate all the parent models.
+ $Queue = @($InterfaceNode)
+ $visited = @("I$ModelName")
+ $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 = $ModelName
+ $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
+ # remove duplicated module name
+ if ($ObjectType.StartsWith('Quota')) {
+ $ModulePrefix = ''
+ } else {
+ $ModulePrefix = 'Quota'
+ }
+ $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)
+ {
+ if ($classConstantMember.Contains($Member.Identifier.Value)) {
+ # skip constant member
+ continue
+ }
+ $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments
+ $Required = $false
+ $Description = ""
+ $Readonly = $False
+ $mutability = @{Read = $true; Create = $true; Update = $true}
+ 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 ($Argument.NameEquals.Name.Identifier.Value -eq "Read")
+ {
+ $mutability.Read = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Create")
+ {
+ $mutability.Create = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Update")
+ {
+ $mutability.Update = $Argument.Expression.Token.Value
+ }
+ }
+ if ($Readonly)
+ {
+ continue
+ }
+ $Identifier = $Member.Identifier.Value
+ $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
+ $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
+ if ($Type.StartsWith("System.Collections.Generic.List"))
+ {
+ # if the type is a list, we need to convert it to array
+ $matched = $Type -match '\<(?.+)\>$'
+ if ($matched)
+ {
+ $Type = $matches.Name + '[]';
+ }
+ }
+ $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string]
+ if ($Required -and $mutability.Create -and $mutability.Update)
+ {
+ $ParameterDefinePropertyList.Add("Mandatory")
+ }
+ if ($Description -ne "")
+ {
+ $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"")
+ }
+ $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList)
+ # check whether completer is needed
+ $completer = '';
+ if(IsEnumType($Member)){
+ $completer += GetCompleter($Member)
+ }
+ $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 ""
+
+ $cmdletName = "New-Az${ModulePrefix}${ObjectType}Object"
+ if ('' -ne $Model.cmdletName) {
+ $cmdletName = $Model.cmdletName
+ }
+ $OutputPath = Join-Path -ChildPath "${cmdletName}.ps1" -Path $OutputDir
+ $cmdletNameInLowerCase = $cmdletName.ToLower()
+ $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/${ModuleName}/${cmdletNameInLowerCase}
+#>
+function ${cmdletName} {
+ [OutputType('${ObjectTypeWithNamespace}')]
+ [CmdletBinding(PositionalBinding=`$false)]
+ Param(
+${ParameterDefineScript}
+ )
+
+ process {
+ `$Object = [${ObjectTypeWithNamespace}]::New()
+${ParameterAssignScript}
+ return `$Object
+ }
+}
+"
+ Set-Content -Path $OutputPath -Value $Script
+ }
+}
+
+function IsEnumType {
+ param (
+ [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property
+ )
+ $isEnum = $false
+ foreach ($attr in $property.AttributeLists) {
+ $attributeName = $attr.Attributes.Name.ToString()
+ if ($attributeName.Contains('ArgumentCompleter')) {
+ $isEnum = $true
+ break
+ }
+ }
+ return $isEnum;
+}
+
+function GetCompleter {
+ param (
+ [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property
+ )
+ foreach ($attr in $property.AttributeLists) {
+ $attributeName = $attr.Attributes.Name.ToString()
+ if ($attributeName.Contains('ArgumentCompleter')) {
+ $attributeName = $attributeName.Split("::")[-1]
+ $possibleValues = [System.String]::Join(", ", $attr.Attributes.ArgumentList.Arguments)
+ $completer += "`n [${attributeName}(${possibleValues})]"
+ return $completer
+ }
+ }
+}
diff --git a/src/Quota1/Quota.Autorest/custom/Az.Quota.custom.psm1 b/src/Quota1/Quota.Autorest/custom/Az.Quota.custom.psm1
new file mode 100644
index 000000000000..2122bbc54318
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/custom/Az.Quota.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Quota.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Quota.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/Quota1/Quota.Autorest/custom/README.md b/src/Quota1/Quota.Autorest/custom/README.md
new file mode 100644
index 000000000000..3186ceb34449
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/custom/README.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.Quota` 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.Quota.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.Quota` 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.Quota.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.Quota.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.Quota`. 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.Quota.DescriptionAttribute`
+ - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
+- `Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Quota`.
+- `Microsoft.Azure.PowerShell.Cmdlets.Quota.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Quota`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/custom/autogen-model-cmdlets/New-AzQuotaLimitObject.ps1 b/src/Quota1/Quota.Autorest/custom/autogen-model-cmdlets/New-AzQuotaLimitObject.ps1
new file mode 100644
index 000000000000..b2672392f3d0
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/custom/autogen-model-cmdlets/New-AzQuotaLimitObject.ps1
@@ -0,0 +1,54 @@
+
+# ----------------------------------------------------------------------------------
+# 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 LimitObject.
+.Description
+Create an in-memory object for LimitObject.
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject
+.Link
+https://learn.microsoft.com/powershell/module/Az.Quota/new-azquotalimitobject
+#>
+function New-AzQuotaLimitObject {
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject')]
+ [CmdletBinding(PositionalBinding=$false)]
+ Param(
+
+ [Parameter(HelpMessage="The quota or usages limit types.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ [string]
+ $LimitType,
+ [Parameter(Mandatory, HelpMessage="The quota/limit value.")]
+ [int]
+ $Value
+ )
+
+ process {
+ $Object = [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject]::New()
+
+ if ($PSBoundParameters.ContainsKey('LimitType')) {
+ $Object.LimitType = $LimitType
+ }
+ if ($PSBoundParameters.ContainsKey('Value')) {
+ $Object.Value = $Value
+ }
+ return $Object
+ }
+}
+
diff --git a/src/Quota1/Quota.Autorest/examples/Get-AzQuota.md b/src/Quota1/Quota.Autorest/examples/Get-AzQuota.md
new file mode 100644
index 000000000000..aed890888a62
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/examples/Get-AzQuota.md
@@ -0,0 +1,30 @@
+### Example 1: List the quota limits of a scope
+```powershell
+Get-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus"
+```
+
+```output
+Name NameLocalizedValue Unit ETag
+---- ------------------ ---- ----
+VirtualNetworks Virtual Networks Count
+CustomIpPrefixes Custom Ip Prefixes Count
+PublicIpPrefixes Public Ip Prefixes Count
+PublicIPAddresses Public IP Addresses Count
+......
+```
+
+This command lists the quota limits of a scope.
+
+### Example 2: Get the quota limit of a resource
+```powershell
+Get-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus" -ResourceName VirtualNetworks
+```
+
+```output
+Name NameLocalizedValue Unit ETag
+---- ------------------ ---- ----
+VirtualNetworks Virtual Networks Count
+```
+
+This command gets the quota limit of a resource.
+The response can be used to determine the remaining quota to calculate a new quota limit that can be submitted with a PUT request.
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/examples/Get-AzQuotaOperation.md b/src/Quota1/Quota.Autorest/examples/Get-AzQuotaOperation.md
new file mode 100644
index 000000000000..303d26e6d195
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/examples/Get-AzQuotaOperation.md
@@ -0,0 +1,17 @@
+### Example 1: List all the operations supported by the Microsoft.Quota resource provider.
+```powershell
+Get-AzQuotaOperation
+```
+
+```output
+Name Origin
+---- ------
+Microsoft.Quota/quotas/read
+Microsoft.Quota/quotas/write
+Microsoft.Quota/quotaRequests/read
+Microsoft.Quota/usages/read
+Microsoft.Quota/operations/read
+Microsoft.Quota/register/action
+```
+
+List all the operations supported by the Microsoft.Quota resource provider.
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/examples/Get-AzQuotaRequestStatus.md b/src/Quota1/Quota.Autorest/examples/Get-AzQuotaRequestStatus.md
new file mode 100644
index 000000000000..dfc0f6cd8873
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/examples/Get-AzQuotaRequestStatus.md
@@ -0,0 +1,28 @@
+### Example 1: List the quota request details and status for the scope
+```powershell
+Get-AzQuotaRequestStatus -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus"
+```
+
+```output
+Name ProvisioningState ErrorMessage Code
+---- ----------------- ------------ ----
+171f4e10-f396-48bc-a93f-245cfd7ebe75 Succeeded
+0f5636d8-9377-4aec-9a57-5cdeded08615 Succeeded
+......
+```
+
+This command lists the quota request details and status for the scope.
+
+### Example 2: Get the quota request details and status by quota request ID for the resources of the resource provider at a specific location
+```powershell
+Get-AzQuotaRequestStatus -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus" -Id "6cf5716a-3df8-421a-8457-719e10381dbc"
+```
+
+```output
+Name ProvisioningState ErrorMessage Code
+---- ----------------- ------------ ----
+6cf5716a-3df8-421a-8457-719e10381dbc Failed Request failed. QuotaReductionNotSupported
+```
+
+This command gets the quota request details and status by quota request ID for the resources of the resource provider at a specific location.
+The quota request ID **id** is returned in the response of the PUT operation.
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/examples/Get-AzQuotaUsage.md b/src/Quota1/Quota.Autorest/examples/Get-AzQuotaUsage.md
new file mode 100644
index 000000000000..8bae15aa2c1e
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/examples/Get-AzQuotaUsage.md
@@ -0,0 +1,29 @@
+### Example 1: List the currents usage of a resource
+```powershell
+Get-AzQuotaUsage -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus"
+```
+
+```output
+Name NameLocalizedValue UsageUsagesType UsageValue ETag
+---- ------------------ --------------- ---------- ----
+VirtualNetworks Virtual Networks Individual 2
+CustomIpPrefixes Custom Ip Prefixes Individual 0
+PublicIpPrefixes Public Ip Prefixes Individual 0
+PublicIPAddresses Public IP Addresses Individual 4
+......
+```
+
+This command lists the currents usage of a resource
+
+### Example 2: Get the current usage of a resource
+```powershell
+Get-AzQuotaUsage -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus" -Name "MinPublicIpInterNetworkPrefixLength"
+```
+
+```output
+Name NameLocalizedValue UsageUsagesType UsageValue ETag
+---- ------------------ --------------- ---------- ----
+MinPublicIpInterNetworkPrefixLength Public IPv4 Prefix Length Individual 0
+```
+
+This command lists the currents usage of a resource.
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/examples/New-AzQuota.md b/src/Quota1/Quota.Autorest/examples/New-AzQuota.md
new file mode 100644
index 000000000000..7e4b778164db
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/examples/New-AzQuota.md
@@ -0,0 +1,14 @@
+### Example 1: Create or update the quota limit for the specified resource with the requested value
+```powershell
+$quota = Get-AzQuota -Scope "subscriptions/{subId}/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses"
+$limit = New-AzQuotaLimitObject -Value ($quota.Limit.Value + 1)
+New-AzQuota -Scope "subscriptions/{subId}/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses" -Name "PublicIPAddresses" -Limit $limit
+```
+
+```output
+Name NameLocalizedValue Unit ETag
+---- ------------------ ---- ----
+PublicIPAddresses Public IP Addresses Count
+```
+
+This command create or update the quota limit for the specified resource with the requested value.
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/examples/New-AzQuotaLimitObject.md b/src/Quota1/Quota.Autorest/examples/New-AzQuotaLimitObject.md
new file mode 100644
index 000000000000..e6100a8bcc92
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/examples/New-AzQuotaLimitObject.md
@@ -0,0 +1,12 @@
+### Example 1: Create an in-memory object for LimitValue
+```powershell
+New-AzQuotaLimitObject -Value 1003
+```
+
+```output
+LimitObjectType LimitType Value
+--------------- --------- -----
+LimitValue 1003
+```
+
+This command create an in-memory object for LimitValue as value of the parameter Limit in the New/Update-AzQuota cmdlet.
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/examples/Update-AzQuota.md b/src/Quota1/Quota.Autorest/examples/Update-AzQuota.md
new file mode 100644
index 000000000000..418f3d37d667
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/examples/Update-AzQuota.md
@@ -0,0 +1,27 @@
+### Example 1: Update the quota limit for a specific resource to the specified value
+```powershell
+$limit = New-AzQuotaLimitObject -Value 1001
+Update-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses" -Name "PublicIPAddresses" -Limit $limit
+```
+
+```output
+Name NameLocalizedValue Unit ETag
+---- ------------------ ---- ----
+PublicIPAddresses Public IP Addresses Count
+```
+
+This command update the quota limit for a specific resource to the specified value.
+
+### Example 2: Update the quota limit for a specific resource to the specified value by pipeline
+```powershell
+$limit = New-AzQuotaLimitObject -Value 1007
+Get-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses" | Update-AzQuota -Name "PublicIPAddresses" -Limit $limit
+```
+
+```output
+Name NameLocalizedValue Unit ETag
+---- ------------------ ---- ----
+PublicIPAddresses Public IP Addresses Count
+```
+
+This command update the quota limit for a specific resource to the specified value by pipeline.
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/export-surface.ps1 b/src/Quota1/Quota.Autorest/export-surface.ps1
new file mode 100644
index 000000000000..cf12fdd841aa
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/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]$NotIsolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $NotIsolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
+ return
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.Quota.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.Quota'
+$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/Quota1/Quota.Autorest/exports/Get-AzQuota.ps1 b/src/Quota1/Quota.Autorest/exports/Get-AzQuota.ps1
new file mode 100644
index 000000000000..4a67906397aa
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/exports/Get-AzQuota.ps1
@@ -0,0 +1,204 @@
+
+# ----------------------------------------------------------------------------------
+# 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 quota limit of a resource.
+The response can be used to determine the remaining quota to calculate a new quota limit that can be submitted with a PUT request.
+.Description
+Get the quota limit of a resource.
+The response can be used to determine the remaining quota to calculate a new quota limit that can be submitted with a PUT request.
+.Example
+Get-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus"
+.Example
+Get-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus" -ResourceName VirtualNetworks
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Quota request ID.
+ [Id1 ]: Resource identity path
+ [ResourceName ]: Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ [Scope ]: The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/get-azquota
+#>
+function Get-AzQuota {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # Resource name for a given resource provider.
+ # For example:
+ # - SKU name for Microsoft.Compute
+ # - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ # For Microsoft.Network PublicIPAddresses.
+ ${ResourceName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # The target Azure resource URI.
+ # For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ # This is the target Azure resource URI for the List GET operation.
+ # If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+ ${Scope},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = @{
+ Get = 'Az.Quota.private\Get-AzQuota_Get';
+ GetViaIdentity = 'Az.Quota.private\Get-AzQuota_GetViaIdentity';
+ List = 'Az.Quota.private\Get-AzQuota_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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/Quota1/Quota.Autorest/exports/Get-AzQuotaOperation.ps1 b/src/Quota1/Quota.Autorest/exports/Get-AzQuotaOperation.ps1
new file mode 100644
index 000000000000..a38d69130ddf
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/exports/Get-AzQuotaOperation.ps1
@@ -0,0 +1,159 @@
+
+# ----------------------------------------------------------------------------------
+# 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
+List all the operations supported by the Microsoft.Quota resource provider.
+.Description
+List all the operations supported by the Microsoft.Quota resource provider.
+.Example
+Get-AzQuotaOperation
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/get-azquotaoperation
+#>
+function Get-AzQuotaOperation {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.private\Get-AzQuotaOperation_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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/Quota1/Quota.Autorest/exports/Get-AzQuotaRequestStatus.ps1 b/src/Quota1/Quota.Autorest/exports/Get-AzQuotaRequestStatus.ps1
new file mode 100644
index 000000000000..1d1092da804f
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/exports/Get-AzQuotaRequestStatus.ps1
@@ -0,0 +1,203 @@
+
+# ----------------------------------------------------------------------------------
+# 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 quota request details and status by quota request ID for the resources of the resource provider at a specific location.
+The quota request ID **id** is returned in the response of the PUT operation.
+.Description
+Get the quota request details and status by quota request ID for the resources of the resource provider at a specific location.
+The quota request ID **id** is returned in the response of the PUT operation.
+.Example
+Get-AzQuotaRequestStatus -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus"
+.Example
+Get-AzQuotaRequestStatus -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus" -Id "6cf5716a-3df8-421a-8457-719e10381dbc"
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/get-azquotarequeststatus
+#>
+function Get-AzQuotaRequestStatus {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # The target Azure resource URI.
+ # For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ # This is the target Azure resource URI for the List GET operation.
+ # If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+ ${Scope},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # Quota request ID.
+ ${Id},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Query')]
+ [System.String]
+ # | Field | Supported operators
+ # |---------------------|------------------------
+ #
+ # |requestSubmitTime | ge, le, eq, gt, lt
+ # |provisioningState eq {QuotaRequestState}
+ # |resourceName eq {resourceName}
+ ${Filter},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Query')]
+ [System.String]
+ # The **Skiptoken** parameter is used only if a previous operation returned a partial result.
+ # If a previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that specifies a starting point to use for subsequent calls.
+ ${Skiptoken},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Query')]
+ [System.Int32]
+ # Number of records to return.
+ ${Top},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = @{
+ Get = 'Az.Quota.private\Get-AzQuotaRequestStatus_Get';
+ List = 'Az.Quota.private\Get-AzQuotaRequestStatus_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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/Quota1/Quota.Autorest/exports/Get-AzQuotaUsage.ps1 b/src/Quota1/Quota.Autorest/exports/Get-AzQuotaUsage.ps1
new file mode 100644
index 000000000000..2222b4910c55
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/exports/Get-AzQuotaUsage.ps1
@@ -0,0 +1,181 @@
+
+# ----------------------------------------------------------------------------------
+# 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 current usage of a resource.
+.Description
+Get the current usage of a resource.
+.Example
+Get-AzQuotaUsage -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus"
+.Example
+Get-AzQuotaUsage -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus" -Name "MinPublicIpInterNetworkPrefixLength"
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBase
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/get-azquotausage
+#>
+function Get-AzQuotaUsage {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBase])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # The target Azure resource URI.
+ # For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ # This is the target Azure resource URI for the List GET operation.
+ # If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+ ${Scope},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # Resource name for a given resource provider.
+ # For example:
+ # - SKU name for Microsoft.Compute
+ # - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ # For Microsoft.Network PublicIPAddresses.
+ ${Name},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = @{
+ Get = 'Az.Quota.private\Get-AzQuotaUsage_Get';
+ List = 'Az.Quota.private\Get-AzQuotaUsage_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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/Quota1/Quota.Autorest/exports/New-AzQuota.ps1 b/src/Quota1/Quota.Autorest/exports/New-AzQuota.ps1
new file mode 100644
index 000000000000..d868bf2aa13c
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/exports/New-AzQuota.ps1
@@ -0,0 +1,262 @@
+
+# ----------------------------------------------------------------------------------
+# 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 the quota limit for the specified resource with the requested value.
+To update the quota, follow these steps:\n1.
+Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and to calculate the new quota limit.
+These steps are detailed in [this example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).\n2.
+Use this PUT operation to update the quota limit.
+Please check the URI in location header for the detailed status of the request.
+.Description
+Create the quota limit for the specified resource with the requested value.
+To update the quota, follow these steps:\n1.
+Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and to calculate the new quota limit.
+These steps are detailed in [this example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).\n2.
+Use this PUT operation to update the quota limit.
+Please check the URI in location header for the detailed status of the request.
+.Example
+$quota = Get-AzQuota -Scope "subscriptions/{subId}/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses"
+$limit = New-AzQuotaLimitObject -Value ($quota.Limit.Value + 1)
+New-AzQuota -Scope "subscriptions/{subId}/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses" -Name "PublicIPAddresses" -Limit $limit
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Quota request ID.
+ [Id1 ]: Resource identity path
+ [ResourceName ]: Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ [Scope ]: The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/new-azquota
+#>
+function New-AzQuota {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # Resource name for a given resource provider.
+ # For example:
+ # - SKU name for Microsoft.Compute
+ # - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ # For Microsoft.Network PublicIPAddresses.
+ ${ResourceName},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # The target Azure resource URI.
+ # For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ # This is the target Azure resource URI for the List GET operation.
+ # If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+ ${Scope},
+
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject]
+ # Resource quota limit properties.
+ ${Limit},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Resource name.
+ ${Name},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # The name of the resource type.
+ # Optional field.
+ ${ResourceType},
+
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.private\New-AzQuota_CreateExpanded';
+ CreateViaIdentityExpanded = 'Az.Quota.private\New-AzQuota_CreateViaIdentityExpanded';
+ CreateViaJsonFilePath = 'Az.Quota.private\New-AzQuota_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.Quota.private\New-AzQuota_CreateViaJsonString';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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/Quota1/Quota.Autorest/exports/New-AzQuotaLimitObject.ps1 b/src/Quota1/Quota.Autorest/exports/New-AzQuotaLimitObject.ps1
new file mode 100644
index 000000000000..c7f5f3062a55
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/exports/New-AzQuotaLimitObject.ps1
@@ -0,0 +1,124 @@
+
+# ----------------------------------------------------------------------------------
+# 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 LimitObject.
+.Description
+Create an in-memory object for LimitObject.
+.Example
+New-AzQuotaLimitObject -Value 1003
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject
+.Link
+https://learn.microsoft.com/powershell/module/Az.Quota/new-azquotalimitobject
+#>
+function New-AzQuotaLimitObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.Int32]
+ # The quota/limit value.
+ ${Value},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # The quota or usages limit types.
+ ${LimitType}
+)
+
+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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = @{
+ __AllParameterSets = 'Az.Quota.custom\New-AzQuotaLimitObject';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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/Quota1/Quota.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Quota1/Quota.Autorest/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..a292b19d18e6
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,1305 @@
+
+# ----------------------------------------------------------------------------------
+# 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
+List all the operations supported by the Microsoft.Quota resource provider.
+.Description
+List all the operations supported by the Microsoft.Quota resource provider.
+.Example
+Get-AzQuotaOperation
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/get-azquotaoperation
+#>
+function Get-AzQuotaOperation {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.private\Get-AzQuotaOperation_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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
+Get the quota request details and status by quota request ID for the resources of the resource provider at a specific location.
+The quota request ID **id** is returned in the response of the PUT operation.
+.Description
+Get the quota request details and status by quota request ID for the resources of the resource provider at a specific location.
+The quota request ID **id** is returned in the response of the PUT operation.
+.Example
+Get-AzQuotaRequestStatus -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus"
+.Example
+Get-AzQuotaRequestStatus -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus" -Id "6cf5716a-3df8-421a-8457-719e10381dbc"
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/get-azquotarequeststatus
+#>
+function Get-AzQuotaRequestStatus {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # The target Azure resource URI.
+ # For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ # This is the target Azure resource URI for the List GET operation.
+ # If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+ ${Scope},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # Quota request ID.
+ ${Id},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Query')]
+ [System.String]
+ # | Field | Supported operators
+ # |---------------------|------------------------
+ #
+ # |requestSubmitTime | ge, le, eq, gt, lt
+ # |provisioningState eq {QuotaRequestState}
+ # |resourceName eq {resourceName}
+ ${Filter},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Query')]
+ [System.String]
+ # The **Skiptoken** parameter is used only if a previous operation returned a partial result.
+ # If a previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that specifies a starting point to use for subsequent calls.
+ ${Skiptoken},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Query')]
+ [System.Int32]
+ # Number of records to return.
+ ${Top},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = @{
+ Get = 'Az.Quota.private\Get-AzQuotaRequestStatus_Get';
+ List = 'Az.Quota.private\Get-AzQuotaRequestStatus_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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
+Get the current usage of a resource.
+.Description
+Get the current usage of a resource.
+.Example
+Get-AzQuotaUsage -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus"
+.Example
+Get-AzQuotaUsage -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus" -Name "MinPublicIpInterNetworkPrefixLength"
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBase
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/get-azquotausage
+#>
+function Get-AzQuotaUsage {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBase])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # The target Azure resource URI.
+ # For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ # This is the target Azure resource URI for the List GET operation.
+ # If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+ ${Scope},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # Resource name for a given resource provider.
+ # For example:
+ # - SKU name for Microsoft.Compute
+ # - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ # For Microsoft.Network PublicIPAddresses.
+ ${Name},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = @{
+ Get = 'Az.Quota.private\Get-AzQuotaUsage_Get';
+ List = 'Az.Quota.private\Get-AzQuotaUsage_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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
+Get the quota limit of a resource.
+The response can be used to determine the remaining quota to calculate a new quota limit that can be submitted with a PUT request.
+.Description
+Get the quota limit of a resource.
+The response can be used to determine the remaining quota to calculate a new quota limit that can be submitted with a PUT request.
+.Example
+Get-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus"
+.Example
+Get-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus" -ResourceName VirtualNetworks
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Quota request ID.
+ [Id1 ]: Resource identity path
+ [ResourceName ]: Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ [Scope ]: The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/get-azquota
+#>
+function Get-AzQuota {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # Resource name for a given resource provider.
+ # For example:
+ # - SKU name for Microsoft.Compute
+ # - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ # For Microsoft.Network PublicIPAddresses.
+ ${ResourceName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # The target Azure resource URI.
+ # For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ # This is the target Azure resource URI for the List GET operation.
+ # If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+ ${Scope},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = @{
+ Get = 'Az.Quota.private\Get-AzQuota_Get';
+ GetViaIdentity = 'Az.Quota.private\Get-AzQuota_GetViaIdentity';
+ List = 'Az.Quota.private\Get-AzQuota_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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 the quota limit for the specified resource with the requested value.
+To update the quota, follow these steps:\n1.
+Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and to calculate the new quota limit.
+These steps are detailed in [this example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).\n2.
+Use this PUT operation to update the quota limit.
+Please check the URI in location header for the detailed status of the request.
+.Description
+Create the quota limit for the specified resource with the requested value.
+To update the quota, follow these steps:\n1.
+Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and to calculate the new quota limit.
+These steps are detailed in [this example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).\n2.
+Use this PUT operation to update the quota limit.
+Please check the URI in location header for the detailed status of the request.
+.Example
+$quota = Get-AzQuota -Scope "subscriptions/{subId}/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses"
+$limit = New-AzQuotaLimitObject -Value ($quota.Limit.Value + 1)
+New-AzQuota -Scope "subscriptions/{subId}/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses" -Name "PublicIPAddresses" -Limit $limit
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Quota request ID.
+ [Id1 ]: Resource identity path
+ [ResourceName ]: Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ [Scope ]: The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/new-azquota
+#>
+function New-AzQuota {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # Resource name for a given resource provider.
+ # For example:
+ # - SKU name for Microsoft.Compute
+ # - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ # For Microsoft.Network PublicIPAddresses.
+ ${ResourceName},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # The target Azure resource URI.
+ # For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ # This is the target Azure resource URI for the List GET operation.
+ # If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+ ${Scope},
+
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject]
+ # Resource quota limit properties.
+ ${Limit},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Resource name.
+ ${Name},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # The name of the resource type.
+ # Optional field.
+ ${ResourceType},
+
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.private\New-AzQuota_CreateExpanded';
+ CreateViaIdentityExpanded = 'Az.Quota.private\New-AzQuota_CreateViaIdentityExpanded';
+ CreateViaJsonFilePath = 'Az.Quota.private\New-AzQuota_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.Quota.private\New-AzQuota_CreateViaJsonString';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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 the quota limit for a specific resource to the specified value:\n1.
+Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to calculate the new quota limit.
+These steps are detailed in [this example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).\n2.
+Use this PUT operation to update the quota limit.
+Please check the URI in location header for the detailed status of the request.
+.Description
+Update the quota limit for a specific resource to the specified value:\n1.
+Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to calculate the new quota limit.
+These steps are detailed in [this example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).\n2.
+Use this PUT operation to update the quota limit.
+Please check the URI in location header for the detailed status of the request.
+.Example
+$limit = New-AzQuotaLimitObject -Value 1001
+Update-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses" -Name "PublicIPAddresses" -Limit $limit
+.Example
+$limit = New-AzQuotaLimitObject -Value 1007
+Get-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses" | Update-AzQuota -Name "PublicIPAddresses" -Limit $limit
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Quota request ID.
+ [Id1 ]: Resource identity path
+ [ResourceName ]: Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ [Scope ]: The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/update-azquota
+#>
+function Update-AzQuota {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # Resource name for a given resource provider.
+ # For example:
+ # - SKU name for Microsoft.Compute
+ # - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ # For Microsoft.Network PublicIPAddresses.
+ ${ResourceName},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # The target Azure resource URI.
+ # For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ # This is the target Azure resource URI for the List GET operation.
+ # If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+ ${Scope},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject]
+ # Resource quota limit properties.
+ ${Limit},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Resource name.
+ ${Name},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # The name of the resource type.
+ # Optional field.
+ ${ResourceType},
+
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.private\Update-AzQuota_UpdateExpanded';
+ UpdateViaIdentityExpanded = 'Az.Quota.private\Update-AzQuota_UpdateViaIdentityExpanded';
+ UpdateViaJsonFilePath = 'Az.Quota.private\Update-AzQuota_UpdateViaJsonFilePath';
+ UpdateViaJsonString = 'Az.Quota.private\Update-AzQuota_UpdateViaJsonString';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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 an in-memory object for LimitObject.
+.Description
+Create an in-memory object for LimitObject.
+.Example
+New-AzQuotaLimitObject -Value 1003
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject
+.Link
+https://learn.microsoft.com/powershell/module/Az.Quota/new-azquotalimitobject
+#>
+function New-AzQuotaLimitObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.Int32]
+ # The quota/limit value.
+ ${Value},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # The quota or usages limit types.
+ ${LimitType}
+)
+
+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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = @{
+ __AllParameterSets = 'Az.Quota.custom\New-AzQuotaLimitObject';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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/Quota1/Quota.Autorest/exports/README.md b/src/Quota1/Quota.Autorest/exports/README.md
new file mode 100644
index 000000000000..2d9f127e1800
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/exports/README.md
@@ -0,0 +1,20 @@
+# Exports
+This directory contains the cmdlets *exported by* `Az.Quota`. No other cmdlets in this repository are directly exported. What that means is the `Az.Quota` module will run [Export-ModuleMember](https://learn.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.Quota.private.dll`) and from the `..\custom\Az.Quota.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.Quota.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/Quota1/Quota.Autorest/exports/Update-AzQuota.ps1 b/src/Quota1/Quota.Autorest/exports/Update-AzQuota.ps1
new file mode 100644
index 000000000000..64edf36308e7
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/exports/Update-AzQuota.ps1
@@ -0,0 +1,262 @@
+
+# ----------------------------------------------------------------------------------
+# 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 the quota limit for a specific resource to the specified value:\n1.
+Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to calculate the new quota limit.
+These steps are detailed in [this example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).\n2.
+Use this PUT operation to update the quota limit.
+Please check the URI in location header for the detailed status of the request.
+.Description
+Update the quota limit for a specific resource to the specified value:\n1.
+Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to calculate the new quota limit.
+These steps are detailed in [this example](https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670).\n2.
+Use this PUT operation to update the quota limit.
+Please check the URI in location header for the detailed status of the request.
+.Example
+$limit = New-AzQuotaLimitObject -Value 1001
+Update-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses" -Name "PublicIPAddresses" -Limit $limit
+.Example
+$limit = New-AzQuotaLimitObject -Value 1007
+Get-AzQuota -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus2" -ResourceName "PublicIPAddresses" | Update-AzQuota -Name "PublicIPAddresses" -Limit $limit
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Quota request ID.
+ [Id1 ]: Resource identity path
+ [ResourceName ]: Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
+ [Scope ]: The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+.Link
+https://learn.microsoft.com/powershell/module/az.quota/update-azquota
+#>
+function Update-AzQuota {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # Resource name for a given resource provider.
+ # For example:
+ # - SKU name for Microsoft.Compute
+ # - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ # For Microsoft.Network PublicIPAddresses.
+ ${ResourceName},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [System.String]
+ # The target Azure resource URI.
+ # For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ # This is the target Azure resource URI for the List GET operation.
+ # If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
+ ${Scope},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject]
+ # Resource quota limit properties.
+ ${Limit},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Resource name.
+ ${Name},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # The name of the resource type.
+ # Optional field.
+ ${ResourceType},
+
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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 = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.private\Update-AzQuota_UpdateExpanded';
+ UpdateViaIdentityExpanded = 'Az.Quota.private\Update-AzQuota_UpdateViaIdentityExpanded';
+ UpdateViaJsonFilePath = 'Az.Quota.private\Update-AzQuota_UpdateViaJsonFilePath';
+ UpdateViaJsonString = 'Az.Quota.private\Update-AzQuota_UpdateViaJsonString';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $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.Quota.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/Quota1/Quota.Autorest/generate-help.ps1 b/src/Quota1/Quota.Autorest/generate-help.ps1
new file mode 100644
index 000000000000..2cc7feb5bc0a
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/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]$NotIsolated)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $NotIsolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
+ 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.Quota.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.Quota.private.dll')
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.Quota.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
+ $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
+ Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo
+ Write-Host -ForegroundColor Green "Created documentation in '$docsPath'"
+}
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generate-info.json b/src/Quota1/Quota.Autorest/generate-info.json
new file mode 100644
index 000000000000..efa487a4b963
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generate-info.json
@@ -0,0 +1,8 @@
+{
+ "autorest_core": "3.7.6",
+ "autorest_powershell": "3.0.476",
+ "autorest_modelerfour": "4.15.414",
+ "node": "v14.15.5",
+ "autorest": "`-- (empty)",
+ "swagger_commit": "efd3d669a86d2e123f57ac3a43e5af4bb9e3a29f"
+}
diff --git a/src/Quota1/Quota.Autorest/generate-portal-ux.ps1 b/src/Quota1/Quota.Autorest/generate-portal-ux.ps1
new file mode 100644
index 000000000000..4a011bf7aebc
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generate-portal-ux.ps1
@@ -0,0 +1,374 @@
+# ----------------------------------------------------------------------------------
+# 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.
+#
+# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal.
+# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages.
+# ----------------------------------------------------------------------------------
+param([switch]$NotIsolated)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $NotIsolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
+ return
+}
+
+$moduleName = 'Az.Quota'
+$rootModuleName = ''
+if ($rootModuleName -eq "")
+{
+ $rootModuleName = $moduleName
+}
+$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1")
+$modulePath = $modulePsd1.FullName
+
+# Load DLL to use build-time cmdlets
+Import-Module -Name $modulePath
+Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll")
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.Quota.Module]::Instance
+# Module info is shared per profile
+$moduleInfo = Get-Module -Name $moduleName
+$parameterSetsInfo = Get-Module -Name "$moduleName.private"
+
+function Test-FunctionSupported()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [string]
+ $FunctionName
+ )
+
+ If (-not $FunctionName.Contains("_")) {
+ return $false
+ }
+
+ $cmdletName, $parameterSetName = $FunctionName.Split("_")
+ If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity") -or $parameterSetName.Contains("ViaJson")) {
+ return $false
+ }
+ If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) {
+ return $false
+ }
+
+ $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName]
+ foreach ($parameterInfo in $parameterSetInfo.Parameters.Values)
+ {
+ $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories
+ $invalideCategory = @('Query', 'Body')
+ if ($invalideCategory -contains $category)
+ {
+ return $false
+ }
+ }
+
+ $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*"
+ if ($customFiles.Length -ne 0)
+ {
+ Write-Host -ForegroundColor Yellow "There are come custom files for $cmdletName, skip generate UX data for it."
+ return $false
+ }
+
+ return $true
+}
+
+function Get-MappedCmdletFromFunctionName()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [string]
+ $FunctionName
+ )
+
+ $cmdletName, $parameterSetName = $FunctionName.Split("_")
+
+ return $cmdletName
+}
+
+function Get-ParameterAttribute()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.ParameterMetadata]
+ $ParameterInfo,
+ [Parameter()]
+ [String]
+ $AttributeName
+ )
+ return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName }
+}
+
+function Get-CmdletAttribute()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $CmdletInfo,
+ [Parameter()]
+ [String]
+ $AttributeName
+ )
+
+ return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName }
+}
+
+function Get-CmdletDescription()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [String]
+ $CmdletName
+ )
+ $helpInfo = Get-Help $CmdletName -Full
+
+ $description = $helpInfo.Description.Text
+ if ($null -eq $description)
+ {
+ return ""
+ }
+ return $description
+}
+
+# Test whether the parameter is from swagger http path
+function Test-ParameterFromSwagger()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.ParameterMetadata]
+ $ParameterInfo
+ )
+ $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories
+ $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute"
+ if ($null -ne $doNotExport)
+ {
+ return $false
+ }
+
+ $valideCategory = @('Path')
+ if ($valideCategory -contains $category)
+ {
+ return $true
+ }
+ return $false
+}
+
+function New-ExampleForParameterSet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $ParameterSetInfo
+ )
+ $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ }
+ $result = @()
+ foreach ($parameter in $parameters)
+ {
+ $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories
+ $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName
+ $name = $parameter.Name
+ $result += [ordered]@{
+ name = "-$Name"
+ value = "[$category.$sourceName]"
+ }
+ }
+
+ return $result
+}
+
+function New-ParameterArrayInParameterSet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $ParameterSetInfo
+ )
+ $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ }
+ $result = @()
+ foreach ($parameter in $parameters)
+ {
+ $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory
+ $parameterName = $parameter.Name
+ $parameterType = $parameter.ParameterType.ToString().Split('.')[1]
+ if ($parameter.SwitchParameter)
+ {
+ $parameterSignature = "-$parameterName"
+ }
+ else
+ {
+ $parameterSignature = "-$parameterName <$parameterType>"
+ }
+ if ($parameterName -eq "SubscriptionId")
+ {
+ $isMandatory = $false
+ }
+ if (-not $isMandatory)
+ {
+ $parameterSignature = "[$parameterSignature]"
+ }
+ $result += $parameterSignature
+ }
+
+ return $result
+}
+
+function New-MetadataForParameterSet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $ParameterSetInfo
+ )
+ $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute"
+ $httpPath = $httpAttribute.Path
+ $apiVersion = $httpAttribute.ApiVersion
+ $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value
+ $resourcePath = "/" + $httpPath.Split("$provider/")[1]
+ $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/"
+ $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name
+ $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description
+ [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo
+ [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo
+
+ return @{
+ Path = $httpPath
+ Provider = $provider
+ ResourceType = $resourceType
+ ApiVersion = $apiVersion
+ CmdletName = $cmdletName
+ Description = $description
+ Example = $example
+ Signature = @{
+ parameters = $signature
+ }
+ }
+}
+
+function Merge-WithExistCmdletMetadata()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Collections.Specialized.OrderedDictionary]
+ $ExistedCmdletInfo,
+ [Parameter()]
+ [Hashtable]
+ $ParameterSetMetadata
+ )
+ $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature
+ $ExistedCmdletInfo.examples += [ordered]@{
+ description = $ParameterSetMetadata.Description
+ parameters = $ParameterSetMetadata.Example
+ }
+
+ return $ExistedCmdletInfo
+}
+
+function New-MetadataForCmdlet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [Hashtable]
+ $ParameterSetMetadata
+ )
+ $cmdletName = $ParameterSetMetadata.CmdletName
+ $description = Get-CmdletDescription $cmdletName
+ $result = [ordered]@{
+ name = $cmdletName
+ description = $description
+ path = $ParameterSetMetadata.Path
+ help = [ordered]@{
+ learnMore = [ordered]@{
+ url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower()
+ }
+ parameterSets = @()
+ }
+ examples = @()
+ }
+ $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata
+ return $result
+}
+
+$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-FunctionSupported($_) }
+$resourceTypes = @{}
+foreach ($parameterSetName in $parameterSets)
+{
+ $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName]
+ $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo
+ $cmdletName = $parameterSetMetadata.CmdletName
+ if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName)))
+ {
+ continue
+ }
+ if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType))
+ {
+ $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName }
+ if ($ExistedCmdletInfo)
+ {
+ $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata
+ }
+ else
+ {
+ $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata
+ $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo
+ }
+ }
+ else
+ {
+ $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata
+ $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{
+ resourceType = $parameterSetMetadata.ResourceType
+ apiVersion = $parameterSetMetadata.ApiVersion
+ learnMore = @{
+ url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower()
+ }
+ commands = @($cmdletInfo)
+ provider = $parameterSetMetadata.Provider
+ }
+ }
+}
+
+$UXFolder = 'UX'
+if (Test-Path $UXFolder)
+{
+ Remove-Item -Path $UXFolder -Recurse
+}
+$null = New-Item -ItemType Directory -Path $UXFolder
+
+foreach ($resourceType in $resourceTypes.Keys)
+{
+ $resourceTypeFileName = $resourceType -replace "/", "-"
+ if ($resourceTypeFileName -eq "")
+ {
+ continue
+ }
+ $resourceTypeInfo = $resourceTypes[$resourceType]
+ $provider = $resourceTypeInfo.provider
+ $providerFolder = "$UXFolder/$provider"
+ if (-not (Test-Path $providerFolder))
+ {
+ $null = New-Item -ItemType Directory -Path $providerFolder
+ }
+ $resourceTypeInfo.Remove("provider")
+ $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json"
+}
diff --git a/src/Quota1/Quota.Autorest/generated/Module.cs b/src/Quota1/Quota.Autorest/generated/Module.cs
new file mode 100644
index 000000000000..da297058ef14
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/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.Quota
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.HttpPipeline _pipeline;
+
+ /// the ISendAsync pipeline instance (when proxy is enabled)
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Quota 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.Quota.Module _instance;
+
+ /// the singleton of this module class
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.Quota.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.Quota.Module());
+
+ /// The Name of this module
+ public string Name => @"Az.Quota";
+
+ /// 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.Quota";
+
+ /// 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.Quota.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.Quota.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.Quota.Runtime.HttpPipeline for the remote call.
+ public Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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.Quota.Quota();
+ _handler.Proxy = _webProxy;
+ _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient()));
+ _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/Any.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/Any.PowerShell.cs
new file mode 100644
index 000000000000..1dd1c00265bd
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Anything
+ [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.Quota.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.Quota.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.Quota.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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();
+ }
+ }
+ /// Anything
+ [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))]
+ public partial interface IAny
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/Any.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/Any.TypeConverter.cs
new file mode 100644
index 000000000000..d0d0060d4470
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IAny ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/Any.cs b/src/Quota1/Quota.Autorest/generated/api/Models/Any.cs
new file mode 100644
index 000000000000..789dde2b768a
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Anything
+ public partial class Any :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAnyInternal
+ {
+
+ /// Creates an new instance.
+ public Any()
+ {
+
+ }
+ }
+ /// Anything
+ public partial interface IAny :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+
+ }
+ /// Anything
+ internal partial interface IAnyInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/Any.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/Any.json.cs
new file mode 100644
index 000000000000..171a13a75195
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Anything
+ 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal Any(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IAny.
+ ///
+ /// a to deserialize from.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny.
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.PowerShell.cs
new file mode 100644
index 000000000000..7948918965ef
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Resource properties.
+ [System.ComponentModel.TypeConverter(typeof(CommonResourcePropertiesTypeConverter))]
+ public partial class CommonResourceProperties
+ {
+
+ ///
+ /// 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 CommonResourceProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Type, 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 CommonResourceProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal)this).Type, 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.Quota.Models.ICommonResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CommonResourceProperties(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.Quota.Models.ICommonResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CommonResourceProperties(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.Quota.Models.ICommonResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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 properties.
+ [System.ComponentModel.TypeConverter(typeof(CommonResourcePropertiesTypeConverter))]
+ public partial interface ICommonResourceProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.TypeConverter.cs
new file mode 100644
index 000000000000..19e2a1fe034f
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CommonResourcePropertiesTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.ICommonResourceProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourceProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CommonResourceProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CommonResourceProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CommonResourceProperties.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/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.cs
new file mode 100644
index 000000000000..9811399e2cec
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.cs
@@ -0,0 +1,103 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Resource properties.
+ public partial class CommonResourceProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourceProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Resource ID
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourcePropertiesInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// Resource type. Example: "Microsoft.Quota/quotas"
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Creates an new instance.
+ public CommonResourceProperties()
+ {
+
+ }
+ }
+ /// Resource properties.
+ public partial interface ICommonResourceProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Resource ID
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource ID",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource name.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// Resource type. Example: "Microsoft.Quota/quotas"
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource type. Example: ""Microsoft.Quota/quotas""",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ /// Resource properties.
+ internal partial interface ICommonResourcePropertiesInternal
+
+ {
+ /// Resource ID
+ string Id { get; set; }
+ /// Resource name.
+ string Name { get; set; }
+ /// Resource type. Example: "Microsoft.Quota/quotas"
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.json.cs
new file mode 100644
index 000000000000..8dab63544295
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CommonResourceProperties.json.cs
@@ -0,0 +1,121 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Resource properties.
+ public partial class CommonResourceProperties
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal CommonResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourceProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourceProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICommonResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new CommonResourceProperties(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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.PowerShell.cs
new file mode 100644
index 000000000000..fb2a84fdf501
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.PowerShell.cs
@@ -0,0 +1,166 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota change requests information.
+ [System.ComponentModel.TypeConverter(typeof(CreateGenericQuotaRequestParametersTypeConverter))]
+ public partial class CreateGenericQuotaRequestParameters
+ {
+
+ ///
+ /// 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 CreateGenericQuotaRequestParameters(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.Quota.Models.ICreateGenericQuotaRequestParametersInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICreateGenericQuotaRequestParametersInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBaseTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal CreateGenericQuotaRequestParameters(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.Quota.Models.ICreateGenericQuotaRequestParametersInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICreateGenericQuotaRequestParametersInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBaseTypeConverter.ConvertFrom));
+ }
+ 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.Quota.Models.ICreateGenericQuotaRequestParameters DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CreateGenericQuotaRequestParameters(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.Quota.Models.ICreateGenericQuotaRequestParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CreateGenericQuotaRequestParameters(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.Quota.Models.ICreateGenericQuotaRequestParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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 change requests information.
+ [System.ComponentModel.TypeConverter(typeof(CreateGenericQuotaRequestParametersTypeConverter))]
+ public partial interface ICreateGenericQuotaRequestParameters
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.TypeConverter.cs
new file mode 100644
index 000000000000..e65915ce6dde
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.TypeConverter.cs
@@ -0,0 +1,149 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CreateGenericQuotaRequestParametersTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.ICreateGenericQuotaRequestParameters ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICreateGenericQuotaRequestParameters).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CreateGenericQuotaRequestParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CreateGenericQuotaRequestParameters.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CreateGenericQuotaRequestParameters.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/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.cs
new file mode 100644
index 000000000000..9963c4594385
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota change requests information.
+ public partial class CreateGenericQuotaRequestParameters :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICreateGenericQuotaRequestParameters,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICreateGenericQuotaRequestParametersInternal
+ {
+
+ /// Backing field for property.
+ private System.Collections.Generic.List _value;
+
+ /// Quota change requests.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public System.Collections.Generic.List Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public CreateGenericQuotaRequestParameters()
+ {
+
+ }
+ }
+ /// Quota change requests information.
+ public partial interface ICreateGenericQuotaRequestParameters :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Quota change requests.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Quota change requests.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase) })]
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+ /// Quota change requests information.
+ internal partial interface ICreateGenericQuotaRequestParametersInternal
+
+ {
+ /// Quota change requests.
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.json.cs
new file mode 100644
index 000000000000..46bed245ba10
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CreateGenericQuotaRequestParameters.json.cs
@@ -0,0 +1,117 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota change requests information.
+ public partial class CreateGenericQuotaRequestParameters
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal CreateGenericQuotaRequestParameters(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase) (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBase.FromJson(__u) )) ))() : null : _value;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICreateGenericQuotaRequestParameters.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICreateGenericQuotaRequestParameters.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICreateGenericQuotaRequestParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new CreateGenericQuotaRequestParameters(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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.PowerShell.cs
new file mode 100644
index 000000000000..6bbb33744e22
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota limit.
+ [System.ComponentModel.TypeConverter(typeof(CurrentQuotaLimitBaseTypeConverter))]
+ public partial class CurrentQuotaLimitBase
+ {
+
+ ///
+ /// 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 CurrentQuotaLimitBase(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.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("ETag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).ETag, global::System.Convert.ToString);
+ }
+ if (content.Contains("AnyProperty"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).AnyProperty = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("AnyProperty",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).AnyProperty, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("PropertiesName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).PropertiesName = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).PropertiesName, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitJsonObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsQuotaApplicable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).IsQuotaApplicable = (bool?) content.GetValueForProperty("IsQuotaApplicable",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).IsQuotaApplicable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).NameLocalizedValue, 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 CurrentQuotaLimitBase(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.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("ETag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).ETag, global::System.Convert.ToString);
+ }
+ if (content.Contains("AnyProperty"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).AnyProperty = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("AnyProperty",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).AnyProperty, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("PropertiesName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).PropertiesName = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).PropertiesName, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitJsonObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsQuotaApplicable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).IsQuotaApplicable = (bool?) content.GetValueForProperty("IsQuotaApplicable",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).IsQuotaApplicable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).NameLocalizedValue, 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.Quota.Models.ICurrentQuotaLimitBase DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CurrentQuotaLimitBase(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.Quota.Models.ICurrentQuotaLimitBase DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CurrentQuotaLimitBase(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.Quota.Models.ICurrentQuotaLimitBase FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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 limit.
+ [System.ComponentModel.TypeConverter(typeof(CurrentQuotaLimitBaseTypeConverter))]
+ public partial interface ICurrentQuotaLimitBase
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.TypeConverter.cs
new file mode 100644
index 000000000000..9351396fa7a1
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CurrentQuotaLimitBaseTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.ICurrentQuotaLimitBase ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CurrentQuotaLimitBase.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CurrentQuotaLimitBase.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CurrentQuotaLimitBase.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/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.cs
new file mode 100644
index 000000000000..7ea5fb8a7234
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.cs
@@ -0,0 +1,352 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota limit.
+ public partial class CurrentQuotaLimitBase :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IHeaderSerializable
+ {
+
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).Property = value ?? null /* model class */; }
+
+ /// Backing field for property.
+ private string _eTag;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 4)]
+ public string ETag { get => this._eTag; set => this._eTag = value; }
+
+ /// Backing field for property.
+ private string _id;
+
+ /// The resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string Id { get => this._id; }
+
+ /// States if quota can be requested for this resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public bool? IsQuotaApplicable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).IsQuotaApplicable; }
+
+ /// Resource quota limit properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject Limit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).Limit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).Limit = value ?? null /* model class */; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for IsQuotaApplicable
+ bool? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal.IsQuotaApplicable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).IsQuotaApplicable; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).IsQuotaApplicable = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for NameLocalizedValue
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal.NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).NameLocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).NameLocalizedValue = value; }
+
+ /// Internal Acessors for PropertiesName
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal.PropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).Name = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for QuotaPeriod
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal.QuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).QuotaPeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).QuotaPeriod = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Internal Acessors for Unit
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal.Unit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).Unit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).Unit = value; }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 0)]
+ public string Name { get => this._name; }
+
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 1)]
+ public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).NameLocalizedValue; }
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).NameValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).NameValue = value ?? null; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties _property;
+
+ ///
+ /// Quota properties for the specified resource, based on the API called, Quotas or Usages.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaProperties()); set => this._property = value; }
+
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string QuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).QuotaPeriod; }
+
+ /// Gets the resource group name
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); }
+
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).ResourceType = value ?? null; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// The resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string Type { get => this._type; }
+
+ ///
+ /// The quota units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in
+ /// the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 3)]
+ public string Unit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)Property).Unit; }
+
+ /// Creates an new instance.
+ public CurrentQuotaLimitBase()
+ {
+
+ }
+
+ ///
+ void Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers)
+ {
+ if (headers.TryGetValues("ETag", out var __eTagHeader0))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBaseInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null;
+ }
+ }
+ }
+ /// Quota limit.
+ public partial interface ICurrentQuotaLimitBase :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Additional properties for the specific resource provider.",
+ SerializedName = @"properties",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"",
+ SerializedName = @"ETag",
+ PossibleTypes = new [] { typeof(string) })]
+ string ETag { get; set; }
+ /// The resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The resource ID.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// States if quota can be requested for this resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"States if quota can be requested for this resource.",
+ SerializedName = @"isQuotaApplicable",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsQuotaApplicable { get; }
+ /// Resource quota limit properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource quota limit properties.",
+ SerializedName = @"limit",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject Limit { get; set; }
+ /// The resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The resource name.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource display name.",
+ SerializedName = @"localizedValue",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameLocalizedValue { get; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameValue { get; set; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The time period over which the quota usage values are summarized. For example:
+ *P1D (per one day)
+ *PT1M (per one minute)
+ *PT1S (per one second).
+ This parameter is optional because, for some resources like compute, the period is irrelevant.",
+ SerializedName = @"quotaPeriod",
+ PossibleTypes = new [] { typeof(string) })]
+ string QuotaPeriod { get; }
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The name of the resource type. Optional field.",
+ SerializedName = @"resourceType",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceType { get; set; }
+ /// The resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The resource type.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+ ///
+ /// The quota units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in
+ /// the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @" The quota units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in the request body of your PUT operation.",
+ SerializedName = @"unit",
+ PossibleTypes = new [] { typeof(string) })]
+ string Unit { get; }
+
+ }
+ /// Quota limit.
+ internal partial interface ICurrentQuotaLimitBaseInternal
+
+ {
+ /// Additional properties for the specific resource provider.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get; set; }
+
+ string ETag { get; set; }
+ /// The resource ID.
+ string Id { get; set; }
+ /// States if quota can be requested for this resource.
+ bool? IsQuotaApplicable { get; set; }
+ /// Resource quota limit properties.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject Limit { get; set; }
+ /// The resource name.
+ string Name { get; set; }
+ /// Resource display name.
+ string NameLocalizedValue { get; set; }
+ /// Resource name.
+ string NameValue { get; set; }
+ ///
+ /// Resource name provided by the resource provider. Use this property name when requesting quota.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName PropertiesName { get; set; }
+ ///
+ /// Quota properties for the specified resource, based on the API called, Quotas or Usages.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties Property { get; set; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ string QuotaPeriod { get; set; }
+ /// The name of the resource type. Optional field.
+ string ResourceType { get; set; }
+ /// The resource type.
+ string Type { get; set; }
+ ///
+ /// The quota units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in
+ /// the request body of your PUT operation.
+ ///
+ string Unit { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.json.cs
new file mode 100644
index 000000000000..0cb640acf1b4
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentQuotaLimitBase.json.cs
@@ -0,0 +1,123 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota limit.
+ public partial class CurrentQuotaLimitBase
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal CurrentQuotaLimitBase(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaProperties.FromJson(__jsonProperties) : _property;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new CurrentQuotaLimitBase(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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.PowerShell.cs
new file mode 100644
index 000000000000..bb58d42b0cdc
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.PowerShell.cs
@@ -0,0 +1,284 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Resource usage.
+ [System.ComponentModel.TypeConverter(typeof(CurrentUsagesBaseTypeConverter))]
+ public partial class CurrentUsagesBase
+ {
+
+ ///
+ /// 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 CurrentUsagesBase(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.Quota.Models.ICurrentUsagesBaseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("ETag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).ETag, global::System.Convert.ToString);
+ }
+ if (content.Contains("AnyProperty"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).AnyProperty = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("AnyProperty",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).AnyProperty, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Usage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Usage = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesObject) content.GetValueForProperty("Usage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Usage, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("PropertiesName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).PropertiesName = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).PropertiesName, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsQuotaApplicable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).IsQuotaApplicable = (bool?) content.GetValueForProperty("IsQuotaApplicable",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).IsQuotaApplicable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("UsageValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).UsageValue = (int) content.GetValueForProperty("UsageValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).UsageValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("UsageUsagesType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).UsageUsagesType = (string) content.GetValueForProperty("UsageUsagesType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).UsageUsagesType, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).NameLocalizedValue, 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 CurrentUsagesBase(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.Quota.Models.ICurrentUsagesBaseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("ETag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).ETag, global::System.Convert.ToString);
+ }
+ if (content.Contains("AnyProperty"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).AnyProperty = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("AnyProperty",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).AnyProperty, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Usage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Usage = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesObject) content.GetValueForProperty("Usage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Usage, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("PropertiesName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).PropertiesName = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).PropertiesName, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsQuotaApplicable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).IsQuotaApplicable = (bool?) content.GetValueForProperty("IsQuotaApplicable",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).IsQuotaApplicable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("UsageValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).UsageValue = (int) content.GetValueForProperty("UsageValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).UsageValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("UsageUsagesType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).UsageUsagesType = (string) content.GetValueForProperty("UsageUsagesType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).UsageUsagesType, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).NameLocalizedValue, 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.Quota.Models.ICurrentUsagesBase DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CurrentUsagesBase(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.Quota.Models.ICurrentUsagesBase DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CurrentUsagesBase(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.Quota.Models.ICurrentUsagesBase FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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 usage.
+ [System.ComponentModel.TypeConverter(typeof(CurrentUsagesBaseTypeConverter))]
+ public partial interface ICurrentUsagesBase
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.TypeConverter.cs
new file mode 100644
index 000000000000..6e49372264a2
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CurrentUsagesBaseTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.ICurrentUsagesBase ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBase).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CurrentUsagesBase.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CurrentUsagesBase.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CurrentUsagesBase.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/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.cs
new file mode 100644
index 000000000000..11425837fef1
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.cs
@@ -0,0 +1,373 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Resource usage.
+ public partial class CurrentUsagesBase :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBase,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IHeaderSerializable
+ {
+
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).Property = value ?? null /* model class */; }
+
+ /// Backing field for property.
+ private string _eTag;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 4)]
+ public string ETag { get => this._eTag; set => this._eTag = value; }
+
+ /// Backing field for property.
+ private string _id;
+
+ /// The resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string Id { get => this._id; }
+
+ /// States if quota can be requested for this resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public bool? IsQuotaApplicable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).IsQuotaApplicable; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for IsQuotaApplicable
+ bool? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal.IsQuotaApplicable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).IsQuotaApplicable; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).IsQuotaApplicable = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for NameLocalizedValue
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal.NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).NameLocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).NameLocalizedValue = value; }
+
+ /// Internal Acessors for PropertiesName
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal.PropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).Name = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesProperties Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for QuotaPeriod
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal.QuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).QuotaPeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).QuotaPeriod = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Internal Acessors for Unit
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal.Unit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).Unit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).Unit = value; }
+
+ /// Internal Acessors for Usage
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesObject Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal.Usage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).Usage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).Usage = value; }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 0)]
+ public string Name { get => this._name; }
+
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 1)]
+ public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).NameLocalizedValue; }
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).NameValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).NameValue = value ?? null; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesProperties _property;
+
+ /// Usage properties for the specified resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesProperties()); set => this._property = value; }
+
+ ///
+ /// The time period for the summary of the quota usage values. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because it is not relevant for all resources such as compute.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string QuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).QuotaPeriod; }
+
+ /// Gets the resource group name
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); }
+
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).ResourceType = value ?? null; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// The resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string Type { get => this._type; }
+
+ ///
+ /// The units for the quota usage, such as Count and Bytes. When requesting quota, use the **unit** value returned in the
+ /// GET response in the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string Unit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).Unit; }
+
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 2)]
+ public string UsageUsagesType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).UsageUsagesType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).UsageUsagesType = value ?? null; }
+
+ /// The usages value.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 3)]
+ public int? UsageValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).UsageValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesPropertiesInternal)Property).UsageValue = value ?? default(int); }
+
+ /// Creates an new instance.
+ public CurrentUsagesBase()
+ {
+
+ }
+
+ ///
+ void Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers)
+ {
+ if (headers.TryGetValues("ETag", out var __eTagHeader0))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBaseInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null;
+ }
+ }
+ }
+ /// Resource usage.
+ public partial interface ICurrentUsagesBase :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Additional properties for the specific resource provider.",
+ SerializedName = @"properties",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"",
+ SerializedName = @"ETag",
+ PossibleTypes = new [] { typeof(string) })]
+ string ETag { get; set; }
+ /// The resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The resource ID.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// States if quota can be requested for this resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"States if quota can be requested for this resource.",
+ SerializedName = @"isQuotaApplicable",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsQuotaApplicable { get; }
+ /// The resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The resource name.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource display name.",
+ SerializedName = @"localizedValue",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameLocalizedValue { get; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameValue { get; set; }
+ ///
+ /// The time period for the summary of the quota usage values. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because it is not relevant for all resources such as compute.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The time period for the summary of the quota usage values. For example:
+ *P1D (per one day)
+ *PT1M (per one minute)
+ *PT1S (per one second).
+ This parameter is optional because it is not relevant for all resources such as compute.",
+ SerializedName = @"quotaPeriod",
+ PossibleTypes = new [] { typeof(string) })]
+ string QuotaPeriod { get; }
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The name of the resource type. Optional field.",
+ SerializedName = @"resourceType",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceType { get; set; }
+ /// The resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The resource type.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+ ///
+ /// The units for the quota usage, such as Count and Bytes. When requesting quota, use the **unit** value returned in the
+ /// GET response in the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @" The units for the quota usage, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in the request body of your PUT operation.",
+ SerializedName = @"unit",
+ PossibleTypes = new [] { typeof(string) })]
+ string Unit { get; }
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota or usages limit types.",
+ SerializedName = @"usagesType",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Individual", "Combined")]
+ string UsageUsagesType { get; set; }
+ /// The usages value.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The usages value.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(int) })]
+ int? UsageValue { get; set; }
+
+ }
+ /// Resource usage.
+ internal partial interface ICurrentUsagesBaseInternal
+
+ {
+ /// Additional properties for the specific resource provider.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get; set; }
+
+ string ETag { get; set; }
+ /// The resource ID.
+ string Id { get; set; }
+ /// States if quota can be requested for this resource.
+ bool? IsQuotaApplicable { get; set; }
+ /// The resource name.
+ string Name { get; set; }
+ /// Resource display name.
+ string NameLocalizedValue { get; set; }
+ /// Resource name.
+ string NameValue { get; set; }
+ ///
+ /// Resource name provided by the resource provider. Use this property name when requesting quota.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName PropertiesName { get; set; }
+ /// Usage properties for the specified resource.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesProperties Property { get; set; }
+ ///
+ /// The time period for the summary of the quota usage values. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because it is not relevant for all resources such as compute.
+ ///
+ string QuotaPeriod { get; set; }
+ /// The name of the resource type. Optional field.
+ string ResourceType { get; set; }
+ /// The resource type.
+ string Type { get; set; }
+ ///
+ /// The units for the quota usage, such as Count and Bytes. When requesting quota, use the **unit** value returned in the
+ /// GET response in the request body of your PUT operation.
+ ///
+ string Unit { get; set; }
+ /// The quota limit properties for this resource.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IUsagesObject Usage { get; set; }
+ /// The quota or usages limit types.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Individual", "Combined")]
+ string UsageUsagesType { get; set; }
+ /// The usages value.
+ int? UsageValue { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.json.cs
new file mode 100644
index 000000000000..da965cb31406
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/CurrentUsagesBase.json.cs
@@ -0,0 +1,123 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Resource usage.
+ public partial class CurrentUsagesBase
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal CurrentUsagesBase(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.UsagesProperties.FromJson(__jsonProperties) : _property;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBase.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBase.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentUsagesBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new CurrentUsagesBase(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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.PowerShell.cs
new file mode 100644
index 000000000000..6ef0f03d5f2f
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.PowerShell.cs
@@ -0,0 +1,188 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Error.
+ [System.ComponentModel.TypeConverter(typeof(ExceptionResponseTypeConverter))]
+ public partial class ExceptionResponse
+ {
+
+ ///
+ /// 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.Quota.Models.IExceptionResponse DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ExceptionResponse(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.Quota.Models.IExceptionResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ExceptionResponse(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ExceptionResponse(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.Quota.Models.IExceptionResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ExceptionResponse(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.Quota.Models.IExceptionResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.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.Quota.Models.IExceptionResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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();
+ }
+ }
+ /// Error.
+ [System.ComponentModel.TypeConverter(typeof(ExceptionResponseTypeConverter))]
+ public partial interface IExceptionResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.TypeConverter.cs
new file mode 100644
index 000000000000..5327cd3acda8
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ExceptionResponseTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IExceptionResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ExceptionResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ExceptionResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ExceptionResponse.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/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.cs
new file mode 100644
index 000000000000..ce5ad7570450
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.cs
@@ -0,0 +1,100 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Error.
+ public partial class ExceptionResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal
+ {
+
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)Error).Code = value ?? null; }
+
+ /// List of error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)Error).Detail; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceError _error;
+
+ /// API error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceError()); set => this._error = value; }
+
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)Error).Message = value ?? null; }
+
+ /// Internal Acessors for Detail
+ System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)Error).Detail = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceError Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceError()); set { {_error = value;} } }
+
+ /// Creates an new instance.
+ public ExceptionResponse()
+ {
+
+ }
+ }
+ /// Error.
+ public partial interface IExceptionResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; set; }
+ /// List of error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"List of error details.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) })]
+ System.Collections.Generic.List Detail { get; }
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; set; }
+
+ }
+ /// Error.
+ internal partial interface IExceptionResponseInternal
+
+ {
+ /// Error code.
+ string Code { get; set; }
+ /// List of error details.
+ System.Collections.Generic.List Detail { get; set; }
+ /// API error details.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceError Error { get; set; }
+ /// Error message.
+ string Message { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.json.cs
new file mode 100644
index 000000000000..406be0196f75
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ExceptionResponse.json.cs
@@ -0,0 +1,108 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Error.
+ public partial class ExceptionResponse
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal ExceptionResponse(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.ServiceError.FromJson(__jsonError) : _error;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IExceptionResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new ExceptionResponse(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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.PowerShell.cs
new file mode 100644
index 000000000000..481e10753d66
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// LimitJson abstract class.
+ [System.ComponentModel.TypeConverter(typeof(LimitJsonObjectTypeConverter))]
+ public partial class LimitJsonObject
+ {
+
+ ///
+ /// 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.Quota.Models.ILimitJsonObject DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new LimitJsonObject(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.Quota.Models.ILimitJsonObject DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new LimitJsonObject(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.Quota.Models.ILimitJsonObject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal LimitJsonObject(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.Quota.Models.ILimitJsonObjectInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)this).Type, 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 LimitJsonObject(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.Quota.Models.ILimitJsonObjectInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)this).Type, 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.Quota.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();
+ }
+ }
+ /// LimitJson abstract class.
+ [System.ComponentModel.TypeConverter(typeof(LimitJsonObjectTypeConverter))]
+ public partial interface ILimitJsonObject
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.TypeConverter.cs
new file mode 100644
index 000000000000..f223364a86e2
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class LimitJsonObjectTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.ILimitJsonObject ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return LimitJsonObject.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return LimitJsonObject.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return LimitJsonObject.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/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.cs b/src/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.cs
new file mode 100644
index 000000000000..a3102e4c33c9
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.cs
@@ -0,0 +1,57 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// LimitJson abstract class.
+ public partial class LimitJsonObject :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal
+ {
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _type= @"LimitValue";
+
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Creates an new instance.
+ public LimitJsonObject()
+ {
+
+ }
+ }
+ /// LimitJson abstract class.
+ public partial interface ILimitJsonObject :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = true,
+ ReadOnly = true,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The limit object type.",
+ SerializedName = @"limitObjectType",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ /// LimitJson abstract class.
+ internal partial interface ILimitJsonObjectInternal
+
+ {
+ /// The limit object type.
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.json.cs
new file mode 100644
index 000000000000..54ea0bc8e4f5
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/LimitJsonObject.json.cs
@@ -0,0 +1,123 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// LimitJson abstract class.
+ public partial class LimitJsonObject
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject.
+ /// Note: the Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject interface is polymorphic, and the precise model
+ /// class that will get deserialized is determined at runtime based on the payload.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ if (!(node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json))
+ {
+ return null;
+ }
+ // Polymorphic type -- select the appropriate constructor using the discriminator
+
+ switch ( json.StringProperty("limitObjectType") )
+ {
+ case "LimitValue":
+ {
+ return new LimitObject(json);
+ }
+ }
+ return new LimitJsonObject(json);
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal LimitJsonObject(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_type = If( json?.PropertyT("limitObjectType"), out var __jsonLimitObjectType) ? (string)__jsonLimitObjectType : (string)_type;}
+ 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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._type.ToString()) : null, "limitObjectType" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.PowerShell.cs
new file mode 100644
index 000000000000..a896385eec83
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// The resource quota limit value.
+ [System.ComponentModel.TypeConverter(typeof(LimitObjectTypeConverter))]
+ public partial class LimitObject
+ {
+
+ ///
+ /// 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.Quota.Models.ILimitObject DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new LimitObject(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.Quota.Models.ILimitObject DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new LimitObject(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.Quota.Models.ILimitObject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal LimitObject(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.Quota.Models.ILimitObjectInternal)this).Value = (int) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)this).Value, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("LimitType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)this).LimitType = (string) content.GetValueForProperty("LimitType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)this).LimitType, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)this).Type, 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 LimitObject(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.Quota.Models.ILimitObjectInternal)this).Value = (int) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)this).Value, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("LimitType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)this).LimitType = (string) content.GetValueForProperty("LimitType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)this).LimitType, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)this).Type, 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.Quota.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 quota limit value.
+ [System.ComponentModel.TypeConverter(typeof(LimitObjectTypeConverter))]
+ public partial interface ILimitObject
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.TypeConverter.cs
new file mode 100644
index 000000000000..cdcf780a6737
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class LimitObjectTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.ILimitObject ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return LimitObject.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return LimitObject.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return LimitObject.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/Quota1/Quota.Autorest/generated/api/Models/LimitObject.cs b/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.cs
new file mode 100644
index 000000000000..aa5530cbd855
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.cs
@@ -0,0 +1,102 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// The resource quota limit value.
+ public partial class LimitObject :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject __limitJsonObject = new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitJsonObject();
+
+ /// Backing field for property.
+ private string _limitType;
+
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string LimitType { get => this._limitType; set => this._limitType = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)__limitJsonObject).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)__limitJsonObject).Type = value; }
+
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Constant]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inherited)]
+ public string Type { get => "LimitValue"; }
+
+ /// Backing field for property.
+ private int _value;
+
+ /// The quota/limit value
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public int Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public LimitObject()
+ {
+
+ }
+
+ /// 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.Quota.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__limitJsonObject), __limitJsonObject);
+ await eventListener.AssertObjectIsValid(nameof(__limitJsonObject), __limitJsonObject);
+ }
+ }
+ /// The resource quota limit value.
+ public partial interface ILimitObject :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject
+ {
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota or usages limit types.",
+ SerializedName = @"limitType",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ string LimitType { get; set; }
+ /// The quota/limit value
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota/limit value",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(int) })]
+ int Value { get; set; }
+
+ }
+ /// The resource quota limit value.
+ internal partial interface ILimitObjectInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal
+ {
+ /// The quota or usages limit types.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ string LimitType { get; set; }
+ /// The quota/limit value
+ int Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.json.cs
new file mode 100644
index 000000000000..ca35b9b3928b
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/LimitObject.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// The resource quota limit value.
+ public partial class LimitObject
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject.
+ ///
+ /// a to deserialize from.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject.
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new LimitObject(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal LimitObject(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __limitJsonObject = new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitJsonObject(json);
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (int)__jsonValue : _value;}
+ {_limitType = If( json?.PropertyT("limitType"), out var __jsonLimitType) ? (string)__jsonLimitType : (string)_limitType;}
+ 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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __limitJsonObject?.ToJson(container, serializationMode);
+ AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNumber(this._value), "value" ,container.Add );
+ AddIf( null != (((object)this._limitType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._limitType.ToString()) : null, "limitType" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs
new file mode 100644
index 000000000000..b0d970bf070d
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs
@@ -0,0 +1,186 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial class OperationDisplay
+ {
+
+ ///
+ /// 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.Quota.Models.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OperationDisplay(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.Quota.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OperationDisplay(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.Quota.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OperationDisplay(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Provider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Description, 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 OperationDisplay(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Provider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)this).Description, 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.Quota.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial interface IOperationDisplay
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs
new file mode 100644
index 000000000000..1f2771211a7c
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationDisplayTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IOperationDisplay ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OperationDisplay.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OperationDisplay.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/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.cs
new file mode 100644
index 000000000000..1132911a8a53
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ public partial class OperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal
+ {
+
+ /// Backing field for property.
+ private string _description;
+
+ /// Operation description.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Description { get => this._description; set => this._description = value; }
+
+ /// Backing field for property.
+ private string _operation;
+
+ /// Operation name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Operation { get => this._operation; set => this._operation = value; }
+
+ /// Backing field for property.
+ private string _provider;
+
+ /// Provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Provider { get => this._provider; set => this._provider = value; }
+
+ /// Backing field for property.
+ private string _resource;
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Resource { get => this._resource; set => this._resource = value; }
+
+ /// Creates an new instance.
+ public OperationDisplay()
+ {
+
+ }
+ }
+ public partial interface IOperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Operation description.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Operation description.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; set; }
+ /// Operation name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Operation name.",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string Operation { get; set; }
+ /// Provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Provider name.",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string Provider { get; set; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name.",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string Resource { get; set; }
+
+ }
+ internal partial interface IOperationDisplayInternal
+
+ {
+ /// Operation description.
+ string Description { get; set; }
+ /// Operation name.
+ string Operation { get; set; }
+ /// Provider name.
+ string Provider { get; set; }
+ /// Resource name.
+ string Resource { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.json.cs
new file mode 100644
index 000000000000..daa1a341a766
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationDisplay.json.cs
@@ -0,0 +1,113 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ public partial class OperationDisplay
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)_provider;}
+ {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)_resource;}
+ {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)_operation;}
+ {_description = If( json?.PropertyT("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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add );
+ AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add );
+ AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add );
+ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/OperationList.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationList.PowerShell.cs
new file mode 100644
index 000000000000..3afe51356f4b
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationList.PowerShell.cs
@@ -0,0 +1,170 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(OperationListTypeConverter))]
+ public partial class OperationList
+ {
+
+ ///
+ /// 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.Quota.Models.IOperationList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OperationList(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.Quota.Models.IOperationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OperationList(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.Quota.Models.IOperationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OperationList(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.Quota.Models.IOperationListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationResponseTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationListInternal)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 OperationList(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.Quota.Models.IOperationListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationResponseTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationListInternal)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.Quota.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ [System.ComponentModel.TypeConverter(typeof(OperationListTypeConverter))]
+ public partial interface IOperationList
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/OperationList.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationList.TypeConverter.cs
new file mode 100644
index 000000000000..7d8a1bbcb126
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationList.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationListTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IOperationList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationList).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OperationList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OperationList.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OperationList.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/Quota1/Quota.Autorest/generated/api/Models/OperationList.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationList.cs
new file mode 100644
index 000000000000..eb39da3515f7
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationList.cs
@@ -0,0 +1,70 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ public partial class OperationList :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationList,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationListInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// URL to get the next page of items.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private System.Collections.Generic.List _value;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public System.Collections.Generic.List Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public OperationList()
+ {
+
+ }
+ }
+ public partial interface IOperationList :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// URL to get the next page of items.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"URL to get the next page of items.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse) })]
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+ internal partial interface IOperationListInternal
+
+ {
+ /// URL to get the next page of items.
+ string NextLink { get; set; }
+
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/OperationList.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationList.json.cs
new file mode 100644
index 000000000000..9846b5257649
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationList.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ public partial class OperationList
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationList.
+ ///
+ /// a to deserialize from.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationList.
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new OperationList(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationList(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse) (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationResponse.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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.PowerShell.cs
new file mode 100644
index 000000000000..08dc37082b70
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.PowerShell.cs
@@ -0,0 +1,210 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(OperationResponseTypeConverter))]
+ public partial class OperationResponse
+ {
+
+ ///
+ /// 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.Quota.Models.IOperationResponse DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OperationResponse(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.Quota.Models.IOperationResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OperationResponse(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.Quota.Models.IOperationResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OperationResponse(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.Quota.Models.IOperationResponseInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Origin"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).Origin, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)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 OperationResponse(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.Quota.Models.IOperationResponseInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Origin"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).Origin, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal)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.Quota.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ [System.ComponentModel.TypeConverter(typeof(OperationResponseTypeConverter))]
+ public partial interface IOperationResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.TypeConverter.cs
new file mode 100644
index 000000000000..4fc179d5a33e
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationResponseTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IOperationResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OperationResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OperationResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OperationResponse.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/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.cs
new file mode 100644
index 000000000000..181cc0991f2d
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ public partial class OperationResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay _display;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationDisplay()); set => this._display = value; }
+
+ /// Operation description.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)Display).Description = value ?? null; }
+
+ /// Operation name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)Display).Operation = value ?? null; }
+
+ /// Provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)Display).Provider = value ?? null; }
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplayInternal)Display).Resource = value ?? null; }
+
+ /// Internal Acessors for Display
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponseInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.OperationDisplay()); set { {_display = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Name { get => this._name; set => this._name = value; }
+
+ /// Backing field for property.
+ private string _origin;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Origin { get => this._origin; set => this._origin = value; }
+
+ /// Creates an new instance.
+ public OperationResponse()
+ {
+
+ }
+ }
+ public partial interface IOperationResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Operation description.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Operation description.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayDescription { get; set; }
+ /// Operation name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Operation name.",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayOperation { get; set; }
+ /// Provider name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Provider name.",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayProvider { get; set; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name.",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayResource { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; set; }
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"",
+ SerializedName = @"origin",
+ PossibleTypes = new [] { typeof(string) })]
+ string Origin { get; set; }
+
+ }
+ internal partial interface IOperationResponseInternal
+
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationDisplay Display { get; set; }
+ /// Operation description.
+ string DisplayDescription { get; set; }
+ /// Operation name.
+ string DisplayOperation { get; set; }
+ /// Provider name.
+ string DisplayProvider { get; set; }
+ /// Resource name.
+ string DisplayResource { get; set; }
+
+ string Name { get; set; }
+
+ string Origin { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.json.cs
new file mode 100644
index 000000000000..4bd28a3fb77b
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/OperationResponse.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ public partial class OperationResponse
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IOperationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new OperationResponse(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationResponse(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.OperationDisplay.FromJson(__jsonDisplay) : _display;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;}
+ {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)_origin;}
+ 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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add );
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.PowerShell.cs
new file mode 100644
index 000000000000..4cef92a01c8f
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.PowerShell.cs
@@ -0,0 +1,186 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(QuotaIdentityTypeConverter))]
+ public partial class QuotaIdentity
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaIdentity(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.Quota.Models.IQuotaIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaIdentity(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.Quota.Models.IQuotaIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaIdentity(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Scope"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Scope, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).ResourceName = (string) content.GetValueForProperty("ResourceName",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).ResourceName, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id1"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Id1 = (string) content.GetValueForProperty("Id1",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Id1, 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 QuotaIdentity(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Scope"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Scope, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).ResourceName = (string) content.GetValueForProperty("ResourceName",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).ResourceName, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id1"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Id1 = (string) content.GetValueForProperty("Id1",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal)this).Id1, 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.Quota.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ [System.ComponentModel.TypeConverter(typeof(QuotaIdentityTypeConverter))]
+ public partial interface IQuotaIdentity
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.TypeConverter.cs
new file mode 100644
index 000000000000..d6fe63046718
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.TypeConverter.cs
@@ -0,0 +1,157 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaIdentityTypeConverter : 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();
+ // we allow string conversion too.
+ if (type == typeof(global::System.String))
+ {
+ return true;
+ }
+ 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaIdentity ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ // support direct string to id type conversion.
+ if (type == typeof(global::System.String))
+ {
+ return new QuotaIdentity { Id = sourceValue };
+ }
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaIdentity.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaIdentity.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/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.cs
new file mode 100644
index 000000000000..263be6133ec8
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.cs
@@ -0,0 +1,141 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ public partial class QuotaIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentityInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Quota request ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Id { get => this._id; set => this._id = value; }
+
+ /// Backing field for property.
+ private string _id1;
+
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Id1 { get => this._id1; set => this._id1 = value; }
+
+ /// Backing field for property.
+ private string _resourceName;
+
+ ///
+ /// Resource name for a given resource provider. For example:
+ /// - SKU name for Microsoft.Compute
+ /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ /// For Microsoft.Network PublicIPAddresses.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string ResourceName { get => this._resourceName; set => this._resourceName = value; }
+
+ /// Backing field for property.
+ private string _scope;
+
+ ///
+ /// The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ /// This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then
+ /// it's the target Azure resource URI in the GET operation for the specific resource.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Scope { get => this._scope; set => this._scope = value; }
+
+ /// Creates an new instance.
+ public QuotaIdentity()
+ {
+
+ }
+ }
+ public partial interface IQuotaIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Quota request ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Quota request ID.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; set; }
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource identity path",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id1 { get; set; }
+ ///
+ /// Resource name for a given resource provider. For example:
+ /// - SKU name for Microsoft.Compute
+ /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ /// For Microsoft.Network PublicIPAddresses.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name for a given resource provider. For example:
+ - SKU name for Microsoft.Compute
+ - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ For Microsoft.Network PublicIPAddresses.",
+ SerializedName = @"resourceName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceName { get; set; }
+ ///
+ /// The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ /// This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then
+ /// it's the target Azure resource URI in the GET operation for the specific resource.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.",
+ SerializedName = @"scope",
+ PossibleTypes = new [] { typeof(string) })]
+ string Scope { get; set; }
+
+ }
+ internal partial interface IQuotaIdentityInternal
+
+ {
+ /// Quota request ID.
+ string Id { get; set; }
+ /// Resource identity path
+ string Id1 { get; set; }
+ ///
+ /// Resource name for a given resource provider. For example:
+ /// - SKU name for Microsoft.Compute
+ /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
+ /// For Microsoft.Network PublicIPAddresses.
+ ///
+ string ResourceName { get; set; }
+ ///
+ /// The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
+ /// This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then
+ /// it's the target Azure resource URI in the GET operation for the specific resource.
+ ///
+ string Scope { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.json.cs
new file mode 100644
index 000000000000..6e1b3b42c892
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaIdentity.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ public partial class QuotaIdentity
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity.
+ ///
+ /// a to deserialize from.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity.
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaIdentity(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaIdentity(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? (string)__jsonScope : (string)_scope;}
+ {_resourceName = If( json?.PropertyT("resourceName"), out var __jsonResourceName) ? (string)__jsonResourceName : (string)_resourceName;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;}
+ {_id1 = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id1;}
+ 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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._scope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._scope.ToString()) : null, "scope" ,container.Add );
+ AddIf( null != (((object)this._resourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._resourceName.ToString()) : null, "resourceName" ,container.Add );
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ AddIf( null != (((object)this._id1)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._id1.ToString()) : null, "id" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.PowerShell.cs
new file mode 100644
index 000000000000..aa8789a745e2
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota limits.
+ [System.ComponentModel.TypeConverter(typeof(QuotaLimitsTypeConverter))]
+ public partial class QuotaLimits
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaLimits DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaLimits(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.Quota.Models.IQuotaLimits DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaLimits(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.Quota.Models.IQuotaLimits FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaLimits(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.Quota.Models.IQuotaLimitsInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBaseTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ if (content.Contains("ETag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).ETag, 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 QuotaLimits(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.Quota.Models.IQuotaLimitsInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBaseTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ if (content.Contains("ETag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).ETag, 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.Quota.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 limits.
+ [System.ComponentModel.TypeConverter(typeof(QuotaLimitsTypeConverter))]
+ public partial interface IQuotaLimits
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.TypeConverter.cs
new file mode 100644
index 000000000000..cfe9c9ad864b
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaLimitsTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaLimits ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimits).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaLimits.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaLimits.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaLimits.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/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.cs
new file mode 100644
index 000000000000..6825adb4478b
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.cs
@@ -0,0 +1,107 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota limits.
+ public partial class QuotaLimits :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimits,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IHeaderSerializable
+ {
+
+ /// Backing field for property.
+ private string _eTag;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string ETag { get => this._eTag; set => this._eTag = value; }
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ ///
+ /// The URI used to fetch the next page of quota limits. When there are no more pages, this string is null.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private System.Collections.Generic.List _value;
+
+ /// List of quota limits.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public System.Collections.Generic.List Value { get => this._value; set => this._value = value; }
+
+ ///
+ void Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers)
+ {
+ if (headers.TryGetValues("ETag", out var __eTagHeader0))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null;
+ }
+ }
+
+ /// Creates an new instance.
+ public QuotaLimits()
+ {
+
+ }
+ }
+ /// Quota limits.
+ public partial interface IQuotaLimits :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"",
+ SerializedName = @"ETag",
+ PossibleTypes = new [] { typeof(string) })]
+ string ETag { get; set; }
+ ///
+ /// The URI used to fetch the next page of quota limits. When there are no more pages, this string is null.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The URI used to fetch the next page of quota limits. When there are no more pages, this string is null.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// List of quota limits.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"List of quota limits.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase) })]
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+ /// Quota limits.
+ internal partial interface IQuotaLimitsInternal
+
+ {
+ string ETag { get; set; }
+ ///
+ /// The URI used to fetch the next page of quota limits. When there are no more pages, this string is null.
+ ///
+ string NextLink { get; set; }
+ /// List of quota limits.
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.json.cs
new file mode 100644
index 000000000000..25e964f14ce9
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimits.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota limits.
+ public partial class QuotaLimits
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimits.
+ ///
+ /// a to deserialize from.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimits.
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimits FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaLimits(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaLimits(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase) (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBase.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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.PowerShell.cs
new file mode 100644
index 000000000000..a96070e80fde
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota limits request response.
+ [System.ComponentModel.TypeConverter(typeof(QuotaLimitsResponseTypeConverter))]
+ public partial class QuotaLimitsResponse
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaLimitsResponse DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaLimitsResponse(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.Quota.Models.IQuotaLimitsResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaLimitsResponse(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.Quota.Models.IQuotaLimitsResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaLimitsResponse(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.Quota.Models.IQuotaLimitsResponseInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBaseTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponseInternal)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 QuotaLimitsResponse(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.Quota.Models.IQuotaLimitsResponseInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBaseTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponseInternal)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.Quota.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 limits request response.
+ [System.ComponentModel.TypeConverter(typeof(QuotaLimitsResponseTypeConverter))]
+ public partial interface IQuotaLimitsResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.TypeConverter.cs
new file mode 100644
index 000000000000..73f1e2342900
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaLimitsResponseTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaLimitsResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaLimitsResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaLimitsResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaLimitsResponse.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/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.cs
new file mode 100644
index 000000000000..0682dcf4f0f2
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.cs
@@ -0,0 +1,80 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota limits request response.
+ public partial class QuotaLimitsResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponseInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ ///
+ /// The URI used to fetch the next page of quota limits. When there are no more pages, this is null.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private System.Collections.Generic.List _value;
+
+ /// List of quota limits with the quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public System.Collections.Generic.List Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public QuotaLimitsResponse()
+ {
+
+ }
+ }
+ /// Quota limits request response.
+ public partial interface IQuotaLimitsResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ ///
+ /// The URI used to fetch the next page of quota limits. When there are no more pages, this is null.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The URI used to fetch the next page of quota limits. When there are no more pages, this is null.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// List of quota limits with the quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"List of quota limits with the quota request status.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase) })]
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+ /// Quota limits request response.
+ internal partial interface IQuotaLimitsResponseInternal
+
+ {
+ ///
+ /// The URI used to fetch the next page of quota limits. When there are no more pages, this is null.
+ ///
+ string NextLink { get; set; }
+ /// List of quota limits with the quota request status.
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.json.cs
new file mode 100644
index 000000000000..841c9042bd47
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaLimitsResponse.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota limits request response.
+ public partial class QuotaLimitsResponse
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaLimitsResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaLimitsResponse(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaLimitsResponse(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ICurrentQuotaLimitBase) (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.CurrentQuotaLimitBase.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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.PowerShell.cs
new file mode 100644
index 000000000000..7871fe7afe75
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.PowerShell.cs
@@ -0,0 +1,228 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota properties for the specified resource.
+ [System.ComponentModel.TypeConverter(typeof(QuotaPropertiesTypeConverter))]
+ public partial class QuotaProperties
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaProperties(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.Quota.Models.IQuotaProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaProperties(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.Quota.Models.IQuotaProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitJsonObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsQuotaApplicable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).IsQuotaApplicable = (bool?) content.GetValueForProperty("IsQuotaApplicable",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).IsQuotaApplicable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).NameLocalizedValue, 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 QuotaProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitJsonObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsQuotaApplicable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).IsQuotaApplicable = (bool?) content.GetValueForProperty("IsQuotaApplicable",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).IsQuotaApplicable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal)this).NameLocalizedValue, 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.Quota.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 properties for the specified resource.
+ [System.ComponentModel.TypeConverter(typeof(QuotaPropertiesTypeConverter))]
+ public partial interface IQuotaProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.TypeConverter.cs
new file mode 100644
index 000000000000..84d828e82b36
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaPropertiesTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaProperties.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/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.cs
new file mode 100644
index 000000000000..f09e211b9593
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.cs
@@ -0,0 +1,247 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota properties for the specified resource.
+ public partial class QuotaProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private bool? _isQuotaApplicable;
+
+ /// States if quota can be requested for this resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public bool? IsQuotaApplicable { get => this._isQuotaApplicable; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject _limit;
+
+ /// Resource quota limit properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject Limit { get => (this._limit = this._limit ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitJsonObject()); set => this._limit = value; }
+
+ /// Internal Acessors for IsQuotaApplicable
+ bool? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal.IsQuotaApplicable { get => this._isQuotaApplicable; set { {_isQuotaApplicable = value;} } }
+
+ /// Internal Acessors for Name
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal.Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName()); set { {_name = value;} } }
+
+ /// Internal Acessors for NameLocalizedValue
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal.NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).LocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).LocalizedValue = value; }
+
+ /// Internal Acessors for QuotaPeriod
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal.QuotaPeriod { get => this._quotaPeriod; set { {_quotaPeriod = value;} } }
+
+ /// Internal Acessors for Unit
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaPropertiesInternal.Unit { get => this._unit; set { {_unit = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName _name;
+
+ ///
+ /// Resource name provided by the resource provider. Use this property name when requesting quota.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName()); set => this._name = value; }
+
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).LocalizedValue; }
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).Value = value ?? null; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny _property;
+
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.Any()); set => this._property = value; }
+
+ /// Backing field for property.
+ private string _quotaPeriod;
+
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string QuotaPeriod { get => this._quotaPeriod; }
+
+ /// Backing field for property.
+ private string _resourceType;
+
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string ResourceType { get => this._resourceType; set => this._resourceType = value; }
+
+ /// Backing field for property.
+ private string _unit;
+
+ ///
+ /// The quota units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in
+ /// the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Unit { get => this._unit; }
+
+ /// Creates an new instance.
+ public QuotaProperties()
+ {
+
+ }
+ }
+ /// Quota properties for the specified resource.
+ public partial interface IQuotaProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// States if quota can be requested for this resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"States if quota can be requested for this resource.",
+ SerializedName = @"isQuotaApplicable",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsQuotaApplicable { get; }
+ /// Resource quota limit properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource quota limit properties.",
+ SerializedName = @"limit",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject Limit { get; set; }
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource display name.",
+ SerializedName = @"localizedValue",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameLocalizedValue { get; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameValue { get; set; }
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Additional properties for the specific resource provider.",
+ SerializedName = @"properties",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny Property { get; set; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The time period over which the quota usage values are summarized. For example:
+ *P1D (per one day)
+ *PT1M (per one minute)
+ *PT1S (per one second).
+ This parameter is optional because, for some resources like compute, the period is irrelevant.",
+ SerializedName = @"quotaPeriod",
+ PossibleTypes = new [] { typeof(string) })]
+ string QuotaPeriod { get; }
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The name of the resource type. Optional field.",
+ SerializedName = @"resourceType",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceType { get; set; }
+ ///
+ /// The quota units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in
+ /// the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @" The quota units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in the request body of your PUT operation.",
+ SerializedName = @"unit",
+ PossibleTypes = new [] { typeof(string) })]
+ string Unit { get; }
+
+ }
+ /// Quota properties for the specified resource.
+ internal partial interface IQuotaPropertiesInternal
+
+ {
+ /// States if quota can be requested for this resource.
+ bool? IsQuotaApplicable { get; set; }
+ /// Resource quota limit properties.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObject Limit { get; set; }
+ ///
+ /// Resource name provided by the resource provider. Use this property name when requesting quota.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Name { get; set; }
+ /// Resource display name.
+ string NameLocalizedValue { get; set; }
+ /// Resource name.
+ string NameValue { get; set; }
+ /// Additional properties for the specific resource provider.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny Property { get; set; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ string QuotaPeriod { get; set; }
+ /// The name of the resource type. Optional field.
+ string ResourceType { get; set; }
+ ///
+ /// The quota units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in
+ /// the request body of your PUT operation.
+ ///
+ string Unit { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.json.cs
new file mode 100644
index 000000000000..52e5e3ffd861
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaProperties.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota properties for the specified resource.
+ public partial class QuotaProperties
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaProperties(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName.FromJson(__jsonName) : _name;}
+ {_limit = If( json?.PropertyT("limit"), out var __jsonLimit) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitJsonObject.FromJson(__jsonLimit) : _limit;}
+ {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)_unit;}
+ {_resourceType = If( json?.PropertyT("resourceType"), out var __jsonResourceType) ? (string)__jsonResourceType : (string)_resourceType;}
+ {_quotaPeriod = If( json?.PropertyT("quotaPeriod"), out var __jsonQuotaPeriod) ? (string)__jsonQuotaPeriod : (string)_quotaPeriod;}
+ {_isQuotaApplicable = If( json?.PropertyT("isQuotaApplicable"), out var __jsonIsQuotaApplicable) ? (bool?)__jsonIsQuotaApplicable : _isQuotaApplicable;}
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.Any.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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._name ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._name.ToJson(null,serializationMode) : null, "name" ,container.Add );
+ AddIf( null != this._limit ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._limit.ToJson(null,serializationMode) : null, "limit" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add );
+ }
+ AddIf( null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._quotaPeriod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._quotaPeriod.ToString()) : null, "quotaPeriod" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != this._isQuotaApplicable ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonBoolean((bool)this._isQuotaApplicable) : null, "isQuotaApplicable" ,container.Add );
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.PowerShell.cs
new file mode 100644
index 000000000000..1e7f55d8b17f
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.PowerShell.cs
@@ -0,0 +1,244 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// List of quota requests with details.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestDetailsTypeConverter))]
+ public partial class QuotaRequestDetails
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaRequestDetails DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaRequestDetails(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.Quota.Models.IQuotaRequestDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaRequestDetails(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.Quota.Models.IQuotaRequestDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaRequestDetails(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.Quota.Models.IQuotaRequestDetailsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequestSubmitTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).RequestSubmitTime = (global::System.DateTime?) content.GetValueForProperty("RequestSubmitTime",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).RequestSubmitTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.SubRequestTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("ErrorMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).ErrorMessage, 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 QuotaRequestDetails(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.Quota.Models.IQuotaRequestDetailsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequestSubmitTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).RequestSubmitTime = (global::System.DateTime?) content.GetValueForProperty("RequestSubmitTime",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).RequestSubmitTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.SubRequestTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("ErrorMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal)this).ErrorMessage, 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.Quota.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 requests with details.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestDetailsTypeConverter))]
+ public partial interface IQuotaRequestDetails
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.TypeConverter.cs
new file mode 100644
index 000000000000..8a11bd247978
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaRequestDetailsTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaRequestDetails ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaRequestDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaRequestDetails.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaRequestDetails.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.cs
new file mode 100644
index 000000000000..a7f2429a410e
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.cs
@@ -0,0 +1,260 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// List of quota requests with details.
+ public partial class QuotaRequestDetails :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal
+ {
+
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 3)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Code; }
+
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 2)]
+ public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ErrorMessage; }
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Quota request ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string Id { get => this._id; }
+
+ /// User-friendly status message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Code = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal.Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Error = value; }
+
+ /// Internal Acessors for ErrorMessage
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ErrorMessage = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Message = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ProvisioningState = value; }
+
+ /// Internal Acessors for RequestSubmitTime
+ global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal.RequestSubmitTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).RequestSubmitTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).RequestSubmitTime = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// Quota request name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 0)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties _property;
+
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestProperties()); set => this._property = value; }
+
+ /// The quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.FormatTable(Index = 1)]
+ public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ProvisioningState; }
+
+ ///
+ /// The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public global::System.DateTime? RequestSubmitTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).RequestSubmitTime; }
+
+ /// Gets the resource group name
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// Resource type. "Microsoft.Quota/quotas".
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public string Type { get => this._type; }
+
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.DoNotFormat]
+ public System.Collections.Generic.List Value { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Value = value ?? null /* arrayOf */; }
+
+ /// Creates an new instance.
+ public QuotaRequestDetails()
+ {
+
+ }
+ }
+ /// List of quota requests with details.
+ public partial interface IQuotaRequestDetails :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string ErrorMessage { get; }
+ /// Quota request ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request ID.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// User-friendly status message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"User-friendly status message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// Quota request name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request name.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// The quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The quota request status.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; }
+ ///
+ /// The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ",
+ SerializedName = @"requestSubmitTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RequestSubmitTime { get; }
+ /// Resource type. "Microsoft.Quota/quotas".
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource type. ""Microsoft.Quota/quotas"".",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Quota request details.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ISubRequest) })]
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+ /// List of quota requests with details.
+ internal partial interface IQuotaRequestDetailsInternal
+
+ {
+ /// Error code.
+ string Code { get; set; }
+ /// Error details of the quota request.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Error { get; set; }
+ /// Error message.
+ string ErrorMessage { get; set; }
+ /// Quota request ID.
+ string Id { get; set; }
+ /// User-friendly status message.
+ string Message { get; set; }
+ /// Quota request name.
+ string Name { get; set; }
+ /// Quota request details.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties Property { get; set; }
+ /// The quota request status.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; set; }
+ ///
+ /// The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
+ ///
+ global::System.DateTime? RequestSubmitTime { get; set; }
+ /// Resource type. "Microsoft.Quota/quotas".
+ string Type { get; set; }
+ /// Quota request details.
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.json.cs
new file mode 100644
index 000000000000..e270fd9f449c
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetails.json.cs
@@ -0,0 +1,123 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// List of quota requests with details.
+ public partial class QuotaRequestDetails
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaRequestDetails(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaRequestDetails(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestProperties.FromJson(__jsonProperties) : _property;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;}
+ 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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.PowerShell.cs
new file mode 100644
index 000000000000..06b2de827728
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota request information.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestDetailsListTypeConverter))]
+ public partial class QuotaRequestDetailsList
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaRequestDetailsList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaRequestDetailsList(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.Quota.Models.IQuotaRequestDetailsList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaRequestDetailsList(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.Quota.Models.IQuotaRequestDetailsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaRequestDetailsList(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.Quota.Models.IQuotaRequestDetailsListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestDetailsTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsListInternal)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 QuotaRequestDetailsList(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.Quota.Models.IQuotaRequestDetailsListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestDetailsTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsListInternal)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.Quota.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 request information.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestDetailsListTypeConverter))]
+ public partial interface IQuotaRequestDetailsList
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.TypeConverter.cs
new file mode 100644
index 000000000000..90174dfdaedf
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaRequestDetailsListTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaRequestDetailsList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsList).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaRequestDetailsList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaRequestDetailsList.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaRequestDetailsList.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.cs
new file mode 100644
index 000000000000..8c627bc87119
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.cs
@@ -0,0 +1,80 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request information.
+ public partial class QuotaRequestDetailsList :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsList,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsListInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ ///
+ /// The URI for fetching the next page of quota limits. When there are no more pages, this string is null.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private System.Collections.Generic.List _value;
+
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public System.Collections.Generic.List Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public QuotaRequestDetailsList()
+ {
+
+ }
+ }
+ /// Quota request information.
+ public partial interface IQuotaRequestDetailsList :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ ///
+ /// The URI for fetching the next page of quota limits. When there are no more pages, this string is null.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The URI for fetching the next page of quota limits. When there are no more pages, this string is null.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Quota request details.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails) })]
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+ /// Quota request information.
+ internal partial interface IQuotaRequestDetailsListInternal
+
+ {
+ ///
+ /// The URI for fetching the next page of quota limits. When there are no more pages, this string is null.
+ ///
+ string NextLink { get; set; }
+ /// Quota request details.
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.json.cs
new file mode 100644
index 000000000000..82e226eb535e
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestDetailsList.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request information.
+ public partial class QuotaRequestDetailsList
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsList.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsList.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetailsList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaRequestDetailsList(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaRequestDetailsList(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestDetails) (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestDetails.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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.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.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.PowerShell.cs
new file mode 100644
index 000000000000..39a1d9b1347c
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.PowerShell.cs
@@ -0,0 +1,310 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota request.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestOneResourcePropertiesTypeConverter))]
+ public partial class QuotaRequestOneResourceProperties
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaRequestOneResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaRequestOneResourceProperties(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.Quota.Models.IQuotaRequestOneResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaRequestOneResourceProperties(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.Quota.Models.IQuotaRequestOneResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaRequestOneResourceProperties(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.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequestSubmitTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).RequestSubmitTime = (global::System.DateTime?) content.GetValueForProperty("RequestSubmitTime",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).RequestSubmitTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("CurrentValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).CurrentValue = (int?) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).CurrentValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsQuotaApplicable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).IsQuotaApplicable = (bool?) content.GetValueForProperty("IsQuotaApplicable",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).IsQuotaApplicable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("LimitObjectType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitObjectType = (string) content.GetValueForProperty("LimitObjectType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitObjectType, global::System.Convert.ToString);
+ }
+ if (content.Contains("LimitValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitValue = (int) content.GetValueForProperty("LimitValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("LimitType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitType = (string) content.GetValueForProperty("LimitType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitType, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).NameLocalizedValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("ErrorMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ErrorMessage, 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 QuotaRequestOneResourceProperties(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.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequestSubmitTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).RequestSubmitTime = (global::System.DateTime?) content.GetValueForProperty("RequestSubmitTime",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).RequestSubmitTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("CurrentValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).CurrentValue = (int?) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).CurrentValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsQuotaApplicable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).IsQuotaApplicable = (bool?) content.GetValueForProperty("IsQuotaApplicable",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).IsQuotaApplicable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("LimitObjectType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitObjectType = (string) content.GetValueForProperty("LimitObjectType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitObjectType, global::System.Convert.ToString);
+ }
+ if (content.Contains("LimitValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitValue = (int) content.GetValueForProperty("LimitValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("LimitType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitType = (string) content.GetValueForProperty("LimitType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).LimitType, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).NameLocalizedValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("ErrorMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)this).ErrorMessage, 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.Quota.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 request.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestOneResourcePropertiesTypeConverter))]
+ public partial interface IQuotaRequestOneResourceProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.TypeConverter.cs
new file mode 100644
index 000000000000..4d8ba9a22121
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaRequestOneResourcePropertiesTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaRequestOneResourceProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaRequestOneResourceProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaRequestOneResourceProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaRequestOneResourceProperties.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.cs
new file mode 100644
index 000000000000..61c4a18d02c0
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.cs
@@ -0,0 +1,444 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request.
+ public partial class QuotaRequestOneResourceProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal
+ {
+
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Code; }
+
+ /// Backing field for property.
+ private int? _currentValue;
+
+ /// Usage information for the current resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public int? CurrentValue { get => this._currentValue; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail _error;
+
+ /// Error details of the quota request.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetail()); set => this._error = value; }
+
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Message; }
+
+ /// Backing field for property.
+ private bool? _isQuotaApplicable;
+
+ /// States if quota can be requested for this resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public bool? IsQuotaApplicable { get => this._isQuotaApplicable; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject _limit;
+
+ /// Resource quota limit properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject Limit { get => (this._limit = this._limit ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject()); set => this._limit = value; }
+
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string LimitObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)Limit).Type; }
+
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string LimitType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)Limit).LimitType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)Limit).LimitType = value ?? null; }
+
+ /// The quota/limit value
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public int? LimitValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)Limit).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)Limit).Value = value ?? default(int); }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// User-friendly status message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Message { get => this._message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Code = value; }
+
+ /// Internal Acessors for CurrentValue
+ int? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.CurrentValue { get => this._currentValue; set { {_currentValue = value;} } }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetail()); set { {_error = value;} } }
+
+ /// Internal Acessors for ErrorMessage
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Message = value; }
+
+ /// Internal Acessors for IsQuotaApplicable
+ bool? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.IsQuotaApplicable { get => this._isQuotaApplicable; set { {_isQuotaApplicable = value;} } }
+
+ /// Internal Acessors for Limit
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.Limit { get => (this._limit = this._limit ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject()); set { {_limit = value;} } }
+
+ /// Internal Acessors for LimitObjectType
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.LimitObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)Limit).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)Limit).Type = value; }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.Message { get => this._message; set { {_message = value;} } }
+
+ /// Internal Acessors for Name
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName()); set { {_name = value;} } }
+
+ /// Internal Acessors for NameLocalizedValue
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).LocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).LocalizedValue = value; }
+
+ /// Internal Acessors for ProvisioningState
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } }
+
+ /// Internal Acessors for QuotaPeriod
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.QuotaPeriod { get => this._quotaPeriod; set { {_quotaPeriod = value;} } }
+
+ /// Internal Acessors for RequestSubmitTime
+ global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal.RequestSubmitTime { get => this._requestSubmitTime; set { {_requestSubmitTime = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName _name;
+
+ ///
+ /// Resource name provided by the resource provider. Use this property name when requesting quota.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName()); set => this._name = value; }
+
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).LocalizedValue; }
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).Value = value ?? null; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny _property;
+
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.Any()); set => this._property = value; }
+
+ /// Backing field for property.
+ private string _provisioningState;
+
+ /// Quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string ProvisioningState { get => this._provisioningState; }
+
+ /// Backing field for property.
+ private string _quotaPeriod;
+
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string QuotaPeriod { get => this._quotaPeriod; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _requestSubmitTime;
+
+ ///
+ /// Quota request submission time. The date conforms to the following ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public global::System.DateTime? RequestSubmitTime { get => this._requestSubmitTime; }
+
+ /// Backing field for property.
+ private string _resourceType;
+
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string ResourceType { get => this._resourceType; set => this._resourceType = value; }
+
+ /// Backing field for property.
+ private string _unit;
+
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Unit { get => this._unit; set => this._unit = value; }
+
+ /// Creates an new instance.
+ public QuotaRequestOneResourceProperties()
+ {
+
+ }
+ }
+ /// Quota request.
+ public partial interface IQuotaRequestOneResourceProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// Usage information for the current resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Usage information for the current resource.",
+ SerializedName = @"currentValue",
+ PossibleTypes = new [] { typeof(int) })]
+ int? CurrentValue { get; }
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string ErrorMessage { get; }
+ /// States if quota can be requested for this resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"States if quota can be requested for this resource.",
+ SerializedName = @"isQuotaApplicable",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsQuotaApplicable { get; }
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The limit object type.",
+ SerializedName = @"limitObjectType",
+ PossibleTypes = new [] { typeof(string) })]
+ string LimitObjectType { get; }
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota or usages limit types.",
+ SerializedName = @"limitType",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ string LimitType { get; set; }
+ /// The quota/limit value
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota/limit value",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(int) })]
+ int? LimitValue { get; set; }
+ /// User-friendly status message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"User-friendly status message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource display name.",
+ SerializedName = @"localizedValue",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameLocalizedValue { get; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameValue { get; set; }
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Additional properties for the specific resource provider.",
+ SerializedName = @"properties",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny Property { get; set; }
+ /// Quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request status.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The time period over which the quota usage values are summarized. For example:
+ *P1D (per one day)
+ *PT1M (per one minute)
+ *PT1S (per one second).
+ This parameter is optional because, for some resources like compute, the period is irrelevant.",
+ SerializedName = @"quotaPeriod",
+ PossibleTypes = new [] { typeof(string) })]
+ string QuotaPeriod { get; }
+ ///
+ /// Quota request submission time. The date conforms to the following ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request submission time. The date conforms to the following ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ.",
+ SerializedName = @"requestSubmitTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RequestSubmitTime { get; }
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The name of the resource type. Optional field.",
+ SerializedName = @"resourceType",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceType { get; set; }
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @" The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in the request body of your PUT operation.",
+ SerializedName = @"unit",
+ PossibleTypes = new [] { typeof(string) })]
+ string Unit { get; set; }
+
+ }
+ /// Quota request.
+ internal partial interface IQuotaRequestOneResourcePropertiesInternal
+
+ {
+ /// Error code.
+ string Code { get; set; }
+ /// Usage information for the current resource.
+ int? CurrentValue { get; set; }
+ /// Error details of the quota request.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Error { get; set; }
+ /// Error message.
+ string ErrorMessage { get; set; }
+ /// States if quota can be requested for this resource.
+ bool? IsQuotaApplicable { get; set; }
+ /// Resource quota limit properties.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject Limit { get; set; }
+ /// The limit object type.
+ string LimitObjectType { get; set; }
+ /// The quota or usages limit types.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ string LimitType { get; set; }
+ /// The quota/limit value
+ int? LimitValue { get; set; }
+ /// User-friendly status message.
+ string Message { get; set; }
+ ///
+ /// Resource name provided by the resource provider. Use this property name when requesting quota.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Name { get; set; }
+ /// Resource display name.
+ string NameLocalizedValue { get; set; }
+ /// Resource name.
+ string NameValue { get; set; }
+ /// Additional properties for the specific resource provider.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny Property { get; set; }
+ /// Quota request status.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; set; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ string QuotaPeriod { get; set; }
+ ///
+ /// Quota request submission time. The date conforms to the following ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ.
+ ///
+ global::System.DateTime? RequestSubmitTime { get; set; }
+ /// The name of the resource type. Optional field.
+ string ResourceType { get; set; }
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ string Unit { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.json.cs
new file mode 100644
index 000000000000..3143ce2e8755
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceProperties.json.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request.
+ public partial class QuotaRequestOneResourceProperties
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaRequestOneResourceProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaRequestOneResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_limit = If( json?.PropertyT("limit"), out var __jsonLimit) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject.FromJson(__jsonLimit) : _limit;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName.FromJson(__jsonName) : _name;}
+ {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetail.FromJson(__jsonError) : _error;}
+ {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;}
+ {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;}
+ {_requestSubmitTime = If( json?.PropertyT("requestSubmitTime"), out var __jsonRequestSubmitTime) ? global::System.DateTime.TryParse((string)__jsonRequestSubmitTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRequestSubmitTimeValue) ? __jsonRequestSubmitTimeValue : _requestSubmitTime : _requestSubmitTime;}
+ {_currentValue = If( json?.PropertyT("currentValue"), out var __jsonCurrentValue) ? (int?)__jsonCurrentValue : _currentValue;}
+ {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)_unit;}
+ {_resourceType = If( json?.PropertyT("resourceType"), out var __jsonResourceType) ? (string)__jsonResourceType : (string)_resourceType;}
+ {_quotaPeriod = If( json?.PropertyT("quotaPeriod"), out var __jsonQuotaPeriod) ? (string)__jsonQuotaPeriod : (string)_quotaPeriod;}
+ {_isQuotaApplicable = If( json?.PropertyT("isQuotaApplicable"), out var __jsonIsQuotaApplicable) ? (bool?)__jsonIsQuotaApplicable : _isQuotaApplicable;}
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.Any.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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._limit ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._limit.ToJson(null,serializationMode) : null, "limit" ,container.Add );
+ AddIf( null != this._name ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._name.ToJson(null,serializationMode) : null, "name" ,container.Add );
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != this._requestSubmitTime ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._requestSubmitTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "requestSubmitTime" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != this._currentValue ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNumber((int)this._currentValue) : null, "currentValue" ,container.Add );
+ }
+ AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add );
+ AddIf( null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._quotaPeriod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._quotaPeriod.ToString()) : null, "quotaPeriod" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != this._isQuotaApplicable ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonBoolean((bool)this._isQuotaApplicable) : null, "isQuotaApplicable" ,container.Add );
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.PowerShell.cs
new file mode 100644
index 000000000000..0bc90ad652b6
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.PowerShell.cs
@@ -0,0 +1,343 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota request response.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestOneResourceSubmitResponseTypeConverter))]
+ public partial class QuotaRequestOneResourceSubmitResponse
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaRequestOneResourceSubmitResponse DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaRequestOneResourceSubmitResponse(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.Quota.Models.IQuotaRequestOneResourceSubmitResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaRequestOneResourceSubmitResponse(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.Quota.Models.IQuotaRequestOneResourceSubmitResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaRequestOneResourceSubmitResponse(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.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestOneResourcePropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("AnyProperty"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).AnyProperty = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("AnyProperty",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).AnyProperty, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("PropertiesName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).PropertiesName = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).PropertiesName, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequestSubmitTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).RequestSubmitTime = (global::System.DateTime?) content.GetValueForProperty("RequestSubmitTime",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).RequestSubmitTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("CurrentValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).CurrentValue = (int?) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).CurrentValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsQuotaApplicable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).IsQuotaApplicable = (bool?) content.GetValueForProperty("IsQuotaApplicable",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).IsQuotaApplicable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("LimitObjectType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitObjectType = (string) content.GetValueForProperty("LimitObjectType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitObjectType, global::System.Convert.ToString);
+ }
+ if (content.Contains("LimitValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitValue = (int) content.GetValueForProperty("LimitValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("LimitType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitType = (string) content.GetValueForProperty("LimitType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitType, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).NameLocalizedValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("ErrorMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ErrorMessage, 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 QuotaRequestOneResourceSubmitResponse(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.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestOneResourcePropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("AnyProperty"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).AnyProperty = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("AnyProperty",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).AnyProperty, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("PropertiesName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).PropertiesName = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).PropertiesName, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequestSubmitTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).RequestSubmitTime = (global::System.DateTime?) content.GetValueForProperty("RequestSubmitTime",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).RequestSubmitTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("CurrentValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).CurrentValue = (int?) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).CurrentValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsQuotaApplicable"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).IsQuotaApplicable = (bool?) content.GetValueForProperty("IsQuotaApplicable",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).IsQuotaApplicable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("LimitObjectType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitObjectType = (string) content.GetValueForProperty("LimitObjectType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitObjectType, global::System.Convert.ToString);
+ }
+ if (content.Contains("LimitValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitValue = (int) content.GetValueForProperty("LimitValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("LimitType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitType = (string) content.GetValueForProperty("LimitType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).LimitType, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).NameLocalizedValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("ErrorMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal)this).ErrorMessage, 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.Quota.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 request response.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestOneResourceSubmitResponseTypeConverter))]
+ public partial interface IQuotaRequestOneResourceSubmitResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.TypeConverter.cs
new file mode 100644
index 000000000000..75332b0d883b
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaRequestOneResourceSubmitResponseTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaRequestOneResourceSubmitResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaRequestOneResourceSubmitResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaRequestOneResourceSubmitResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaRequestOneResourceSubmitResponse.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.cs
new file mode 100644
index 000000000000..9f70b973a30e
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.cs
@@ -0,0 +1,475 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request response.
+ public partial class QuotaRequestOneResourceSubmitResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal
+ {
+
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Property = value ?? null /* model class */; }
+
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Code; }
+
+ /// Usage information for the current resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public int? CurrentValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).CurrentValue; }
+
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).ErrorMessage; }
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Quota request ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// States if quota can be requested for this resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public bool? IsQuotaApplicable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).IsQuotaApplicable; }
+
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string LimitObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).LimitObjectType; }
+
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string LimitType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).LimitType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).LimitType = value ?? null; }
+
+ /// The quota/limit value
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public int? LimitValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).LimitValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).LimitValue = value ?? default(int); }
+
+ /// User-friendly status message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Code = value; }
+
+ /// Internal Acessors for CurrentValue
+ int? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.CurrentValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).CurrentValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).CurrentValue = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Error = value; }
+
+ /// Internal Acessors for ErrorMessage
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).ErrorMessage = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for IsQuotaApplicable
+ bool? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.IsQuotaApplicable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).IsQuotaApplicable; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).IsQuotaApplicable = value; }
+
+ /// Internal Acessors for Limit
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.Limit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Limit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Limit = value; }
+
+ /// Internal Acessors for LimitObjectType
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.LimitObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).LimitObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).LimitObjectType = value; }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Message = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for NameLocalizedValue
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).NameLocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).NameLocalizedValue = value; }
+
+ /// Internal Acessors for PropertiesName
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.PropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Name = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestOneResourceProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).ProvisioningState = value; }
+
+ /// Internal Acessors for QuotaPeriod
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.QuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).QuotaPeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).QuotaPeriod = value; }
+
+ /// Internal Acessors for RequestSubmitTime
+ global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.RequestSubmitTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).RequestSubmitTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).RequestSubmitTime = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponseInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The name of the quota request.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).NameLocalizedValue; }
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).NameValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).NameValue = value ?? null; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties _property;
+
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestOneResourceProperties()); set => this._property = value; }
+
+ /// Quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).ProvisioningState; }
+
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string QuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).QuotaPeriod; }
+
+ ///
+ /// Quota request submission time. The date conforms to the following ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public global::System.DateTime? RequestSubmitTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).RequestSubmitTime; }
+
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).ResourceType = value ?? null; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// Resource type. "Microsoft.Quota/ServiceLimitRequests"
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Unit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Unit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourcePropertiesInternal)Property).Unit = value ?? null; }
+
+ /// Creates an new instance.
+ public QuotaRequestOneResourceSubmitResponse()
+ {
+
+ }
+ }
+ /// Quota request response.
+ public partial interface IQuotaRequestOneResourceSubmitResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Additional properties for the specific resource provider.",
+ SerializedName = @"properties",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get; set; }
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// Usage information for the current resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Usage information for the current resource.",
+ SerializedName = @"currentValue",
+ PossibleTypes = new [] { typeof(int) })]
+ int? CurrentValue { get; }
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string ErrorMessage { get; }
+ /// Quota request ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request ID.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// States if quota can be requested for this resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"States if quota can be requested for this resource.",
+ SerializedName = @"isQuotaApplicable",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsQuotaApplicable { get; }
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The limit object type.",
+ SerializedName = @"limitObjectType",
+ PossibleTypes = new [] { typeof(string) })]
+ string LimitObjectType { get; }
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota or usages limit types.",
+ SerializedName = @"limitType",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ string LimitType { get; set; }
+ /// The quota/limit value
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota/limit value",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(int) })]
+ int? LimitValue { get; set; }
+ /// User-friendly status message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"User-friendly status message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// The name of the quota request.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The name of the quota request.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource display name.",
+ SerializedName = @"localizedValue",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameLocalizedValue { get; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameValue { get; set; }
+ /// Quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request status.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The time period over which the quota usage values are summarized. For example:
+ *P1D (per one day)
+ *PT1M (per one minute)
+ *PT1S (per one second).
+ This parameter is optional because, for some resources like compute, the period is irrelevant.",
+ SerializedName = @"quotaPeriod",
+ PossibleTypes = new [] { typeof(string) })]
+ string QuotaPeriod { get; }
+ ///
+ /// Quota request submission time. The date conforms to the following ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request submission time. The date conforms to the following ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ.",
+ SerializedName = @"requestSubmitTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RequestSubmitTime { get; }
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The name of the resource type. Optional field.",
+ SerializedName = @"resourceType",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceType { get; set; }
+ /// Resource type. "Microsoft.Quota/ServiceLimitRequests"
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource type. ""Microsoft.Quota/ServiceLimitRequests""",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @" The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in the request body of your PUT operation.",
+ SerializedName = @"unit",
+ PossibleTypes = new [] { typeof(string) })]
+ string Unit { get; set; }
+
+ }
+ /// Quota request response.
+ internal partial interface IQuotaRequestOneResourceSubmitResponseInternal
+
+ {
+ /// Additional properties for the specific resource provider.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get; set; }
+ /// Error code.
+ string Code { get; set; }
+ /// Usage information for the current resource.
+ int? CurrentValue { get; set; }
+ /// Error details of the quota request.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Error { get; set; }
+ /// Error message.
+ string ErrorMessage { get; set; }
+ /// Quota request ID.
+ string Id { get; set; }
+ /// States if quota can be requested for this resource.
+ bool? IsQuotaApplicable { get; set; }
+ /// Resource quota limit properties.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject Limit { get; set; }
+ /// The limit object type.
+ string LimitObjectType { get; set; }
+ /// The quota or usages limit types.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ string LimitType { get; set; }
+ /// The quota/limit value
+ int? LimitValue { get; set; }
+ /// User-friendly status message.
+ string Message { get; set; }
+ /// The name of the quota request.
+ string Name { get; set; }
+ /// Resource display name.
+ string NameLocalizedValue { get; set; }
+ /// Resource name.
+ string NameValue { get; set; }
+ ///
+ /// Resource name provided by the resource provider. Use this property name when requesting quota.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName PropertiesName { get; set; }
+ /// Quota request details.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceProperties Property { get; set; }
+ /// Quota request status.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; set; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ string QuotaPeriod { get; set; }
+ ///
+ /// Quota request submission time. The date conforms to the following ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ.
+ ///
+ global::System.DateTime? RequestSubmitTime { get; set; }
+ /// The name of the resource type. Optional field.
+ string ResourceType { get; set; }
+ /// Resource type. "Microsoft.Quota/ServiceLimitRequests"
+ string Type { get; set; }
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ string Unit { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.json.cs
new file mode 100644
index 000000000000..5a583e0c46c1
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestOneResourceSubmitResponse.json.cs
@@ -0,0 +1,124 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request response.
+ public partial class QuotaRequestOneResourceSubmitResponse
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestOneResourceSubmitResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaRequestOneResourceSubmitResponse(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaRequestOneResourceSubmitResponse(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestOneResourceProperties.FromJson(__jsonProperties) : _property;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;}
+ 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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.PowerShell.cs
new file mode 100644
index 000000000000..a6edeef17c43
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota request properties.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestPropertiesTypeConverter))]
+ public partial class QuotaRequestProperties
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaRequestProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaRequestProperties(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.Quota.Models.IQuotaRequestProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaRequestProperties(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.Quota.Models.IQuotaRequestProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaRequestProperties(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.Quota.Models.IQuotaRequestPropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequestSubmitTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).RequestSubmitTime = (global::System.DateTime?) content.GetValueForProperty("RequestSubmitTime",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).RequestSubmitTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.SubRequestTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("ErrorMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).ErrorMessage, 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 QuotaRequestProperties(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.Quota.Models.IQuotaRequestPropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequestSubmitTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).RequestSubmitTime = (global::System.DateTime?) content.GetValueForProperty("RequestSubmitTime",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).RequestSubmitTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.SubRequestTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("ErrorMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)this).ErrorMessage, 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.Quota.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 request properties.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestPropertiesTypeConverter))]
+ public partial interface IQuotaRequestProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.TypeConverter.cs
new file mode 100644
index 000000000000..64ca1f628d44
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaRequestPropertiesTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaRequestProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaRequestProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaRequestProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaRequestProperties.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.cs
new file mode 100644
index 000000000000..8477fa1ba6cc
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.cs
@@ -0,0 +1,183 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request properties.
+ public partial class QuotaRequestProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal
+ {
+
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Code; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail _error;
+
+ /// Error details of the quota request.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetail()); set => this._error = value; }
+
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Message; }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// User-friendly status message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Message { get => this._message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Code = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetail()); set { {_error = value;} } }
+
+ /// Internal Acessors for ErrorMessage
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetailInternal)Error).Message = value; }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal.Message { get => this._message; set { {_message = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } }
+
+ /// Internal Acessors for RequestSubmitTime
+ global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal.RequestSubmitTime { get => this._requestSubmitTime; set { {_requestSubmitTime = value;} } }
+
+ /// Backing field for property.
+ private string _provisioningState;
+
+ /// The quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string ProvisioningState { get => this._provisioningState; }
+
+ /// Backing field for property.
+ private global::System.DateTime? _requestSubmitTime;
+
+ ///
+ /// The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public global::System.DateTime? RequestSubmitTime { get => this._requestSubmitTime; }
+
+ /// Backing field for property.
+ private System.Collections.Generic.List _value;
+
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public System.Collections.Generic.List Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public QuotaRequestProperties()
+ {
+
+ }
+ }
+ /// Quota request properties.
+ public partial interface IQuotaRequestProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string ErrorMessage { get; }
+ /// User-friendly status message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"User-friendly status message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// The quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The quota request status.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; }
+ ///
+ /// The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ",
+ SerializedName = @"requestSubmitTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RequestSubmitTime { get; }
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Quota request details.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ISubRequest) })]
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+ /// Quota request properties.
+ internal partial interface IQuotaRequestPropertiesInternal
+
+ {
+ /// Error code.
+ string Code { get; set; }
+ /// Error details of the quota request.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Error { get; set; }
+ /// Error message.
+ string ErrorMessage { get; set; }
+ /// User-friendly status message.
+ string Message { get; set; }
+ /// The quota request status.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; set; }
+ ///
+ /// The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
+ ///
+ global::System.DateTime? RequestSubmitTime { get; set; }
+ /// Quota request details.
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.json.cs
new file mode 100644
index 000000000000..996ddcd6ae04
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestProperties.json.cs
@@ -0,0 +1,133 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request properties.
+ public partial class QuotaRequestProperties
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaRequestProperties(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaRequestProperties(Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.ServiceErrorDetail.FromJson(__jsonError) : _error;}
+ {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;}
+ {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;}
+ {_requestSubmitTime = If( json?.PropertyT("requestSubmitTime"), out var __jsonRequestSubmitTime) ? global::System.DateTime.TryParse((string)__jsonRequestSubmitTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRequestSubmitTimeValue) ? __jsonRequestSubmitTimeValue : _requestSubmitTime : _requestSubmitTime;}
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ISubRequest) (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.SubRequest.FromJson(__u) )) ))() : null : _value;}
+ 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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != this._requestSubmitTime ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._requestSubmitTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "requestSubmitTime" ,container.Add );
+ }
+ if (null != this._value)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.PowerShell.cs
new file mode 100644
index 000000000000..491367f19ccb
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.PowerShell.cs
@@ -0,0 +1,260 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota request status details.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestStatusDetailsTypeConverter))]
+ public partial class QuotaRequestStatusDetails
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaRequestStatusDetails DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaRequestStatusDetails(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.Quota.Models.IQuotaRequestStatusDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaRequestStatusDetails(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.Quota.Models.IQuotaRequestStatusDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaRequestStatusDetails(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.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("LimitObjectType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitObjectType = (string) content.GetValueForProperty("LimitObjectType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitObjectType, global::System.Convert.ToString);
+ }
+ if (content.Contains("LimitValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitValue = (int) content.GetValueForProperty("LimitValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("LimitType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitType = (string) content.GetValueForProperty("LimitType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitType, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).NameLocalizedValue, 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 QuotaRequestStatusDetails(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.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("LimitObjectType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitObjectType = (string) content.GetValueForProperty("LimitObjectType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitObjectType, global::System.Convert.ToString);
+ }
+ if (content.Contains("LimitValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitValue = (int) content.GetValueForProperty("LimitValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("LimitType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitType = (string) content.GetValueForProperty("LimitType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).LimitType, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)this).NameLocalizedValue, 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.Quota.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 request status details.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestStatusDetailsTypeConverter))]
+ public partial interface IQuotaRequestStatusDetails
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.TypeConverter.cs
new file mode 100644
index 000000000000..951caabcf11c
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaRequestStatusDetailsTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaRequestStatusDetails ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaRequestStatusDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaRequestStatusDetails.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaRequestStatusDetails.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.cs
new file mode 100644
index 000000000000..6b8ff790a641
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.cs
@@ -0,0 +1,317 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request status details.
+ public partial class QuotaRequestStatusDetails :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject _limit;
+
+ /// Resource quota limit properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject Limit { get => (this._limit = this._limit ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject()); set => this._limit = value; }
+
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string LimitObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)Limit).Type; }
+
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string LimitType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)Limit).LimitType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)Limit).LimitType = value ?? null; }
+
+ /// The quota/limit value
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public int? LimitValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)Limit).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObjectInternal)Limit).Value = value ?? default(int); }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// User-friendly message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Message { get => this._message; }
+
+ /// Internal Acessors for Limit
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal.Limit { get => (this._limit = this._limit ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject()); set { {_limit = value;} } }
+
+ /// Internal Acessors for LimitObjectType
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal.LimitObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)Limit).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitJsonObjectInternal)Limit).Type = value; }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal.Message { get => this._message; set { {_message = value;} } }
+
+ /// Internal Acessors for Name
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal.Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName()); set { {_name = value;} } }
+
+ /// Internal Acessors for NameLocalizedValue
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal.NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).LocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).LocalizedValue = value; }
+
+ /// Internal Acessors for ProvisioningState
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } }
+
+ /// Internal Acessors for QuotaPeriod
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal.QuotaPeriod { get => this._quotaPeriod; set { {_quotaPeriod = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName _name;
+
+ ///
+ /// Resource name provided by the resource provider. Use this property name when requesting quota.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName()); set => this._name = value; }
+
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).LocalizedValue; }
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)Name).Value = value ?? null; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny _property;
+
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.Any()); set => this._property = value; }
+
+ /// Backing field for property.
+ private string _provisioningState;
+
+ /// Quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string ProvisioningState { get => this._provisioningState; }
+
+ /// Backing field for property.
+ private string _quotaPeriod;
+
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string QuotaPeriod { get => this._quotaPeriod; }
+
+ /// Backing field for property.
+ private string _resourceType;
+
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string ResourceType { get => this._resourceType; set => this._resourceType = value; }
+
+ /// Backing field for property.
+ private string _unit;
+
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Unit { get => this._unit; set => this._unit = value; }
+
+ /// Creates an new instance.
+ public QuotaRequestStatusDetails()
+ {
+
+ }
+ }
+ /// Quota request status details.
+ public partial interface IQuotaRequestStatusDetails :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The limit object type.",
+ SerializedName = @"limitObjectType",
+ PossibleTypes = new [] { typeof(string) })]
+ string LimitObjectType { get; }
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota or usages limit types.",
+ SerializedName = @"limitType",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ string LimitType { get; set; }
+ /// The quota/limit value
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota/limit value",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(int) })]
+ int? LimitValue { get; set; }
+ /// User-friendly message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"User-friendly message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource display name.",
+ SerializedName = @"localizedValue",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameLocalizedValue { get; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameValue { get; set; }
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Additional properties for the specific resource provider.",
+ SerializedName = @"properties",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny Property { get; set; }
+ /// Quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request status.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The time period over which the quota usage values are summarized. For example:
+ *P1D (per one day)
+ *PT1M (per one minute)
+ *PT1S (per one second).
+ This parameter is optional because, for some resources like compute, the period is irrelevant.",
+ SerializedName = @"quotaPeriod",
+ PossibleTypes = new [] { typeof(string) })]
+ string QuotaPeriod { get; }
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The name of the resource type. Optional field.",
+ SerializedName = @"resourceType",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceType { get; set; }
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @" The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in the request body of your PUT operation.",
+ SerializedName = @"unit",
+ PossibleTypes = new [] { typeof(string) })]
+ string Unit { get; set; }
+
+ }
+ /// Quota request status details.
+ internal partial interface IQuotaRequestStatusDetailsInternal
+
+ {
+ /// Resource quota limit properties.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject Limit { get; set; }
+ /// The limit object type.
+ string LimitObjectType { get; set; }
+ /// The quota or usages limit types.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ string LimitType { get; set; }
+ /// The quota/limit value
+ int? LimitValue { get; set; }
+ /// User-friendly message.
+ string Message { get; set; }
+ ///
+ /// Resource name provided by the resource provider. Use this property name when requesting quota.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Name { get; set; }
+ /// Resource display name.
+ string NameLocalizedValue { get; set; }
+ /// Resource name.
+ string NameValue { get; set; }
+ /// Additional properties for the specific resource provider.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny Property { get; set; }
+ /// Quota request status.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; set; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ string QuotaPeriod { get; set; }
+ /// The name of the resource type. Optional field.
+ string ResourceType { get; set; }
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ string Unit { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.json.cs
new file mode 100644
index 000000000000..6c71d0ff0744
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestStatusDetails.json.cs
@@ -0,0 +1,131 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request status details.
+ public partial class QuotaRequestStatusDetails
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaRequestStatusDetails(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaRequestStatusDetails(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_limit = If( json?.PropertyT("limit"), out var __jsonLimit) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObject.FromJson(__jsonLimit) : _limit;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceName.FromJson(__jsonName) : _name;}
+ {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;}
+ {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;}
+ {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)_unit;}
+ {_resourceType = If( json?.PropertyT("resourceType"), out var __jsonResourceType) ? (string)__jsonResourceType : (string)_resourceType;}
+ {_quotaPeriod = If( json?.PropertyT("quotaPeriod"), out var __jsonQuotaPeriod) ? (string)__jsonQuotaPeriod : (string)_quotaPeriod;}
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.Any.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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._limit ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._limit.ToJson(null,serializationMode) : null, "limit" ,container.Add );
+ AddIf( null != this._name ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._name.ToJson(null,serializationMode) : null, "name" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ }
+ AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add );
+ AddIf( null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._quotaPeriod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._quotaPeriod.ToString()) : null, "quotaPeriod" ,container.Add );
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.PowerShell.cs
new file mode 100644
index 000000000000..fdcf1895f3b2
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.PowerShell.cs
@@ -0,0 +1,244 @@
+// 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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// Quota request response.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestSubmitResponseTypeConverter))]
+ public partial class QuotaRequestSubmitResponse
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaRequestSubmitResponse DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaRequestSubmitResponse(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.Quota.Models.IQuotaRequestSubmitResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaRequestSubmitResponse(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.Quota.Models.IQuotaRequestSubmitResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaRequestSubmitResponse(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.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequestSubmitTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).RequestSubmitTime = (global::System.DateTime?) content.GetValueForProperty("RequestSubmitTime",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).RequestSubmitTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.SubRequestTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("ErrorMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).ErrorMessage, 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 QuotaRequestSubmitResponse(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.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestPropertiesTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("RequestSubmitTime"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).RequestSubmitTime = (global::System.DateTime?) content.GetValueForProperty("RequestSubmitTime",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).RequestSubmitTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.SubRequestTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("ErrorMessage"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal)this).ErrorMessage, 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.Quota.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 request response.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestSubmitResponseTypeConverter))]
+ public partial interface IQuotaRequestSubmitResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.TypeConverter.cs
new file mode 100644
index 000000000000..01e737dcd57b
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaRequestSubmitResponseTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaRequestSubmitResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaRequestSubmitResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaRequestSubmitResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaRequestSubmitResponse.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.cs
new file mode 100644
index 000000000000..87fb32e95e1e
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.cs
@@ -0,0 +1,245 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request response.
+ public partial class QuotaRequestSubmitResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal
+ {
+
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Code; }
+
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ErrorMessage; }
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Quota request ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// User-friendly status message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Code = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal.Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Error = value; }
+
+ /// Internal Acessors for ErrorMessage
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ErrorMessage = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Message = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ProvisioningState = value; }
+
+ /// Internal Acessors for RequestSubmitTime
+ global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal.RequestSubmitTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).RequestSubmitTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).RequestSubmitTime = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponseInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// Quota request name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties _property;
+
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestProperties()); set => this._property = value; }
+
+ /// The quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).ProvisioningState; }
+
+ ///
+ /// The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public global::System.DateTime? RequestSubmitTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).RequestSubmitTime; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// Resource type. "Microsoft.Quota/quotas".
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public System.Collections.Generic.List Value { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestPropertiesInternal)Property).Value = value ?? null /* arrayOf */; }
+
+ /// Creates an new instance.
+ public QuotaRequestSubmitResponse()
+ {
+
+ }
+ }
+ /// Quota request response.
+ public partial interface IQuotaRequestSubmitResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// Error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string ErrorMessage { get; }
+ /// Quota request ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request ID.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// User-friendly status message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"User-friendly status message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// Quota request name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request name.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// The quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The quota request status.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; }
+ ///
+ /// The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ",
+ SerializedName = @"requestSubmitTime",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? RequestSubmitTime { get; }
+ /// Resource type. "Microsoft.Quota/quotas".
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource type. ""Microsoft.Quota/quotas"".",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+ /// Quota request details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Quota request details.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ISubRequest) })]
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+ /// Quota request response.
+ internal partial interface IQuotaRequestSubmitResponseInternal
+
+ {
+ /// Error code.
+ string Code { get; set; }
+ /// Error details of the quota request.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorDetail Error { get; set; }
+ /// Error message.
+ string ErrorMessage { get; set; }
+ /// Quota request ID.
+ string Id { get; set; }
+ /// User-friendly status message.
+ string Message { get; set; }
+ /// Quota request name.
+ string Name { get; set; }
+ /// Quota request details.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestProperties Property { get; set; }
+ /// The quota request status.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; set; }
+ ///
+ /// The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
+ ///
+ global::System.DateTime? RequestSubmitTime { get; set; }
+ /// Resource type. "Microsoft.Quota/quotas".
+ string Type { get; set; }
+ /// Quota request details.
+ System.Collections.Generic.List Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.json.cs
new file mode 100644
index 000000000000..03dddf62bfcc
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse.json.cs
@@ -0,0 +1,123 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// Quota request response.
+ public partial class QuotaRequestSubmitResponse
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaRequestSubmitResponse(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaRequestSubmitResponse(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestProperties.FromJson(__jsonProperties) : _property;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;}
+ 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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.PowerShell.cs
new file mode 100644
index 000000000000..417d87acb173
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// The quota request response with the quota request ID.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestSubmitResponse202TypeConverter))]
+ public partial class QuotaRequestSubmitResponse202
+ {
+
+ ///
+ /// 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.Quota.Models.IQuotaRequestSubmitResponse202 DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new QuotaRequestSubmitResponse202(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.Quota.Models.IQuotaRequestSubmitResponse202 DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new QuotaRequestSubmitResponse202(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.Quota.Models.IQuotaRequestSubmitResponse202 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal QuotaRequestSubmitResponse202(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.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestStatusDetailsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("AnyProperty"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).AnyProperty = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("AnyProperty",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).AnyProperty, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("PropertiesName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).PropertiesName = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).PropertiesName, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("LimitObjectType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitObjectType = (string) content.GetValueForProperty("LimitObjectType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitObjectType, global::System.Convert.ToString);
+ }
+ if (content.Contains("LimitValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitValue = (int) content.GetValueForProperty("LimitValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("LimitType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitType = (string) content.GetValueForProperty("LimitType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitType, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).NameLocalizedValue, 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 QuotaRequestSubmitResponse202(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.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestStatusDetailsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("AnyProperty"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).AnyProperty = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) content.GetValueForProperty("AnyProperty",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).AnyProperty, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.AnyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Limit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Limit = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Limit, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.LimitObjectTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("PropertiesName"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).PropertiesName = (Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).PropertiesName, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ResourceNameTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).ProvisioningState, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Unit"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).Unit, global::System.Convert.ToString);
+ }
+ if (content.Contains("ResourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).ResourceType, global::System.Convert.ToString);
+ }
+ if (content.Contains("QuotaPeriod"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).QuotaPeriod = (string) content.GetValueForProperty("QuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).QuotaPeriod, global::System.Convert.ToString);
+ }
+ if (content.Contains("LimitObjectType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitObjectType = (string) content.GetValueForProperty("LimitObjectType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitObjectType, global::System.Convert.ToString);
+ }
+ if (content.Contains("LimitValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitValue = (int) content.GetValueForProperty("LimitValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ }
+ if (content.Contains("LimitType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitType = (string) content.GetValueForProperty("LimitType",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).LimitType, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).NameValue, global::System.Convert.ToString);
+ }
+ if (content.Contains("NameLocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal)this).NameLocalizedValue, 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.Quota.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 quota request response with the quota request ID.
+ [System.ComponentModel.TypeConverter(typeof(QuotaRequestSubmitResponse202TypeConverter))]
+ public partial interface IQuotaRequestSubmitResponse202
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.TypeConverter.cs
new file mode 100644
index 000000000000..deeec84f96a7
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class QuotaRequestSubmitResponse202TypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IQuotaRequestSubmitResponse202 ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return QuotaRequestSubmitResponse202.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return QuotaRequestSubmitResponse202.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return QuotaRequestSubmitResponse202.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/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.cs
new file mode 100644
index 000000000000..3ea15f6fca81
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.cs
@@ -0,0 +1,373 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// The quota request response with the quota request ID.
+ public partial class QuotaRequestSubmitResponse202 :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal
+ {
+
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Property = value ?? null /* model class */; }
+
+ /// Backing field for property.
+ private string _id;
+
+ ///
+ /// The quota request ID. To check the request status, use the **id** value in a [Quota Request Status](https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/quotarequeststatus/get)
+ /// GET operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string LimitObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).LimitObjectType; }
+
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string LimitType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).LimitType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).LimitType = value ?? null; }
+
+ /// The quota/limit value
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public int? LimitValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).LimitValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).LimitValue = value ?? default(int); }
+
+ /// User-friendly message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Message; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Limit
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.Limit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Limit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Limit = value; }
+
+ /// Internal Acessors for LimitObjectType
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.LimitObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).LimitObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).LimitObjectType = value; }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Message = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for NameLocalizedValue
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).NameLocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).NameLocalizedValue = value; }
+
+ /// Internal Acessors for PropertiesName
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.PropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Name = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestStatusDetails()); set { {_property = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).ProvisioningState = value; }
+
+ /// Internal Acessors for QuotaPeriod
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.QuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).QuotaPeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).QuotaPeriod = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202Internal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// Operation ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).NameLocalizedValue; }
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).NameValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).NameValue = value ?? null; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails _property;
+
+ /// Quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestStatusDetails()); set => this._property = value; }
+
+ /// Quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).ProvisioningState; }
+
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string QuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).QuotaPeriod; }
+
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).ResourceType = value ?? null; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// Resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Inlined)]
+ public string Unit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Unit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetailsInternal)Property).Unit = value ?? null; }
+
+ /// Creates an new instance.
+ public QuotaRequestSubmitResponse202()
+ {
+
+ }
+ }
+ /// The quota request response with the quota request ID.
+ public partial interface IQuotaRequestSubmitResponse202 :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Additional properties for the specific resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Additional properties for the specific resource provider.",
+ SerializedName = @"properties",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny) })]
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get; set; }
+ ///
+ /// The quota request ID. To check the request status, use the **id** value in a [Quota Request Status](https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/quotarequeststatus/get)
+ /// GET operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The quota request ID. To check the request status, use the **id** value in a [Quota Request Status](https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/quotarequeststatus/get) GET operation.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// The limit object type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The limit object type.",
+ SerializedName = @"limitObjectType",
+ PossibleTypes = new [] { typeof(string) })]
+ string LimitObjectType { get; }
+ /// The quota or usages limit types.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota or usages limit types.",
+ SerializedName = @"limitType",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ string LimitType { get; set; }
+ /// The quota/limit value
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The quota/limit value",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(int) })]
+ int? LimitValue { get; set; }
+ /// User-friendly message.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"User-friendly message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+ /// Operation ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Operation ID.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource display name.",
+ SerializedName = @"localizedValue",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameLocalizedValue { get; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(string) })]
+ string NameValue { get; set; }
+ /// Quota request status.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Quota request status.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"The time period over which the quota usage values are summarized. For example:
+ *P1D (per one day)
+ *PT1M (per one minute)
+ *PT1S (per one second).
+ This parameter is optional because, for some resources like compute, the period is irrelevant.",
+ SerializedName = @"quotaPeriod",
+ PossibleTypes = new [] { typeof(string) })]
+ string QuotaPeriod { get; }
+ /// The name of the resource type. Optional field.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"The name of the resource type. Optional field.",
+ SerializedName = @"resourceType",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceType { get; set; }
+ /// Resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource type.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @" The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in the request body of your PUT operation.",
+ SerializedName = @"unit",
+ PossibleTypes = new [] { typeof(string) })]
+ string Unit { get; set; }
+
+ }
+ /// The quota request response with the quota request ID.
+ internal partial interface IQuotaRequestSubmitResponse202Internal
+
+ {
+ /// Additional properties for the specific resource provider.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IAny AnyProperty { get; set; }
+ ///
+ /// The quota request ID. To check the request status, use the **id** value in a [Quota Request Status](https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/quotarequeststatus/get)
+ /// GET operation.
+ ///
+ string Id { get; set; }
+ /// Resource quota limit properties.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ILimitObject Limit { get; set; }
+ /// The limit object type.
+ string LimitObjectType { get; set; }
+ /// The quota or usages limit types.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Independent", "Shared")]
+ string LimitType { get; set; }
+ /// The quota/limit value
+ int? LimitValue { get; set; }
+ /// User-friendly message.
+ string Message { get; set; }
+ /// Operation ID.
+ string Name { get; set; }
+ /// Resource display name.
+ string NameLocalizedValue { get; set; }
+ /// Resource name.
+ string NameValue { get; set; }
+ ///
+ /// Resource name provided by the resource provider. Use this property name when requesting quota.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName PropertiesName { get; set; }
+ /// Quota request status.
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestStatusDetails Property { get; set; }
+ /// Quota request status.
+ [global::Microsoft.Azure.PowerShell.Cmdlets.Quota.PSArgumentCompleterAttribute("Accepted", "Invalid", "Succeeded", "Failed", "InProgress")]
+ string ProvisioningState { get; set; }
+ ///
+ /// The time period over which the quota usage values are summarized. For example:
+ /// *P1D (per one day)
+ /// *PT1M (per one minute)
+ /// *PT1S (per one second).
+ /// This parameter is optional because, for some resources like compute, the period is irrelevant.
+ ///
+ string QuotaPeriod { get; set; }
+ /// The name of the resource type. Optional field.
+ string ResourceType { get; set; }
+ /// Resource type.
+ string Type { get; set; }
+ ///
+ /// The quota limit units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response
+ /// in the request body of your PUT operation.
+ ///
+ string Unit { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.json.cs
new file mode 100644
index 000000000000..d36ce342017c
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/QuotaRequestSubmitResponse202.json.cs
@@ -0,0 +1,123 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// The quota request response with the quota request ID.
+ public partial class QuotaRequestSubmitResponse202
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IQuotaRequestSubmitResponse202 FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new QuotaRequestSubmitResponse202(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal QuotaRequestSubmitResponse202(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.QuotaRequestStatusDetails.FromJson(__jsonProperties) : _property;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;}
+ 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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.PowerShell.cs
new file mode 100644
index 000000000000..a4e3a24a9eb3
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// Name of the resource provided by the resource Provider. When requesting quota, use this property name.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(ResourceNameTypeConverter))]
+ public partial class ResourceName
+ {
+
+ ///
+ /// 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.Quota.Models.IResourceName DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ResourceName(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.Quota.Models.IResourceName DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ResourceName(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.Quota.Models.IResourceName FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ResourceName(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.Quota.Models.IResourceNameInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)this).Value, global::System.Convert.ToString);
+ }
+ if (content.Contains("LocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)this).LocalizedValue = (string) content.GetValueForProperty("LocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)this).LocalizedValue, 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 ResourceName(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.Quota.Models.IResourceNameInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)this).Value, global::System.Convert.ToString);
+ }
+ if (content.Contains("LocalizedValue"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)this).LocalizedValue = (string) content.GetValueForProperty("LocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal)this).LocalizedValue, 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.Quota.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();
+ }
+ }
+ /// Name of the resource provided by the resource Provider. When requesting quota, use this property name.
+ [System.ComponentModel.TypeConverter(typeof(ResourceNameTypeConverter))]
+ public partial interface IResourceName
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.TypeConverter.cs
new file mode 100644
index 000000000000..d0665967c883
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ResourceNameTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IResourceName ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ResourceName.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ResourceName.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ResourceName.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/Quota1/Quota.Autorest/generated/api/Models/ResourceName.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.cs
new file mode 100644
index 000000000000..81442bfd3e18
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ ///
+ /// Name of the resource provided by the resource Provider. When requesting quota, use this property name.
+ ///
+ public partial class ResourceName :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal
+ {
+
+ /// Backing field for property.
+ private string _localizedValue;
+
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string LocalizedValue { get => this._localizedValue; }
+
+ /// Internal Acessors for LocalizedValue
+ string Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceNameInternal.LocalizedValue { get => this._localizedValue; set { {_localizedValue = value;} } }
+
+ /// Backing field for property.
+ private string _value;
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public ResourceName()
+ {
+
+ }
+ }
+ /// Name of the resource provided by the resource Provider. When requesting quota, use this property name.
+ public partial interface IResourceName :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IJsonSerializable
+ {
+ /// Resource display name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Read = true,
+ Create = false,
+ Update = false,
+ Description = @"Resource display name.",
+ SerializedName = @"localizedValue",
+ PossibleTypes = new [] { typeof(string) })]
+ string LocalizedValue { get; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Read = true,
+ Create = true,
+ Update = true,
+ Description = @"Resource name.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(string) })]
+ string Value { get; set; }
+
+ }
+ /// Name of the resource provided by the resource Provider. When requesting quota, use this property name.
+ internal partial interface IResourceNameInternal
+
+ {
+ /// Resource display name.
+ string LocalizedValue { get; set; }
+ /// Resource name.
+ string Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.json.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.json.cs
new file mode 100644
index 000000000000..818777830573
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ResourceName.json.cs
@@ -0,0 +1,113 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ ///
+ /// Name of the resource provided by the resource Provider. When requesting quota, use this property name.
+ ///
+ public partial class ResourceName
+ {
+
+ ///
+ /// 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.Quota.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.Quota.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.Quota.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.Quota.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName.
+ ///
+ /// a to deserialize from.
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName.
+ public static Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IResourceName FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json ? new ResourceName(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject instance to deserialize from.
+ internal ResourceName(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)_value;}
+ {_localizedValue = If( json?.PropertyT("localizedValue"), out var __jsonLocalizedValue) ? (string)__jsonLocalizedValue : (string)_localizedValue;}
+ 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.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeRead))
+ {
+ AddIf( null != (((object)this._localizedValue)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._localizedValue.ToString()) : null, "localizedValue" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/ServiceError.PowerShell.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ServiceError.PowerShell.cs
new file mode 100644
index 000000000000..9901cfd5b971
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ServiceError.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ /// API error details.
+ [System.ComponentModel.TypeConverter(typeof(ServiceErrorTypeConverter))]
+ public partial class ServiceError
+ {
+
+ ///
+ /// 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.Quota.Models.IServiceError DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ServiceError(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.Quota.Models.IServiceError DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ServiceError(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.Quota.Models.IServiceError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ServiceError(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.Quota.Models.IServiceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ServiceError(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.Quota.Models.IServiceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.ServiceErrorDetailTypeConverter.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.Quota.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();
+ }
+ }
+ /// API error details.
+ [System.ComponentModel.TypeConverter(typeof(ServiceErrorTypeConverter))]
+ public partial interface IServiceError
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Quota1/Quota.Autorest/generated/api/Models/ServiceError.TypeConverter.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ServiceError.TypeConverter.cs
new file mode 100644
index 000000000000..58b2baf37331
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ServiceError.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.Quota.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ServiceErrorTypeConverter : 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.Quota.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Models.IServiceError ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceError).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ServiceError.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ServiceError.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ServiceError.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/Quota1/Quota.Autorest/generated/api/Models/ServiceError.cs b/src/Quota1/Quota.Autorest/generated/api/Models/ServiceError.cs
new file mode 100644
index 000000000000..64771df2fc68
--- /dev/null
+++ b/src/Quota1/Quota.Autorest/generated/api/Models/ServiceError.cs
@@ -0,0 +1,97 @@
+// 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.Quota.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Extensions;
+
+ /// API error details.
+ public partial class ServiceError :
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceError,
+ Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IServiceErrorInternal
+ {
+
+ /// Backing field for property.
+ private string _code;
+
+ /// Error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public string Code { get => this._code; set => this._code = value; }
+
+ /// Backing field for property.
+ private System.Collections.Generic.List _detail;
+
+ /// List of error details.
+ [Microsoft.Azure.PowerShell.Cmdlets.Quota.Origin(Microsoft.Azure.PowerShell.Cmdlets.Quota.PropertyOrigin.Owned)]
+ public System.Collections.Generic.List Detail { get => this._detail; }
+
+ /// Backing field for