diff --git a/src/VoiceServices/Az.VoiceServices.format.ps1xml b/src/VoiceServices/Az.VoiceServices.format.ps1xml index 572cabd77405..33bfa7a4dde6 100644 --- a/src/VoiceServices/Az.VoiceServices.format.ps1xml +++ b/src/VoiceServices/Az.VoiceServices.format.ps1xml @@ -23,28 +23,6 @@ - - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.ContactsDeleteAcceptedResponseHeaders - - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.ContactsDeleteAcceptedResponseHeaders - - - - - - - - - - - - RetryAfter - - - - - - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.TestLinesDeleteAcceptedResponseHeaders @@ -78,7 +56,7 @@ - + @@ -97,7 +75,7 @@ CommunicationsGatewayName - ContactName + Location ResourceGroupName @@ -410,149 +388,55 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGateway + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CheckNameAvailabilityRequest - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGateway + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CheckNameAvailabilityRequest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Location - Name - - SystemDataCreatedAt - - - SystemDataCreatedBy - - - SystemDataCreatedByType - - - SystemDataLastModifiedAt - - - SystemDataLastModifiedBy - - - SystemDataLastModifiedByType - - - ResourceGroupName - - - RetryAfter - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayListResult - - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayListResult - - - - - - - - - - - - NextLink - - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayProperties + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CheckNameAvailabilityResponse - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayProperties + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CheckNameAvailabilityResponse - - - - - - - - - - + - + - + - Codec - - - Connectivity - - - E911Type - - - Platform + Message - ProvisioningState + NameAvailable - Status + Reason @@ -560,31 +444,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayUpdateTags + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGateway - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayUpdateTags - - - - - - - - - - - - Item - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.Contact - - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.Contact + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGateway @@ -658,9 +520,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactListResult + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayListResult - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactListResult + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayListResult @@ -680,45 +542,81 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactProperties + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayProperties - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactProperties + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayProperties - + - + - + + + + + + + + + + + + + + + + - + + + + - ContactName + AutoGeneratedDomainNameLabel - Email + AutoGeneratedDomainNameLabelScope - PhoneNumber + Codec + + + Connectivity + + + E911Type + + + EmergencyDialString + + + OnPremMcpEnabled + + + Platform ProvisioningState - Role + Status + + + TeamsVoicemailPilotNumber @@ -726,9 +624,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactUpdateTags + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayUpdateTags - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactUpdateTags + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayUpdateTags @@ -748,12 +646,18 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.PrimaryRegionProperties + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.PrimaryRegionProperties - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.PrimaryRegionProperties + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.PrimaryRegionProperties + + + + + + @@ -764,6 +668,12 @@ + + AllowedMediaSourceAddressPrefix + + + AllowedSignalingSourceAddressPrefix + EsrpAddress @@ -776,9 +686,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties @@ -798,9 +708,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLine + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLine - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLine + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLine @@ -874,9 +784,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineListResult + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineListResult - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineListResult + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineListResult @@ -896,9 +806,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineProperties + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineProperties - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineProperties + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineProperties @@ -930,9 +840,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineUpdateTags + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineUpdateTags - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineUpdateTags + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineUpdateTags diff --git a/src/VoiceServices/Az.VoiceServices.psd1 b/src/VoiceServices/Az.VoiceServices.psd1 index dda10d48570c..83dab6347874 100644 --- a/src/VoiceServices/Az.VoiceServices.psd1 +++ b/src/VoiceServices/Az.VoiceServices.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 12/22/2022 +# Generated on: 1/31/2023 # @{ @@ -69,17 +69,14 @@ FormatsToProcess = './Az.VoiceServices.format.ps1xml' # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = 'Get-AzVoiceServicesCommunicationsContact', - 'Get-AzVoiceServicesCommunicationsGateway', +FunctionsToExport = 'Get-AzVoiceServicesCommunicationsGateway', 'Get-AzVoiceServicesCommunicationsTestLine', - 'New-AzVoiceServicesCommunicationsContact', 'New-AzVoiceServicesCommunicationsGateway', 'New-AzVoiceServicesCommunicationsGatewayServiceRegionObject', 'New-AzVoiceServicesCommunicationsTestLine', - 'Remove-AzVoiceServicesCommunicationsContact', 'Remove-AzVoiceServicesCommunicationsGateway', 'Remove-AzVoiceServicesCommunicationsTestLine', - 'Update-AzVoiceServicesCommunicationsContact', + 'Test-AzVoiceServicesNameAvailability', 'Update-AzVoiceServicesCommunicationsGateway', 'Update-AzVoiceServicesCommunicationsTestLine' diff --git a/src/VoiceServices/Az.VoiceServices.psm1 b/src/VoiceServices/Az.VoiceServices.psm1 index 8b311178cd7b..ca34d0fe70d4 100644 --- a/src/VoiceServices/Az.VoiceServices.psm1 +++ b/src/VoiceServices/Az.VoiceServices.psm1 @@ -33,7 +33,7 @@ } 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 + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop } diff --git a/src/VoiceServices/Changelog.md b/src/VoiceServices/Changelog.md index 0f2897870fae..f8ac4582565d 100644 --- a/src/VoiceServices/Changelog.md +++ b/src/VoiceServices/Changelog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Upgraded API version to 2023-01-31 ## Version 0.1.0 * First preview release for module Az.VoiceServices diff --git a/src/VoiceServices/README.md b/src/VoiceServices/README.md index fa3b76e1c8fb..ef54081a2b79 100644 --- a/src/VoiceServices/README.md +++ b/src/VoiceServices/README.md @@ -35,11 +35,12 @@ In this directory, run AutoRest: > see https://aka.ms/autorest ``` yaml +branch: 78ec1b99699a4bf44869bd13f1b0ed7d92a99c27 require: - $(this-folder)/../readme.azure.noprofile.md -# lock the commit -input-file: - - $(this-folder)\test\swagger\voiceservices\resource-manager\Microsoft.VoiceServices\preview\2022-12-01-preview\openapi.json + - $(repo)/specification/voiceservices/resource-manager/readme.md +try-require: + - $(repo)/specification/voiceservices/resource-manager/readme.powershell.md subject-prefix: $(service-name) @@ -57,17 +58,27 @@ directive: "additionalProperties": true, "description": "Details of API bridge functionality." } - + + - where: + subject: ^NameAvailabilityLocal$ + variant: ^Check$|^CheckViaIdentity$|^CheckViaIdentityExpanded$ + remove: true + - where: + subject: ^NameAvailabilityLocal$ + set: + subject: NameAvailability + - where: subject: CommunicationGateway set: subject: CommunicationsGateway - where: - subject: Contact + subject: CommunicationsGateway + parameter-name: AutoGeneratedDomainNameLabelScope set: - subject: CommunicationsContact - + parameter-name: DomainNameLabelScope + - where: subject: TestLine set: diff --git a/src/VoiceServices/VoiceServices.sln b/src/VoiceServices/VoiceServices.sln index 9907a4e2bb9b..1d296099c14f 100644 --- a/src/VoiceServices/VoiceServices.sln +++ b/src/VoiceServices/VoiceServices.sln @@ -3,17 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{F668F433-02BE-4F65-8374-414C6523BAB1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{BB33970E-1200-4692-B30D-604108E39C16}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{2B259982-8BF3-4E9F-949A-F41E19B40F1C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{3AD4A18C-0C99-47EC-9DC3-FCCE39EEFDAE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{7095CE5C-C76E-468E-95C0-842B688514C9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{9C6C56E8-B7E5-4EB6-A8EC-47F33A9DFDAD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{0983AC64-6354-4307-8F1E-1F31BC74ECE0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{57014F4D-7FA1-4C2E-8ED3-2727462421BA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{8F6A289A-0308-41C2-B504-CA823A3BBCD1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{091B6ABF-3A43-4A99-9E1C-95DC816D80A5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.VoiceServices", "Az.VoiceServices.csproj", "{C2C8DF49-30AE-4358-8D89-DE70022F757F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{8C6EEA47-49AE-4CDD-ADD2-27BE64A67284}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.VoiceServices", "Az.VoiceServices.csproj", "{51869C9B-520A-47FA-883E-2026BDF21655}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -24,29 +26,33 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F668F433-02BE-4F65-8374-414C6523BAB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F668F433-02BE-4F65-8374-414C6523BAB1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F668F433-02BE-4F65-8374-414C6523BAB1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F668F433-02BE-4F65-8374-414C6523BAB1}.Release|Any CPU.Build.0 = Release|Any CPU - {2B259982-8BF3-4E9F-949A-F41E19B40F1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B259982-8BF3-4E9F-949A-F41E19B40F1C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B259982-8BF3-4E9F-949A-F41E19B40F1C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2B259982-8BF3-4E9F-949A-F41E19B40F1C}.Release|Any CPU.Build.0 = Release|Any CPU - {7095CE5C-C76E-468E-95C0-842B688514C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7095CE5C-C76E-468E-95C0-842B688514C9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7095CE5C-C76E-468E-95C0-842B688514C9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7095CE5C-C76E-468E-95C0-842B688514C9}.Release|Any CPU.Build.0 = Release|Any CPU - {0983AC64-6354-4307-8F1E-1F31BC74ECE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0983AC64-6354-4307-8F1E-1F31BC74ECE0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0983AC64-6354-4307-8F1E-1F31BC74ECE0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0983AC64-6354-4307-8F1E-1F31BC74ECE0}.Release|Any CPU.Build.0 = Release|Any CPU - {8F6A289A-0308-41C2-B504-CA823A3BBCD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8F6A289A-0308-41C2-B504-CA823A3BBCD1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8F6A289A-0308-41C2-B504-CA823A3BBCD1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8F6A289A-0308-41C2-B504-CA823A3BBCD1}.Release|Any CPU.Build.0 = Release|Any CPU - {C2C8DF49-30AE-4358-8D89-DE70022F757F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C2C8DF49-30AE-4358-8D89-DE70022F757F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C2C8DF49-30AE-4358-8D89-DE70022F757F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C2C8DF49-30AE-4358-8D89-DE70022F757F}.Release|Any CPU.Build.0 = Release|Any CPU + {BB33970E-1200-4692-B30D-604108E39C16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB33970E-1200-4692-B30D-604108E39C16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB33970E-1200-4692-B30D-604108E39C16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB33970E-1200-4692-B30D-604108E39C16}.Release|Any CPU.Build.0 = Release|Any CPU + {3AD4A18C-0C99-47EC-9DC3-FCCE39EEFDAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3AD4A18C-0C99-47EC-9DC3-FCCE39EEFDAE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3AD4A18C-0C99-47EC-9DC3-FCCE39EEFDAE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3AD4A18C-0C99-47EC-9DC3-FCCE39EEFDAE}.Release|Any CPU.Build.0 = Release|Any CPU + {9C6C56E8-B7E5-4EB6-A8EC-47F33A9DFDAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C6C56E8-B7E5-4EB6-A8EC-47F33A9DFDAD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C6C56E8-B7E5-4EB6-A8EC-47F33A9DFDAD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C6C56E8-B7E5-4EB6-A8EC-47F33A9DFDAD}.Release|Any CPU.Build.0 = Release|Any CPU + {57014F4D-7FA1-4C2E-8ED3-2727462421BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57014F4D-7FA1-4C2E-8ED3-2727462421BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57014F4D-7FA1-4C2E-8ED3-2727462421BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57014F4D-7FA1-4C2E-8ED3-2727462421BA}.Release|Any CPU.Build.0 = Release|Any CPU + {091B6ABF-3A43-4A99-9E1C-95DC816D80A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {091B6ABF-3A43-4A99-9E1C-95DC816D80A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {091B6ABF-3A43-4A99-9E1C-95DC816D80A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {091B6ABF-3A43-4A99-9E1C-95DC816D80A5}.Release|Any CPU.Build.0 = Release|Any CPU + {8C6EEA47-49AE-4CDD-ADD2-27BE64A67284}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C6EEA47-49AE-4CDD-ADD2-27BE64A67284}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C6EEA47-49AE-4CDD-ADD2-27BE64A67284}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C6EEA47-49AE-4CDD-ADD2-27BE64A67284}.Release|Any CPU.Build.0 = Release|Any CPU + {51869C9B-520A-47FA-883E-2026BDF21655}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51869C9B-520A-47FA-883E-2026BDF21655}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51869C9B-520A-47FA-883E-2026BDF21655}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51869C9B-520A-47FA-883E-2026BDF21655}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/VoiceServices/custom/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.ps1 b/src/VoiceServices/custom/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.ps1 index b8f1592f888e..15ff54e839ad 100644 --- a/src/VoiceServices/custom/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.ps1 +++ b/src/VoiceServices/custom/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.ps1 @@ -21,12 +21,12 @@ Create an in-memory object for ServiceRegionProperties. Create an in-memory object for ServiceRegionProperties. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties .Link https://learn.microsoft.com/powershell/module/az.VoiceServices/new-AzVoiceServicesCommunicationsGatewayServiceRegionObject #> function New-AzVoiceServicesCommunicationsGatewayServiceRegionObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties')] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties')] [CmdletBinding(PositionalBinding=$false)] Param( @@ -42,7 +42,7 @@ function New-AzVoiceServicesCommunicationsGatewayServiceRegionObject { ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties]::New() if ($PSBoundParameters.ContainsKey('Name')) { $Object.Name = $Name diff --git a/src/VoiceServices/custom/README.md b/src/VoiceServices/custom/README.md index c3a67d02c66a..2991fbb47729 100644 --- a/src/VoiceServices/custom/README.md +++ b/src/VoiceServices/custom/README.md @@ -32,7 +32,7 @@ These provide functionality to our HTTP pipeline and other useful features. In s ### Attributes For processing the cmdlets, we've created some additional attributes: - `Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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. + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. - `Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.DoNotExportAttribute` - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.VoiceServices`. - `Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.InternalExportAttribute` diff --git a/src/VoiceServices/examples/Get-AzVoiceServicesCommunicationsContact.md b/src/VoiceServices/examples/Get-AzVoiceServicesCommunicationsContact.md deleted file mode 100644 index 14d297bf0720..000000000000 --- a/src/VoiceServices/examples/Get-AzVoiceServicesCommunicationsContact.md +++ /dev/null @@ -1,38 +0,0 @@ -### Example 1: List all contacts under the communications gateway -```powershell -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus gateway-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 7:47:30 AM v-diya@microsoft.com User vtest-communication-rg -``` - -List all contacts under the communications gateway. - -### Example 2: Get a contact -```powershell -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus gateway-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 7:47:30 AM v-diya@microsoft.com User vtest-communication-rg -``` - -Get a contact. - -### Example 3: Get a contact by pipeline -```powershell -New-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -Location 'westcentralus' -PhoneNumber "+1-555-1234" -FullContactName "John Smith" -Email "johnsmith@example.com" -Role "Network Manager" | Get-AzVoiceServicesCommunicationsContact -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus gateway-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 7:47:30 AM v-diya@microsoft.com User vtest-communication-rg -``` - -Get a contact by pipeline. \ No newline at end of file diff --git a/src/VoiceServices/examples/New-AzVoiceServicesCommunicationsContact.md b/src/VoiceServices/examples/New-AzVoiceServicesCommunicationsContact.md deleted file mode 100644 index 5496f866e2fe..000000000000 --- a/src/VoiceServices/examples/New-AzVoiceServicesCommunicationsContact.md +++ /dev/null @@ -1,12 +0,0 @@ -### Example 1: Create a contact for the communications gateway -```powershell -New-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name contact-01 -Location 'westcentralus' -PhoneNumber "+1-555-1234" -FullContactName "John Smith" -Email "johnsmith@example.com" -Role "Network Manager" -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus contact-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 7:47:30 AM v-diya@microsoft.com User vtest-communication-rg -``` - -Create a contact for the communications gateway. \ No newline at end of file diff --git a/src/VoiceServices/examples/Remove-AzVoiceServicesCommunicationsContact.md b/src/VoiceServices/examples/Remove-AzVoiceServicesCommunicationsContact.md deleted file mode 100644 index 44a209386a37..000000000000 --- a/src/VoiceServices/examples/Remove-AzVoiceServicesCommunicationsContact.md +++ /dev/null @@ -1,20 +0,0 @@ -### Example 1: Delete a contact -```powershell -Remove-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -``` - -```output -``` - -Delete a contact. - -### Example 2: Delete a contact by pipeline -```powershell -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 | Remove-AzVoiceServicesCommunicationsContact -``` - -```output -``` - -Delete a contact by pipeline. - diff --git a/src/VoiceServices/examples/Test-AzVoiceServicesNameAvailability.md b/src/VoiceServices/examples/Test-AzVoiceServicesNameAvailability.md new file mode 100644 index 000000000000..1a4689aff185 --- /dev/null +++ b/src/VoiceServices/examples/Test-AzVoiceServicesNameAvailability.md @@ -0,0 +1,12 @@ +### Example 1: Checks whether the resource name is available in the given region +```powershell +Test-AzVoiceServicesNameAvailability -Location eastus -Name 'VoiceServicesTestName' -Type "Microsoft.VoiceServices/CommunicationsGateways" +``` + +```output +Message NameAvailable Reason +------- ------------- ------ + True +``` + +This command checks whether the resource name is available in the given region. \ No newline at end of file diff --git a/src/VoiceServices/examples/Update-AzVoiceServicesCommunicationsContact.md b/src/VoiceServices/examples/Update-AzVoiceServicesCommunicationsContact.md deleted file mode 100644 index 1a0879cb5412..000000000000 --- a/src/VoiceServices/examples/Update-AzVoiceServicesCommunicationsContact.md +++ /dev/null @@ -1,25 +0,0 @@ -### Example 1: Update a contact -```powershell -Update-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -Tag @{'key1'='value1'} -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus gateway-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 8:34:33 AM v-diya@microsoft.com User vtest-communication-rg -``` - -Update a contact. - -### Example 2: Update a contact by pipeline -```powershell -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 | Update-AzVoiceServicesCommunicationsContact -Tag @{'key1'='value1'} -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus gateway-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 8:34:33 AM v-diya@microsoft.com User vtest-communication-rg -``` - -Update a contact by pipeline. \ No newline at end of file diff --git a/src/VoiceServices/exports/Get-AzVoiceServicesCommunicationsContact.ps1 b/src/VoiceServices/exports/Get-AzVoiceServicesCommunicationsContact.ps1 deleted file mode 100644 index b178d7ba3e29..000000000000 --- a/src/VoiceServices/exports/Get-AzVoiceServicesCommunicationsContact.ps1 +++ /dev/null @@ -1,214 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# 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 a Contact -.Description -Get a Contact -.Example -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -.Example -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -.Example -New-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -Location 'westcentralus' -PhoneNumber "+1-555-1234" -FullContactName "John Smith" -Email "johnsmith@example.com" -Role "Network Manager" | Get-AzVoiceServicesCommunicationsContact - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact -.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 - [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. - [TestLineName ]: Unique identifier for this test line -.Link -https://learn.microsoft.com/powershell/module/az.voiceservices/get-azvoiceservicescommunicationscontact -#> -function Get-AzVoiceServicesCommunicationsContact { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] -param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this deployment - ${CommunicationsGatewayName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('ContactName')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this contact - ${Name}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity] - # 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.VoiceServices.Category('Azure')] - [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. - ${DefaultProfile}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.private\Get-AzVoiceServicesCommunicationsContact_Get'; - GetViaIdentity = 'Az.VoiceServices.private\Get-AzVoiceServicesCommunicationsContact_GetViaIdentity'; - List = 'Az.VoiceServices.private\Get-AzVoiceServicesCommunicationsContact_List'; - } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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/VoiceServices/exports/Get-AzVoiceServicesCommunicationsGateway.ps1 b/src/VoiceServices/exports/Get-AzVoiceServicesCommunicationsGateway.ps1 index 874afb3cb9bd..45324023f3fb 100644 --- a/src/VoiceServices/exports/Get-AzVoiceServicesCommunicationsGateway.ps1 +++ b/src/VoiceServices/exports/Get-AzVoiceServicesCommunicationsGateway.ps1 @@ -35,7 +35,7 @@ New-AzVoiceServicesCommunicationsGateway -ResourceGroupName 'vtest-communication .Inputs Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway .Notes COMPLEX PARAMETER PROPERTIES @@ -43,8 +43,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line @@ -52,7 +52,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.voiceservices/get-azvoiceservicescommunicationsgateway #> function Get-AzVoiceServicesCommunicationsGateway { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/src/VoiceServices/exports/Get-AzVoiceServicesCommunicationsTestLine.ps1 b/src/VoiceServices/exports/Get-AzVoiceServicesCommunicationsTestLine.ps1 index 669299797683..cb30b27cf811 100644 --- a/src/VoiceServices/exports/Get-AzVoiceServicesCommunicationsTestLine.ps1 +++ b/src/VoiceServices/exports/Get-AzVoiceServicesCommunicationsTestLine.ps1 @@ -29,7 +29,7 @@ New-AzVoiceServicesCommunicationsTestLine -ResourceGroupName vtest-communication .Inputs Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine .Notes COMPLEX PARAMETER PROPERTIES @@ -37,8 +37,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line @@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.voiceservices/get-azvoiceservicescommunicationstestline #> function Get-AzVoiceServicesCommunicationsTestLine { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsGateway.ps1 b/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsGateway.ps1 index f604252109f5..097d489ea82a 100644 --- a/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsGateway.ps1 +++ b/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsGateway.ps1 @@ -27,7 +27,7 @@ $region += New-AzVoiceServicesCommunicationsGatewayServiceRegionObject -Name use New-AzVoiceServicesCommunicationsGateway -ResourceGroupName 'vtest-communication-rg' -Name vsc-gateway-pwsh01 -Location 'westcentralus' -Codec 'PCMA' -E911Type 'Standard' -Platform 'OperatorConnect' -ServiceLocation $region .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway .Notes COMPLEX PARAMETER PROPERTIES @@ -36,12 +36,14 @@ To create the parameters described below, construct a hash table containing the SERVICELOCATION : The regions in which to deploy the resources needed for Teams Calling Name : The name of the region in which the resources needed for Teams Calling will be deployed. PrimaryRegionPropertyOperatorAddress : IP address to use to contact the operator network from this region + [PrimaryRegionPropertyAllowedMediaSourceAddressPrefix ]: The allowed source IP address or CIDR ranges for media + [PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix ]: The allowed source IP address or CIDR ranges for signaling [PrimaryRegionPropertyEsrpAddress ]: IP address to use to contact the ESRP from this region .Link https://learn.microsoft.com/powershell/module/az.voiceservices/new-azvoiceservicescommunicationsgateway #> function New-AzVoiceServicesCommunicationsGateway { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -72,7 +74,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties]))] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties]))] [System.Collections.Hashtable] # Details of API bridge functionality, if required ${ApiBridge}, @@ -85,6 +87,13 @@ param( # Voice codecs to support ${Codec}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope])] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope] + # The scope at which the auto-generated domain name can be re-used + ${DomainNameLabelScope}, + [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type])] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] @@ -92,6 +101,19 @@ param( # How to handle 911 calls ${E911Type}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [System.String[]] + # A list of dial strings used for emergency calling. + ${EmergencyDialString}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether an on-premises Mobile Control Point is in use. + ${OnPremMcpEnabled}, + [Parameter()] [AllowEmptyCollection()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform])] @@ -103,7 +125,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[]] # The regions in which to deploy the resources needed for Teams Calling # To construct, see NOTES section for SERVICELOCATION properties and create a hash table. ${ServiceLocation}, @@ -115,6 +137,12 @@ param( # Resource tags. ${Tag}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [System.String] + # This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer. + ${TeamsVoicemailPilotNumber}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.ps1 b/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.ps1 index af86baa27a63..944020fd3aa8 100644 --- a/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.ps1 +++ b/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.ps1 @@ -20,19 +20,19 @@ Create an in-memory object for ServiceRegionProperties. .Description Create an in-memory object for ServiceRegionProperties. .Example -region = @() +$region = @() $region += New-AzVoiceServicesCommunicationsGatewayServiceRegionObject -Name useast -PrimaryRegionOperatorAddress '198.51.100.1' $region += New-AzVoiceServicesCommunicationsGatewayServiceRegionObject -Name useast2 -PrimaryRegionOperatorAddress '198.51.100.2' New-AzVoiceServicesCommunicationsGateway -ResourceGroupName 'vtest-communication-rg' -Name vsc-gateway-pwsh01 -Location 'westcentralus' -Codec 'PCMA' -E911Type 'Standard' -Platform 'OperatorConnect' -ServiceLocation $region .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties .Link https://learn.microsoft.com/powershell/module/az.VoiceServices/new-AzVoiceServicesCommunicationsGatewayServiceRegionObject #> function New-AzVoiceServicesCommunicationsGatewayServiceRegionObject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsTestLine.ps1 b/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsTestLine.ps1 index acb8058156bf..497484c0cfb8 100644 --- a/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsTestLine.ps1 +++ b/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsTestLine.ps1 @@ -23,12 +23,12 @@ Create a TestLine New-AzVoiceServicesCommunicationsTestLine -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name testline-01 -Location westcentralus -Purpose 'Automated' -PhoneNumber "+1-555-1234" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine .Link https://learn.microsoft.com/powershell/module/az.voiceservices/new-azvoiceservicescommunicationstestline #> function New-AzVoiceServicesCommunicationsTestLine { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/src/VoiceServices/exports/ProxyCmdletDefinitions.ps1 b/src/VoiceServices/exports/ProxyCmdletDefinitions.ps1 index 75a65d9ad2a8..d7eeb202711c 100644 --- a/src/VoiceServices/exports/ProxyCmdletDefinitions.ps1 +++ b/src/VoiceServices/exports/ProxyCmdletDefinitions.ps1 @@ -14,205 +14,6 @@ # is regenerated. # ---------------------------------------------------------------------------------- -<# -.Synopsis -Get a Contact -.Description -Get a Contact -.Example -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -.Example -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -.Example -New-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -Location 'westcentralus' -PhoneNumber "+1-555-1234" -FullContactName "John Smith" -Email "johnsmith@example.com" -Role "Network Manager" | Get-AzVoiceServicesCommunicationsContact - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact -.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 - [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. - [TestLineName ]: Unique identifier for this test line -.Link -https://learn.microsoft.com/powershell/module/az.voiceservices/get-azvoiceservicescommunicationscontact -#> -function Get-AzVoiceServicesCommunicationsContact { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] -param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this deployment - ${CommunicationsGatewayName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('ContactName')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this contact - ${Name}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity] - # 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.VoiceServices.Category('Azure')] - [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. - ${DefaultProfile}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.private\Get-AzVoiceServicesCommunicationsContact_Get'; - GetViaIdentity = 'Az.VoiceServices.private\Get-AzVoiceServicesCommunicationsContact_GetViaIdentity'; - List = 'Az.VoiceServices.private\Get-AzVoiceServicesCommunicationsContact_List'; - } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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 a CommunicationsGateway @@ -234,7 +35,7 @@ New-AzVoiceServicesCommunicationsGateway -ResourceGroupName 'vtest-communication .Inputs Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway .Notes COMPLEX PARAMETER PROPERTIES @@ -242,8 +43,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line @@ -251,7 +52,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.voiceservices/get-azvoiceservicescommunicationsgateway #> function Get-AzVoiceServicesCommunicationsGateway { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -428,7 +229,7 @@ New-AzVoiceServicesCommunicationsTestLine -ResourceGroupName vtest-communication .Inputs Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine .Notes COMPLEX PARAMETER PROPERTIES @@ -436,8 +237,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line @@ -445,7 +246,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.voiceservices/get-azvoiceservicescommunicationstestline #> function Get-AzVoiceServicesCommunicationsTestLine { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -466,470 +267,24 @@ param( [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity] - # 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.VoiceServices.Category('Azure')] - [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. - ${DefaultProfile}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.private\Get-AzVoiceServicesCommunicationsTestLine_Get'; - GetViaIdentity = 'Az.VoiceServices.private\Get-AzVoiceServicesCommunicationsTestLine_GetViaIdentity'; - List = 'Az.VoiceServices.private\Get-AzVoiceServicesCommunicationsTestLine_List'; - } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId - - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} -} - -<# -.Synopsis -Create a Contact -.Description -Create a Contact -.Example -New-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name contact-01 -Location 'westcentralus' -PhoneNumber "+1-555-1234" -FullContactName "John Smith" -Email "johnsmith@example.com" -Role "Network Manager" - -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact -.Link -https://learn.microsoft.com/powershell/module/az.voiceservices/new-azvoiceservicescommunicationscontact -#> -function New-AzVoiceServicesCommunicationsContact { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this deployment - ${CommunicationsGatewayName}, - - [Parameter(Mandatory)] - [Alias('ContactName')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this contact - ${Name}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [System.String] - # Email address of contact - ${Email}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [System.String] - # Full name of contact - ${FullContactName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [System.String] - # Telephone number of contact - ${PhoneNumber}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [System.String] - # Job title of contact - ${Role}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Azure')] - [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. - ${DefaultProfile}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.private\New-AzVoiceServicesCommunicationsContact_CreateExpanded'; - } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId - - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} -} - -<# -.Synopsis -Create a CommunicationsGateway -.Description -Create a CommunicationsGateway -.Example -$region = @() -$region += New-AzVoiceServicesCommunicationsGatewayServiceRegionObject -Name useast -PrimaryRegionOperatorAddress '198.51.100.1' -$region += New-AzVoiceServicesCommunicationsGatewayServiceRegionObject -Name useast2 -PrimaryRegionOperatorAddress '198.51.100.2' - -New-AzVoiceServicesCommunicationsGateway -ResourceGroupName 'vtest-communication-rg' -Name vsc-gateway-pwsh01 -Location 'westcentralus' -Codec 'PCMA' -E911Type 'Standard' -Platform 'OperatorConnect' -ServiceLocation $region - -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway -.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. - -SERVICELOCATION : The regions in which to deploy the resources needed for Teams Calling - Name : The name of the region in which the resources needed for Teams Calling will be deployed. - PrimaryRegionPropertyOperatorAddress : IP address to use to contact the operator network from this region - [PrimaryRegionPropertyEsrpAddress ]: IP address to use to contact the ESRP from this region -.Link -https://learn.microsoft.com/powershell/module/az.voiceservices/new-azvoiceservicescommunicationsgateway -#> -function New-AzVoiceServicesCommunicationsGateway { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this deployment - ${Name}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties]))] - [System.Collections.Hashtable] - # Details of API bridge functionality, if required - ${ApiBridge}, - - [Parameter()] - [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs])] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[]] - # Voice codecs to support - ${Codec}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type])] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type] - # How to handle 911 calls - ${E911Type}, - - [Parameter()] - [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform])] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[]] - # What platforms to support - ${Platform}, + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[]] - # The regions in which to deploy the resources needed for Teams Calling - # To construct, see NOTES section for SERVICELOCATION properties and create a hash table. - ${ServiceLocation}, + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -939,12 +294,6 @@ param( # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -965,12 +314,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] [System.Uri] @@ -1017,9 +360,11 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.VoiceServices.private\New-AzVoiceServicesCommunicationsGateway_CreateExpanded'; + Get = 'Az.VoiceServices.private\Get-AzVoiceServicesCommunicationsTestLine_Get'; + GetViaIdentity = 'Az.VoiceServices.private\Get-AzVoiceServicesCommunicationsTestLine_GetViaIdentity'; + List = 'Az.VoiceServices.private\Get-AzVoiceServicesCommunicationsTestLine_List'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -1070,32 +415,40 @@ end { <# .Synopsis -Create a TestLine +Create a CommunicationsGateway .Description -Create a TestLine +Create a CommunicationsGateway .Example -New-AzVoiceServicesCommunicationsTestLine -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name testline-01 -Location westcentralus -Purpose 'Automated' -PhoneNumber "+1-555-1234" +$region = @() +$region += New-AzVoiceServicesCommunicationsGatewayServiceRegionObject -Name useast -PrimaryRegionOperatorAddress '198.51.100.1' +$region += New-AzVoiceServicesCommunicationsGatewayServiceRegionObject -Name useast2 -PrimaryRegionOperatorAddress '198.51.100.2' + +New-AzVoiceServicesCommunicationsGateway -ResourceGroupName 'vtest-communication-rg' -Name vsc-gateway-pwsh01 -Location 'westcentralus' -Codec 'PCMA' -E911Type 'Standard' -Platform 'OperatorConnect' -ServiceLocation $region .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway +.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. + +SERVICELOCATION : The regions in which to deploy the resources needed for Teams Calling + Name : The name of the region in which the resources needed for Teams Calling will be deployed. + PrimaryRegionPropertyOperatorAddress : IP address to use to contact the operator network from this region + [PrimaryRegionPropertyAllowedMediaSourceAddressPrefix ]: The allowed source IP address or CIDR ranges for media + [PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix ]: The allowed source IP address or CIDR ranges for signaling + [PrimaryRegionPropertyEsrpAddress ]: IP address to use to contact the ESRP from this region .Link -https://learn.microsoft.com/powershell/module/az.voiceservices/new-azvoiceservicescommunicationstestline +https://learn.microsoft.com/powershell/module/az.voiceservices/new-azvoiceservicescommunicationsgateway #> -function New-AzVoiceServicesCommunicationsTestLine { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine])] +function New-AzVoiceServicesCommunicationsGateway { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] [System.String] # Unique identifier for this deployment - ${CommunicationsGatewayName}, - - [Parameter(Mandatory)] - [Alias('TestLineName')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this test line ${Name}, [Parameter(Mandatory)] @@ -1120,17 +473,61 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [System.String] - # The phone number - ${PhoneNumber}, + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties]))] + [System.Collections.Hashtable] + # Details of API bridge functionality, if required + ${ApiBridge}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose])] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs])] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose] - # Purpose of this test line, e.g. - # automated or manual testing - ${Purpose}, + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[]] + # Voice codecs to support + ${Codec}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope])] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope] + # The scope at which the auto-generated domain name can be re-used + ${DomainNameLabelScope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type])] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type] + # How to handle 911 calls + ${E911Type}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [System.String[]] + # A list of dial strings used for emergency calling. + ${EmergencyDialString}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether an on-premises Mobile Control Point is in use. + ${OnPremMcpEnabled}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform])] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[]] + # What platforms to support + ${Platform}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[]] + # The regions in which to deploy the resources needed for Teams Calling + # To construct, see NOTES section for SERVICELOCATION properties and create a hash table. + ${ServiceLocation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] @@ -1139,6 +536,12 @@ param( # Resource tags. ${Tag}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [System.String] + # This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer. + ${TeamsVoicemailPilotNumber}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1225,7 +628,7 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.VoiceServices.private\New-AzVoiceServicesCommunicationsTestLine_CreateExpanded'; + CreateExpanded = 'Az.VoiceServices.private\New-AzVoiceServicesCommunicationsGateway_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id @@ -1278,70 +681,74 @@ end { <# .Synopsis -Delete a Contact +Create a TestLine .Description -Delete a Contact -.Example -Remove-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 +Create a TestLine .Example -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 | Remove-AzVoiceServicesCommunicationsContact +New-AzVoiceServicesCommunicationsTestLine -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name testline-01 -Location westcentralus -Purpose 'Automated' -PhoneNumber "+1-555-1234" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity .Outputs -System.Boolean -.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 - [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. - [TestLineName ]: Unique identifier for this test line +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine .Link -https://learn.microsoft.com/powershell/module/az.voiceservices/remove-azvoiceservicescommunicationscontact +https://learn.microsoft.com/powershell/module/az.voiceservices/new-azvoiceservicescommunicationstestline #> -function Remove-AzVoiceServicesCommunicationsContact { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function New-AzVoiceServicesCommunicationsTestLine { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] [System.String] # Unique identifier for this deployment ${CommunicationsGatewayName}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('ContactName')] + [Parameter(Mandatory)] + [Alias('TestLineName')] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] [System.String] - # Unique identifier for this contact + # Unique identifier for this test line ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [System.String] + # The phone number + ${PhoneNumber}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose])] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose] + # Purpose of this test line, e.g. + # automated or manual testing + ${Purpose}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1383,12 +790,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] [System.Uri] @@ -1435,10 +836,9 @@ begin { } $mapping = @{ - Delete = 'Az.VoiceServices.private\Remove-AzVoiceServicesCommunicationsContact_Delete'; - DeleteViaIdentity = 'Az.VoiceServices.private\Remove-AzVoiceServicesCommunicationsContact_DeleteViaIdentity'; + CreateExpanded = 'Az.VoiceServices.private\New-AzVoiceServicesCommunicationsTestLine_CreateExpanded'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -1508,8 +908,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line @@ -1713,8 +1113,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line @@ -1905,77 +1305,45 @@ end { <# .Synopsis -Update a Contact +Check whether the resource name is available in the given region. .Description -Update a Contact +Check whether the resource name is available in the given region. .Example -Update-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -Tag @{'key1'='value1'} -.Example -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 | Update-AzVoiceServicesCommunicationsContact -Tag @{'key1'='value1'} +Test-AzVoiceServicesNameAvailability -Location eastus -Name 'VoiceServicesTestName' -Type "Microsoft.VoiceServices/CommunicationsGateways" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact -.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 - [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. - [TestLineName ]: Unique identifier for this test line +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse .Link -https://learn.microsoft.com/powershell/module/az.voiceservices/update-azvoiceservicescommunicationscontact +https://learn.microsoft.com/powershell/module/az.voiceservices/test-azvoiceservicesnameavailability #> -function Update-AzVoiceServicesCommunicationsContact { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Test-AzVoiceServicesNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse])] +[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this deployment - ${CommunicationsGatewayName}, - - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('ContactName')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this contact - ${Name}, - - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, + # The location in which uniqueness will be verified. + ${Location}, - [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] + [System.String] + # The name of the resource for which availability needs to be checked. + ${Name}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + [System.String] + # The resource type. + ${Type}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -2051,10 +1419,9 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.VoiceServices.private\Update-AzVoiceServicesCommunicationsContact_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.VoiceServices.private\Update-AzVoiceServicesCommunicationsContact_UpdateViaIdentityExpanded'; + CheckExpanded = 'Az.VoiceServices.private\Test-AzVoiceServicesNameAvailability_CheckExpanded'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -2116,7 +1483,7 @@ Get-AzVoiceServicesCommunicationsGateway -ResourceGroupName vtest-communication- .Inputs Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway .Notes COMPLEX PARAMETER PROPERTIES @@ -2124,8 +1491,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line @@ -2133,7 +1500,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.voiceservices/update-azvoiceservicescommunicationsgateway #> function Update-AzVoiceServicesCommunicationsGateway { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -2166,7 +1533,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -2310,7 +1677,7 @@ Get-AzVoiceServicesCommunicationsTestLine -ResourceGroupName vtest-communication .Inputs Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine .Notes COMPLEX PARAMETER PROPERTIES @@ -2318,8 +1685,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line @@ -2327,7 +1694,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.voiceservices/update-azvoiceservicescommunicationstestline #> function Update-AzVoiceServicesCommunicationsTestLine { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -2366,7 +1733,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -2503,19 +1870,19 @@ Create an in-memory object for ServiceRegionProperties. .Description Create an in-memory object for ServiceRegionProperties. .Example -region = @() +$region = @() $region += New-AzVoiceServicesCommunicationsGatewayServiceRegionObject -Name useast -PrimaryRegionOperatorAddress '198.51.100.1' $region += New-AzVoiceServicesCommunicationsGatewayServiceRegionObject -Name useast2 -PrimaryRegionOperatorAddress '198.51.100.2' New-AzVoiceServicesCommunicationsGateway -ResourceGroupName 'vtest-communication-rg' -Name vsc-gateway-pwsh01 -Location 'westcentralus' -Codec 'PCMA' -E911Type 'Standard' -Platform 'OperatorConnect' -ServiceLocation $region .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties .Link https://learn.microsoft.com/powershell/module/az.VoiceServices/new-AzVoiceServicesCommunicationsGatewayServiceRegionObject #> function New-AzVoiceServicesCommunicationsGatewayServiceRegionObject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/src/VoiceServices/exports/README.md b/src/VoiceServices/exports/README.md index 4f967969097b..6a923985f91c 100644 --- a/src/VoiceServices/exports/README.md +++ b/src/VoiceServices/exports/README.md @@ -1,5 +1,5 @@ # Exports -This directory contains the cmdlets *exported by* `Az.VoiceServices`. No other cmdlets in this repository are directly exported. What that means is the `Az.VoiceServices` 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. +This directory contains the cmdlets *exported by* `Az.VoiceServices`. No other cmdlets in this repository are directly exported. What that means is the `Az.VoiceServices` module will run [Export-ModuleMember](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. ## Info - Modifiable: no diff --git a/src/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsContact.ps1 b/src/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsContact.ps1 deleted file mode 100644 index e5a7d31afa95..000000000000 --- a/src/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsContact.ps1 +++ /dev/null @@ -1,226 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Delete a Contact -.Description -Delete a Contact -.Example -Remove-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -.Example -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 | Remove-AzVoiceServicesCommunicationsContact - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity -.Outputs -System.Boolean -.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 - [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. - [TestLineName ]: Unique identifier for this test line -.Link -https://learn.microsoft.com/powershell/module/az.voiceservices/remove-azvoiceservicescommunicationscontact -#> -function Remove-AzVoiceServicesCommunicationsContact { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this deployment - ${CommunicationsGatewayName}, - - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('ContactName')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this contact - ${Name}, - - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Delete')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity] - # 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.VoiceServices.Category('Azure')] - [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. - ${DefaultProfile}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) - } else { - $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - if ($internalCalledCmdlets -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name - } else { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' - } - - $mapping = @{ - Delete = 'Az.VoiceServices.private\Remove-AzVoiceServicesCommunicationsContact_Delete'; - DeleteViaIdentity = 'Az.VoiceServices.private\Remove-AzVoiceServicesCommunicationsContact_DeleteViaIdentity'; - } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsGateway.ps1 b/src/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsGateway.ps1 index 4da313d0373f..b11065bc3dce 100644 --- a/src/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsGateway.ps1 +++ b/src/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsGateway.ps1 @@ -35,8 +35,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line diff --git a/src/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsTestLine.ps1 b/src/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsTestLine.ps1 index 2d448ef630ee..d96ec18a58ca 100644 --- a/src/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsTestLine.ps1 +++ b/src/VoiceServices/exports/Remove-AzVoiceServicesCommunicationsTestLine.ps1 @@ -35,8 +35,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line diff --git a/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsContact.ps1 b/src/VoiceServices/exports/Test-AzVoiceServicesNameAvailability.ps1 similarity index 72% rename from src/VoiceServices/exports/New-AzVoiceServicesCommunicationsContact.ps1 rename to src/VoiceServices/exports/Test-AzVoiceServicesNameAvailability.ps1 index e3822a86183d..7b51a22c6ba3 100644 --- a/src/VoiceServices/exports/New-AzVoiceServicesCommunicationsContact.ps1 +++ b/src/VoiceServices/exports/Test-AzVoiceServicesNameAvailability.ps1 @@ -16,40 +16,26 @@ <# .Synopsis -Create a Contact +Check whether the resource name is available in the given region. .Description -Create a Contact +Check whether the resource name is available in the given region. .Example -New-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name contact-01 -Location 'westcentralus' -PhoneNumber "+1-555-1234" -FullContactName "John Smith" -Email "johnsmith@example.com" -Role "Network Manager" +Test-AzVoiceServicesNameAvailability -Location eastus -Name 'VoiceServicesTestName' -Type "Microsoft.VoiceServices/CommunicationsGateways" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse .Link -https://learn.microsoft.com/powershell/module/az.voiceservices/new-azvoiceservicescommunicationscontact +https://learn.microsoft.com/powershell/module/az.voiceservices/test-azvoiceservicesnameavailability #> -function New-AzVoiceServicesCommunicationsContact { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Test-AzVoiceServicesNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse])] +[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] [System.String] - # Unique identifier for this deployment - ${CommunicationsGatewayName}, - - [Parameter(Mandatory)] - [Alias('ContactName')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this contact - ${Name}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, + # The location in which uniqueness will be verified. + ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] @@ -58,42 +44,17 @@ param( # The ID of the target subscription. ${SubscriptionId}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] [System.String] - # Email address of contact - ${Email}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [System.String] - # Full name of contact - ${FullContactName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [System.String] - # Telephone number of contact - ${PhoneNumber}, + # The name of the resource for which availability needs to be checked. + ${Name}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] [System.String] - # Job title of contact - ${Role}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + # The resource type. + ${Type}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -103,12 +64,6 @@ param( # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -129,12 +84,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] [System.Uri] @@ -181,9 +130,9 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.VoiceServices.private\New-AzVoiceServicesCommunicationsContact_CreateExpanded'; + CheckExpanded = 'Az.VoiceServices.private\Test-AzVoiceServicesNameAvailability_CheckExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] diff --git a/src/VoiceServices/exports/Update-AzVoiceServicesCommunicationsContact.ps1 b/src/VoiceServices/exports/Update-AzVoiceServicesCommunicationsContact.ps1 deleted file mode 100644 index 44cba79e7415..000000000000 --- a/src/VoiceServices/exports/Update-AzVoiceServicesCommunicationsContact.ps1 +++ /dev/null @@ -1,215 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# 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 a Contact -.Description -Update a Contact -.Example -Update-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -Tag @{'key1'='value1'} -.Example -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 | Update-AzVoiceServicesCommunicationsContact -Tag @{'key1'='value1'} - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact -.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 - [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. - [TestLineName ]: Unique identifier for this test line -.Link -https://learn.microsoft.com/powershell/module/az.voiceservices/update-azvoiceservicescommunicationscontact -#> -function Update-AzVoiceServicesCommunicationsContact { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this deployment - ${CommunicationsGatewayName}, - - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('ContactName')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # Unique identifier for this contact - ${Name}, - - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Azure')] - [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. - ${DefaultProfile}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.private\Update-AzVoiceServicesCommunicationsContact_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.VoiceServices.private\Update-AzVoiceServicesCommunicationsContact_UpdateViaIdentityExpanded'; - } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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/VoiceServices/exports/Update-AzVoiceServicesCommunicationsGateway.ps1 b/src/VoiceServices/exports/Update-AzVoiceServicesCommunicationsGateway.ps1 index b62e41794b7d..392fb807f31b 100644 --- a/src/VoiceServices/exports/Update-AzVoiceServicesCommunicationsGateway.ps1 +++ b/src/VoiceServices/exports/Update-AzVoiceServicesCommunicationsGateway.ps1 @@ -27,7 +27,7 @@ Get-AzVoiceServicesCommunicationsGateway -ResourceGroupName vtest-communication- .Inputs Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway .Notes COMPLEX PARAMETER PROPERTIES @@ -35,8 +35,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line @@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.voiceservices/update-azvoiceservicescommunicationsgateway #> function Update-AzVoiceServicesCommunicationsGateway { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -77,7 +77,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/src/VoiceServices/exports/Update-AzVoiceServicesCommunicationsTestLine.ps1 b/src/VoiceServices/exports/Update-AzVoiceServicesCommunicationsTestLine.ps1 index 2895ebfe3fb3..dfffbb79b89a 100644 --- a/src/VoiceServices/exports/Update-AzVoiceServicesCommunicationsTestLine.ps1 +++ b/src/VoiceServices/exports/Update-AzVoiceServicesCommunicationsTestLine.ps1 @@ -27,7 +27,7 @@ Get-AzVoiceServicesCommunicationsTestLine -ResourceGroupName vtest-communication .Inputs Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine +Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine .Notes COMPLEX PARAMETER PROPERTIES @@ -35,8 +35,8 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [CommunicationsGatewayName ]: Unique identifier for this deployment - [ContactName ]: Unique identifier for this contact [Id ]: Resource identity path + [Location ]: The location in which uniqueness will be verified. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TestLineName ]: Unique identifier for this test line @@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.voiceservices/update-azvoiceservicescommunicationstestline #> function Update-AzVoiceServicesCommunicationsTestLine { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -83,7 +83,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/src/VoiceServices/generate-info.json b/src/VoiceServices/generate-info.json index ecc3d327c287..e4b3c9cd0dca 100644 --- a/src/VoiceServices/generate-info.json +++ b/src/VoiceServices/generate-info.json @@ -1,8 +1,8 @@ { - "swagger_commit": "8bbdaa16bf2523c166b7933439e63ed945596a8b", + "swagger_commit": "794b03f1b40b6f7646528fbe06bcfce7b58223a9", "node": "v14.15.5", "autorest": "`-- (empty)", - "autorest_core": "3.9.3", + "autorest_core": "3.9.4", "autorest_modelerfour": "4.15.414", "autorest_powershell": "3.0.498" } diff --git a/src/VoiceServices/generated/api/MicrosoftVoiceServices.cs b/src/VoiceServices/generated/api/MicrosoftVoiceServices.cs index 1e7ed1646660..c701658b50b9 100644 --- a/src/VoiceServices/generated/api/MicrosoftVoiceServices.cs +++ b/src/VoiceServices/generated/api/MicrosoftVoiceServices.cs @@ -26,9 +26,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CommunicationsGatewaysCreateOrUpdate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CommunicationsGatewaysCreateOrUpdate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -72,9 +72,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CommunicationsGatewaysCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CommunicationsGatewaysCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -131,7 +131,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CommunicationsGatewaysCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CommunicationsGatewaysCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -245,7 +245,7 @@ public partial class MicrosoftVoiceServices case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGateway.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGateway.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -278,7 +278,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CommunicationsGatewaysCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task CommunicationsGatewaysCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -309,7 +309,7 @@ public partial class MicrosoftVoiceServices /// public async global::System.Threading.Tasks.Task CommunicationsGatewaysDelete(string subscriptionId, string resourceGroupName, string communicationsGatewayName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -351,7 +351,7 @@ public partial class MicrosoftVoiceServices /// public async global::System.Threading.Tasks.Task CommunicationsGatewaysDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -582,9 +582,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CommunicationsGatewaysGet(string subscriptionId, string resourceGroupName, string communicationsGatewayName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CommunicationsGatewaysGet(string subscriptionId, string resourceGroupName, string communicationsGatewayName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -623,9 +623,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CommunicationsGatewaysGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CommunicationsGatewaysGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -676,7 +676,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CommunicationsGatewaysGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CommunicationsGatewaysGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -694,7 +694,7 @@ public partial class MicrosoftVoiceServices case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGateway.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGateway.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -751,9 +751,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CommunicationsGatewaysListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CommunicationsGatewaysListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -791,9 +791,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CommunicationsGatewaysListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CommunicationsGatewaysListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -844,7 +844,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CommunicationsGatewaysListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CommunicationsGatewaysListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -862,7 +862,7 @@ public partial class MicrosoftVoiceServices case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -915,9 +915,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CommunicationsGatewaysListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CommunicationsGatewaysListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -953,9 +953,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CommunicationsGatewaysListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CommunicationsGatewaysListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1003,7 +1003,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CommunicationsGatewaysListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CommunicationsGatewaysListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1021,7 +1021,7 @@ public partial class MicrosoftVoiceServices case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1073,9 +1073,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CommunicationsGatewaysUpdate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CommunicationsGatewaysUpdate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1119,9 +1119,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CommunicationsGatewaysUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CommunicationsGatewaysUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1176,7 +1176,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CommunicationsGatewaysUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CommunicationsGatewaysUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1194,7 +1194,7 @@ public partial class MicrosoftVoiceServices case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGateway.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGateway.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -1227,7 +1227,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CommunicationsGatewaysUpdate_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task CommunicationsGatewaysUpdate_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1243,936 +1243,10 @@ public partial class MicrosoftVoiceServices } } - /// Create a Contact + /// Check whether the resource name is available in the given region. + /// The location in which uniqueness will be verified. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Unique identifier for this deployment - /// Unique identifier for this contact - /// Resource create parameters. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ContactsCreateOrUpdate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string contactName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.VoiceServices/communicationsGateways/" - + global::System.Uri.EscapeDataString(communicationsGatewayName) - + "/contacts/" - + global::System.Uri.EscapeDataString(contactName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ContactsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Create a Contact - /// - /// Resource create parameters. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ContactsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.VoiceServices/communicationsGateways/(?[^/]+)/contacts/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var communicationsGatewayName = _match.Groups["communicationsGatewayName"].Value; - var contactName = _match.Groups["contactName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.VoiceServices/communicationsGateways/" - + communicationsGatewayName - + "/contacts/" - + contactName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ContactsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ContactsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.Contact.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Unique identifier for this deployment - /// Unique identifier for this contact - /// Resource create parameters. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ContactsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string contactName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(communicationsGatewayName),communicationsGatewayName); - await eventListener.AssertRegEx(nameof(communicationsGatewayName),communicationsGatewayName,@"^[a-zA-Z0-9-]{3,24}$"); - await eventListener.AssertNotNull(nameof(contactName),contactName); - await eventListener.AssertRegEx(nameof(contactName),contactName,@"^[a-zA-Z0-9-]{3,24}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Delete a Contact - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Unique identifier for this deployment - /// Unique identifier for this contact - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ContactsDelete(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string contactName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.VoiceServices/communicationsGateways/" - + global::System.Uri.EscapeDataString(communicationsGatewayName) - + "/contacts/" - + global::System.Uri.EscapeDataString(contactName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ContactsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); - } - } - - /// Delete a Contact - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ContactsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.VoiceServices/communicationsGateways/(?[^/]+)/contacts/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var communicationsGatewayName = _match.Groups["communicationsGatewayName"].Value; - var contactName = _match.Groups["contactName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.VoiceServices/communicationsGateways/" - + communicationsGatewayName - + "/contacts/" - + contactName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ContactsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ContactsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Unique identifier for this deployment - /// Unique identifier for this contact - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ContactsDelete_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string contactName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(communicationsGatewayName),communicationsGatewayName); - await eventListener.AssertRegEx(nameof(communicationsGatewayName),communicationsGatewayName,@"^[a-zA-Z0-9-]{3,24}$"); - await eventListener.AssertNotNull(nameof(contactName),contactName); - await eventListener.AssertRegEx(nameof(contactName),contactName,@"^[a-zA-Z0-9-]{3,24}$"); - } - } - - /// Get a Contact - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Unique identifier for this deployment - /// Unique identifier for this contact - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ContactsGet(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string contactName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.VoiceServices/communicationsGateways/" - + global::System.Uri.EscapeDataString(communicationsGatewayName) - + "/contacts/" - + global::System.Uri.EscapeDataString(contactName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ContactsGet_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Get a Contact - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ContactsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.VoiceServices/communicationsGateways/(?[^/]+)/contacts/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var communicationsGatewayName = _match.Groups["communicationsGatewayName"].Value; - var contactName = _match.Groups["contactName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.VoiceServices/communicationsGateways/" - + communicationsGatewayName - + "/contacts/" - + contactName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ContactsGet_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ContactsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.Contact.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation events - /// back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Unique identifier for this deployment - /// Unique identifier for this contact - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ContactsGet_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string contactName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(communicationsGatewayName),communicationsGatewayName); - await eventListener.AssertRegEx(nameof(communicationsGatewayName),communicationsGatewayName,@"^[a-zA-Z0-9-]{3,24}$"); - await eventListener.AssertNotNull(nameof(contactName),contactName); - await eventListener.AssertRegEx(nameof(contactName),contactName,@"^[a-zA-Z0-9-]{3,24}$"); - } - } - - /// List Contact resources by CommunicationsGateway - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Unique identifier for this deployment - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ContactsListByCommunicationsGateway(string subscriptionId, string resourceGroupName, string communicationsGatewayName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.VoiceServices/communicationsGateways/" - + global::System.Uri.EscapeDataString(communicationsGatewayName) - + "/contacts" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ContactsListByCommunicationsGateway_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// List Contact resources by CommunicationsGateway - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task ContactsListByCommunicationsGatewayViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.VoiceServices/communicationsGateways/(?[^/]+)/contacts$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var communicationsGatewayName = _match.Groups["communicationsGatewayName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.VoiceServices/communicationsGateways/" - + communicationsGatewayName - + "/contacts" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ContactsListByCommunicationsGateway_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ContactsListByCommunicationsGateway_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Unique identifier for this deployment - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task ContactsListByCommunicationsGateway_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(communicationsGatewayName),communicationsGatewayName); - await eventListener.AssertRegEx(nameof(communicationsGatewayName),communicationsGatewayName,@"^[a-zA-Z0-9-]{3,24}$"); - } - } - - /// Update a Contact - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Unique identifier for this deployment - /// Unique identifier for this contact - /// The resource properties to be updated. + /// The check availability request body. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2181,9 +1255,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ContactsUpdate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string contactName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NameAvailabilityCheckLocal(string location, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2191,12 +1265,9 @@ public partial class MicrosoftVoiceServices var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.VoiceServices/communicationsGateways/" - + global::System.Uri.EscapeDataString(communicationsGatewayName) - + "/contacts/" - + global::System.Uri.EscapeDataString(contactName) + + "/providers/Microsoft.VoiceServices/locations/" + + global::System.Uri.EscapeDataString(location) + + "/checkNameAvailability" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2205,7 +1276,7 @@ public partial class MicrosoftVoiceServices // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -2214,13 +1285,13 @@ public partial class MicrosoftVoiceServices request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ContactsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.NameAvailabilityCheckLocal_Call(request,onOk,onDefault,eventListener,sender); } } - /// Update a Contact + /// Check whether the resource name is available in the given region. /// - /// The resource properties to be updated. + /// The check availability request body. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2229,35 +1300,30 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ContactsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NameAvailabilityCheckLocalViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.VoiceServices/communicationsGateways/(?[^/]+)/contacts/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.VoiceServices/locations/(?[^/]+)/checkNameAvailability$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.VoiceServices/locations/{location}/checkNameAvailability'"); } // replace URI parameters with values from identity + var location = _match.Groups["location"].Value; var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var communicationsGatewayName = _match.Groups["communicationsGatewayName"].Value; - var contactName = _match.Groups["contactName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.VoiceServices/communicationsGateways/" - + communicationsGatewayName - + "/contacts/" - + contactName + + "/providers/Microsoft.VoiceServices/locations/" + + location + + "/checkNameAvailability" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2266,7 +1332,7 @@ public partial class MicrosoftVoiceServices // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -2275,11 +1341,11 @@ public partial class MicrosoftVoiceServices request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ContactsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.NameAvailabilityCheckLocal_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2289,7 +1355,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ContactsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NameAvailabilityCheckLocal_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2307,7 +1373,7 @@ public partial class MicrosoftVoiceServices case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.Contact.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CheckNameAvailabilityResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2329,31 +1395,23 @@ public partial class MicrosoftVoiceServices } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// + /// The location in which uniqueness will be verified. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Unique identifier for this deployment - /// Unique identifier for this contact - /// The resource properties to be updated. + /// The check availability request body. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ContactsUpdate_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string contactName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NameAvailabilityCheckLocal_Validate(string location, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(location),location); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(communicationsGatewayName),communicationsGatewayName); - await eventListener.AssertRegEx(nameof(communicationsGatewayName),communicationsGatewayName,@"^[a-zA-Z0-9-]{3,24}$"); - await eventListener.AssertNotNull(nameof(contactName),contactName); - await eventListener.AssertRegEx(nameof(contactName),contactName,@"^[a-zA-Z0-9-]{3,24}$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -2370,7 +1428,7 @@ public partial class MicrosoftVoiceServices /// public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2406,7 +1464,7 @@ public partial class MicrosoftVoiceServices /// public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2518,9 +1576,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TestLinesCreateOrUpdate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TestLinesCreateOrUpdate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2566,9 +1624,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TestLinesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TestLinesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2626,7 +1684,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TestLinesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TestLinesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2740,7 +1798,7 @@ public partial class MicrosoftVoiceServices case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLine.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLine.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -2774,7 +1832,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TestLinesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TestLinesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2808,7 +1866,7 @@ public partial class MicrosoftVoiceServices /// public async global::System.Threading.Tasks.Task TestLinesDelete(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2852,7 +1910,7 @@ public partial class MicrosoftVoiceServices /// public async global::System.Threading.Tasks.Task TestLinesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3090,9 +2148,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TestLinesGet(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TestLinesGet(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3133,9 +2191,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TestLinesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TestLinesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3189,7 +2247,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TestLinesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TestLinesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3207,7 +2265,7 @@ public partial class MicrosoftVoiceServices case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLine.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLine.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -3268,9 +2326,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TestLinesListByCommunicationsGateway(string subscriptionId, string resourceGroupName, string communicationsGatewayName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TestLinesListByCommunicationsGateway(string subscriptionId, string resourceGroupName, string communicationsGatewayName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3310,9 +2368,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TestLinesListByCommunicationsGatewayViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TestLinesListByCommunicationsGatewayViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3366,7 +2424,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TestLinesListByCommunicationsGateway_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TestLinesListByCommunicationsGateway_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3384,7 +2442,7 @@ public partial class MicrosoftVoiceServices case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3444,9 +2502,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TestLinesUpdate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TestLinesUpdate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3492,9 +2550,9 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TestLinesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TestLinesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { - var apiVersion = @"2022-12-01-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3552,7 +2610,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TestLinesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TestLinesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3570,7 +2628,7 @@ public partial class MicrosoftVoiceServices case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLine.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLine.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -3604,7 +2662,7 @@ public partial class MicrosoftVoiceServices /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TestLinesUpdate_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TestLinesUpdate_Validate(string subscriptionId, string resourceGroupName, string communicationsGatewayName, string testLineName, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.PowerShell.cs deleted file mode 100644 index 901e4f6ea69f..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.PowerShell.cs +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - - /// Details of the CommunicationsGateway resource. - [System.ComponentModel.TypeConverter(typeof(CommunicationsGatewayPropertiesTypeConverter))] - public partial class CommunicationsGatewayProperties - { - - /// - /// 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 CommunicationsGatewayProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status.CreateFrom); - } - if (content.Contains("ServiceLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ServiceLocation = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[]) content.GetValueForProperty("ServiceLocation",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ServiceLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("Connectivity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Connectivity = (string) content.GetValueForProperty("Connectivity",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Connectivity, global::System.Convert.ToString); - } - if (content.Contains("Codec")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Codec = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[]) content.GetValueForProperty("Codec",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Codec, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs.CreateFrom)); - } - if (content.Contains("E911Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).E911Type = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type) content.GetValueForProperty("E911Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).E911Type, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type.CreateFrom); - } - if (content.Contains("Platform")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Platform = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[]) content.GetValueForProperty("Platform",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Platform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform.CreateFrom)); - } - if (content.Contains("ApiBridge")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ApiBridge = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties) content.GetValueForProperty("ApiBridge",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ApiBridge, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ApiBridgePropertiesTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal CommunicationsGatewayProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status.CreateFrom); - } - if (content.Contains("ServiceLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ServiceLocation = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[]) content.GetValueForProperty("ServiceLocation",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ServiceLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("Connectivity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Connectivity = (string) content.GetValueForProperty("Connectivity",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Connectivity, global::System.Convert.ToString); - } - if (content.Contains("Codec")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Codec = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[]) content.GetValueForProperty("Codec",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Codec, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs.CreateFrom)); - } - if (content.Contains("E911Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).E911Type = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type) content.GetValueForProperty("E911Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).E911Type, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type.CreateFrom); - } - if (content.Contains("Platform")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Platform = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[]) content.GetValueForProperty("Platform",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).Platform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform.CreateFrom)); - } - if (content.Contains("ApiBridge")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ApiBridge = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties) content.GetValueForProperty("ApiBridge",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)this).ApiBridge, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ApiBridgePropertiesTypeConverter.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.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CommunicationsGatewayProperties(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.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CommunicationsGatewayProperties(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.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Details of the CommunicationsGateway resource. - [System.ComponentModel.TypeConverter(typeof(CommunicationsGatewayPropertiesTypeConverter))] - public partial interface ICommunicationsGatewayProperties - - { - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.PowerShell.cs deleted file mode 100644 index 0fd07d67dd08..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.PowerShell.cs +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - - /// A Contact resource - [System.ComponentModel.TypeConverter(typeof(ContactTypeConverter))] - public partial class Contact - { - - /// - /// 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 Contact(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.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ContactName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).ContactName = (string) content.GetValueForProperty("ContactName",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).ContactName, global::System.Convert.ToString); - } - if (content.Contains("PhoneNumber")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).PhoneNumber, global::System.Convert.ToString); - } - if (content.Contains("Email")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Email = (string) content.GetValueForProperty("Email",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Email, global::System.Convert.ToString); - } - if (content.Contains("Role")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Role, 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 Contact(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.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ContactName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).ContactName = (string) content.GetValueForProperty("ContactName",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).ContactName, global::System.Convert.ToString); - } - if (content.Contains("PhoneNumber")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).PhoneNumber, global::System.Convert.ToString); - } - if (content.Contains("Email")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Email = (string) content.GetValueForProperty("Email",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Email, global::System.Convert.ToString); - } - if (content.Contains("Role")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).Role, 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.VoiceServices.Models.Api20221201Preview.IContact DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Contact(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.VoiceServices.Models.Api20221201Preview.IContact DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Contact(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.VoiceServices.Models.Api20221201Preview.IContact FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// A Contact resource - [System.ComponentModel.TypeConverter(typeof(ContactTypeConverter))] - public partial interface IContact - - { - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.TypeConverter.cs deleted file mode 100644 index 52e886a51341..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.TypeConverter.cs +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ContactTypeConverter : 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.VoiceServices.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Models.Api20221201Preview.IContact ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Contact.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Contact.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Contact.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/VoiceServices/generated/api/Models/Api20221201Preview/Contact.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.cs deleted file mode 100644 index e99b1bde6934..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.cs +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - /// A Contact resource - public partial class Contact : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IValidates, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IHeaderSerializable - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.TrackedResource(); - - /// Full name of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public string ContactName { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).ContactName; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).ContactName = value ?? null; } - - /// Email address of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public string Email { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).Email; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).Email = value ?? null; } - - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Id; } - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)__trackedResource).Location = value ; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Name; } - - /// Telephone number of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public string PhoneNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).PhoneNumber; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).PhoneNumber = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties _property; - - /// The resource-specific properties for this resource. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactProperties()); set => this._property = value; } - - /// Resource provisioning state. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).ProvisioningState; } - - /// Gets the resource group name - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } - - /// Backing field for property. - private int? _retryAfter; - - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } - - /// Job title of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public string Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)Property).Role = value ?? null; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CreatedByType)""); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Type; } - - /// Creates an new instance. - public Contact() - { - - } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Retry-After", out var __retryAfterHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); - } - } - - /// 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.VoiceServices.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); - await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); - } - } - /// A Contact resource - public partial interface IContact : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResource - { - /// Full name of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Full name of contact", - SerializedName = @"contactName", - PossibleTypes = new [] { typeof(string) })] - string ContactName { get; set; } - /// Email address of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Email address of contact", - SerializedName = @"email", - PossibleTypes = new [] { typeof(string) })] - string Email { get; set; } - /// Telephone number of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Telephone number of contact", - SerializedName = @"phoneNumber", - PossibleTypes = new [] { typeof(string) })] - string PhoneNumber { get; set; } - /// Resource provisioning state. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource provisioning state.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get; } - - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Retry-After", - PossibleTypes = new [] { typeof(int) })] - int? RetryAfter { get; set; } - /// Job title of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Job title of contact", - SerializedName = @"role", - PossibleTypes = new [] { typeof(string) })] - string Role { get; set; } - - } - /// A Contact resource - internal partial interface IContactInternal : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal - { - /// Full name of contact - string ContactName { get; set; } - /// Email address of contact - string Email { get; set; } - /// Telephone number of contact - string PhoneNumber { get; set; } - /// The resource-specific properties for this resource. - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties Property { get; set; } - /// Resource provisioning state. - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get; set; } - - int? RetryAfter { get; set; } - /// Job title of contact - string Role { get; set; } - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.TypeConverter.cs deleted file mode 100644 index 0412a1f61716..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.TypeConverter.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ContactListResultTypeConverter : 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.VoiceServices.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Models.Api20221201Preview.IContactListResult ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResult).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ContactListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ContactListResult.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ContactListResult.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/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.cs deleted file mode 100644 index 569e26109bba..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - /// The response of a Contact list operation. - public partial class ContactListResult : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResult, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResultInternal - { - - /// Backing field for property. - private string _nextLink; - - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; set => this._nextLink = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact[] _value; - - /// The Contact items on this page - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact[] Value { get => this._value; set => this._value = value; } - - /// Creates an new instance. - public ContactListResult() - { - - } - } - /// The response of a Contact list operation. - public partial interface IContactListResult : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IJsonSerializable - { - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The link to the next page of items", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; set; } - /// The Contact items on this page - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Contact items on this page", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact[] Value { get; set; } - - } - /// The response of a Contact list operation. - internal partial interface IContactListResultInternal - - { - /// The link to the next page of items - string NextLink { get; set; } - /// The Contact items on this page - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.json.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.json.cs deleted file mode 100644 index 4fdfce8a5795..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.json.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - /// The response of a Contact list operation. - public partial class ContactListResult - { - - /// - /// 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.VoiceServices.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.VoiceServices.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.VoiceServices.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.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject instance to deserialize from. - internal ContactListResult(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact) (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.Contact.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResult. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResult. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new ContactListResult(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.VoiceServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.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.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.PowerShell.cs deleted file mode 100644 index e5f17e2db9c1..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.PowerShell.cs +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - - /// Details of the Contact resource. - [System.ComponentModel.TypeConverter(typeof(ContactPropertiesTypeConverter))] - public partial class ContactProperties - { - - /// - /// 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 ContactProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ContactName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).ContactName = (string) content.GetValueForProperty("ContactName",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).ContactName, global::System.Convert.ToString); - } - if (content.Contains("PhoneNumber")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).PhoneNumber, global::System.Convert.ToString); - } - if (content.Contains("Email")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).Email = (string) content.GetValueForProperty("Email",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).Email, global::System.Convert.ToString); - } - if (content.Contains("Role")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).Role, 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 ContactProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ContactName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).ContactName = (string) content.GetValueForProperty("ContactName",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).ContactName, global::System.Convert.ToString); - } - if (content.Contains("PhoneNumber")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).PhoneNumber, global::System.Convert.ToString); - } - if (content.Contains("Email")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).Email = (string) content.GetValueForProperty("Email",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).Email, global::System.Convert.ToString); - } - if (content.Contains("Role")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal)this).Role, 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.VoiceServices.Models.Api20221201Preview.IContactProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ContactProperties(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.VoiceServices.Models.Api20221201Preview.IContactProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ContactProperties(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.VoiceServices.Models.Api20221201Preview.IContactProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Details of the Contact resource. - [System.ComponentModel.TypeConverter(typeof(ContactPropertiesTypeConverter))] - public partial interface IContactProperties - - { - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.TypeConverter.cs deleted file mode 100644 index e26e9b0fe9bc..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.TypeConverter.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ContactPropertiesTypeConverter : 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.VoiceServices.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Models.Api20221201Preview.IContactProperties ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ContactProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ContactProperties.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ContactProperties.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/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.cs deleted file mode 100644 index 2f03c8cb9627..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - /// Details of the Contact resource. - public partial class ContactProperties : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal - { - - /// Backing field for property. - private string _contactName; - - /// Full name of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public string ContactName { get => this._contactName; set => this._contactName = value; } - - /// Backing field for property. - private string _email; - - /// Email address of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public string Email { get => this._email; set => this._email = value; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Backing field for property. - private string _phoneNumber; - - /// Telephone number of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public string PhoneNumber { get => this._phoneNumber; set => this._phoneNumber = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? _provisioningState; - - /// Resource provisioning state. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Backing field for property. - private string _role; - - /// Job title of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public string Role { get => this._role; set => this._role = value; } - - /// Creates an new instance. - public ContactProperties() - { - - } - } - /// Details of the Contact resource. - public partial interface IContactProperties : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IJsonSerializable - { - /// Full name of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Full name of contact", - SerializedName = @"contactName", - PossibleTypes = new [] { typeof(string) })] - string ContactName { get; set; } - /// Email address of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Email address of contact", - SerializedName = @"email", - PossibleTypes = new [] { typeof(string) })] - string Email { get; set; } - /// Telephone number of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Telephone number of contact", - SerializedName = @"phoneNumber", - PossibleTypes = new [] { typeof(string) })] - string PhoneNumber { get; set; } - /// Resource provisioning state. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource provisioning state.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get; } - /// Job title of contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Job title of contact", - SerializedName = @"role", - PossibleTypes = new [] { typeof(string) })] - string Role { get; set; } - - } - /// Details of the Contact resource. - internal partial interface IContactPropertiesInternal - - { - /// Full name of contact - string ContactName { get; set; } - /// Email address of contact - string Email { get; set; } - /// Telephone number of contact - string PhoneNumber { get; set; } - /// Resource provisioning state. - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get; set; } - /// Job title of contact - string Role { get; set; } - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.json.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.json.cs deleted file mode 100644 index ee9c55c48993..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactProperties.json.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - /// Details of the Contact resource. - public partial class ContactProperties - { - - /// - /// 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.VoiceServices.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.VoiceServices.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.VoiceServices.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.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject instance to deserialize from. - internal ContactProperties(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_contactName = If( json?.PropertyT("contactName"), out var __jsonContactName) ? (string)__jsonContactName : (string)ContactName;} - {_phoneNumber = If( json?.PropertyT("phoneNumber"), out var __jsonPhoneNumber) ? (string)__jsonPhoneNumber : (string)PhoneNumber;} - {_email = If( json?.PropertyT("email"), out var __jsonEmail) ? (string)__jsonEmail : (string)Email;} - {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)Role;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new ContactProperties(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.VoiceServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); - } - AddIf( null != (((object)this._contactName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._contactName.ToString()) : null, "contactName" ,container.Add ); - AddIf( null != (((object)this._phoneNumber)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._phoneNumber.ToString()) : null, "phoneNumber" ,container.Add ); - AddIf( null != (((object)this._email)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._email.ToString()) : null, "email" ,container.Add ); - AddIf( null != (((object)this._role)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._role.ToString()) : null, "role" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.PowerShell.cs deleted file mode 100644 index 344d787de31e..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.PowerShell.cs +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - - /// The type used for update operations of the Contact. - [System.ComponentModel.TypeConverter(typeof(ContactUpdateTypeConverter))] - public partial class ContactUpdate - { - - /// - /// 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 ContactUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactUpdateTagsTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ContactUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactUpdateTagsTypeConverter.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.VoiceServices.Models.Api20221201Preview.IContactUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ContactUpdate(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.VoiceServices.Models.Api20221201Preview.IContactUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ContactUpdate(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.VoiceServices.Models.Api20221201Preview.IContactUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.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 type used for update operations of the Contact. - [System.ComponentModel.TypeConverter(typeof(ContactUpdateTypeConverter))] - public partial interface IContactUpdate - - { - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.cs deleted file mode 100644 index ed39d4819d25..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - /// The type used for update operations of the Contact. - public partial class ContactUpdate : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdate, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags _tag; - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactUpdateTags()); set => this._tag = value; } - - /// Creates an new instance. - public ContactUpdate() - { - - } - } - /// The type used for update operations of the Contact. - public partial interface IContactUpdate : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IJsonSerializable - { - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags Tag { get; set; } - - } - /// The type used for update operations of the Contact. - internal partial interface IContactUpdateInternal - - { - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags Tag { get; set; } - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.PowerShell.cs deleted file mode 100644 index 06bb38de07be..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.PowerShell.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - - /// Resource tags. - [System.ComponentModel.TypeConverter(typeof(ContactUpdateTagsTypeConverter))] - public partial class ContactUpdateTags - { - - /// - /// 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 ContactUpdateTags(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - // this type is a dictionary; copy elements from source to here. - CopyFrom(content); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ContactUpdateTags(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - // this type is a dictionary; copy elements from source to here. - CopyFrom(content); - AfterDeserializePSObject(content); - } - - /// - /// 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.VoiceServices.Models.Api20221201Preview.IContactUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ContactUpdateTags(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.VoiceServices.Models.Api20221201Preview.IContactUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ContactUpdateTags(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.VoiceServices.Models.Api20221201Preview.IContactUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Resource tags. - [System.ComponentModel.TypeConverter(typeof(ContactUpdateTagsTypeConverter))] - public partial interface IContactUpdateTags - - { - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.cs deleted file mode 100644 index 7f247dca19ff..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - /// Resource tags. - public partial class ContactUpdateTags : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTagsInternal - { - - /// Creates an new instance. - public ContactUpdateTags() - { - - } - } - /// Resource tags. - public partial interface IContactUpdateTags : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IAssociativeArray - { - - } - /// Resource tags. - internal partial interface IContactUpdateTagsInternal - - { - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.dictionary.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.dictionary.cs deleted file mode 100644 index 27512751ba3c..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.dictionary.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - public partial class ContactUpdateTags : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IAssociativeArray - { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - - int Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - - public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } - - /// - /// - public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); - - public void Clear() => __additionalProperties.Clear(); - - /// - public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); - - /// - public void CopyFrom(global::System.Collections.IDictionary source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) - { - if ((null != property.Key && null != property.Value)) - { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); - } - } - } - } - - /// - public void CopyFrom(global::System.Management.Automation.PSObject source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) - { - if ((null != property.Key && null != property.Value)) - { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); - } - } - } - } - - /// - public bool Remove(global::System.String key) => __additionalProperties.Remove( key); - - /// - /// - public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); - - /// - - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactUpdateTags source) => source.__additionalProperties; - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.json.cs b/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.json.cs deleted file mode 100644 index 90cbf6ec861d..000000000000 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.json.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - /// Resource tags. - public partial class ContactUpdateTags - { - - /// - /// 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.VoiceServices.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.VoiceServices.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.VoiceServices.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.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject instance to deserialize from. - /// - internal ContactUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new ContactUpdateTags(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.VoiceServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IAssociativeArray)this).AdditionalProperties, container); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.PowerShell.cs similarity index 89% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.PowerShell.cs index 5826ea5cedb0..56b1c3acff2a 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ApiBridgeProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -82,7 +82,7 @@ internal ApiBridgeProperties(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -101,29 +101,27 @@ internal ApiBridgeProperties(global::System.Management.Automation.PSObject conte } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ApiBridgeProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ApiBridgeProperties(content); } @@ -133,7 +131,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.TypeConverter.cs index 381ce1501a11..b6778bbcb94d 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.cs b/src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.cs similarity index 92% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.cs rename to src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.cs index dcf7d070f7a2..935891356315 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// Details of API bridge functionality. public partial class ApiBridgeProperties : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgePropertiesInternal { /// Creates an new instance. diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.dictionary.cs b/src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.dictionary.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.dictionary.cs rename to src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.dictionary.cs index c874729df385..72776aa625e6 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.dictionary.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ApiBridgeProperties source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ApiBridgeProperties source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.json.cs similarity index 96% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.json.cs index ab5ecdc522b3..391ee2239c71 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ApiBridgeProperties.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/ApiBridgeProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -71,13 +71,13 @@ internal ApiBridgeProperties(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Ru } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new ApiBridgeProperties(json) : null; } diff --git a/src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.PowerShell.cs similarity index 67% rename from src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.PowerShell.cs index e723618434cf..14c1d216d4a9 100644 --- a/src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.PowerShell.cs @@ -3,12 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - [System.ComponentModel.TypeConverter(typeof(ContactsDeleteAcceptedResponseHeadersTypeConverter))] - public partial class ContactsDeleteAcceptedResponseHeaders + /// The check availability request body. + [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityRequestTypeConverter))] + public partial class CheckNameAvailabilityRequest { /// @@ -62,11 +63,11 @@ public partial class ContactsDeleteAcceptedResponseHeaders partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal ContactsDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + internal CheckNameAvailabilityRequest(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -75,19 +76,23 @@ internal ContactsDeleteAcceptedResponseHeaders(global::System.Collections.IDicti return; } // actually deserialize - if (content.Contains("RetryAfter")) + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequestInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal ContactsDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + internal CheckNameAvailabilityRequest(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -96,50 +101,51 @@ internal ContactsDeleteAcceptedResponseHeaders(global::System.Management.Automat return; } // actually deserialize - if (content.Contains("RetryAfter")) + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequestInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ContactsDeleteAcceptedResponseHeaders(content); + return new CheckNameAvailabilityRequest(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ContactsDeleteAcceptedResponseHeaders(content); + return new CheckNameAvailabilityRequest(content); } /// - /// Creates a new instance of , deserializing the content from a json - /// string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -158,8 +164,9 @@ public override string ToString() return ToJsonString(); } } - [System.ComponentModel.TypeConverter(typeof(ContactsDeleteAcceptedResponseHeadersTypeConverter))] - public partial interface IContactsDeleteAcceptedResponseHeaders + /// The check availability request body. + [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityRequestTypeConverter))] + public partial interface ICheckNameAvailabilityRequest { diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.TypeConverter.cs similarity index 83% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.TypeConverter.cs index 26dfdf53bd26..37a4b1c38a57 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.TypeConverter.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ContactUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class CheckNameAvailabilityRequestTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class ContactUpdateTypeConverter : global::System.Management.Auto public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// not used by this TypeConverter. /// when set to true, will ignore the case when converting. /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter into an instance of + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest).IsAssignableFrom(type)) { return sourceValue; } try { - return ContactUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return CheckNameAvailabilityRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ContactUpdate.DeserializeFromPSObject(sourceValue); + return CheckNameAvailabilityRequest.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ContactUpdate.DeserializeFromDictionary(sourceValue); + return CheckNameAvailabilityRequest.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.cs b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.cs new file mode 100644 index 000000000000..a2d13a991aa2 --- /dev/null +++ b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; + + /// The check availability request body. + public partial class CheckNameAvailabilityRequest : + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequestInternal + { + + /// Backing field for property. + private string _name; + + /// The name of the resource for which availability needs to be checked. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _type; + + /// The resource type. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public CheckNameAvailabilityRequest() + { + + } + } + /// The check availability request body. + public partial interface ICheckNameAvailabilityRequest : + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IJsonSerializable + { + /// The name of the resource for which availability needs to be checked. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the resource for which availability needs to be checked.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The resource type. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The resource type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + + } + /// The check availability request body. + internal partial interface ICheckNameAvailabilityRequestInternal + + { + /// The name of the resource for which availability needs to be checked. + string Name { get; set; } + /// The resource type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.json.cs similarity index 75% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.json.cs index 621c0ef3d0e2..dbe142a1eb67 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdate.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityRequest.json.cs @@ -3,12 +3,12 @@ // 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.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - /// The type used for update operations of the Contact. - public partial class ContactUpdate + /// The check availability request body. + public partial class CheckNameAvailabilityRequest { /// @@ -54,10 +54,10 @@ public partial class ContactUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject instance to deserialize from. - internal ContactUpdate(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json) + internal CheckNameAvailabilityRequest(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -65,30 +65,31 @@ internal ContactUpdate(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime. { return; } - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactUpdateTags.FromJson(__jsonTags) : Tag;} + {_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.VoiceServices.Models.Api20221201Preview.IContactUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new ContactUpdate(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new CheckNameAvailabilityRequest(json) : null; } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SerializationMode serializationMode) { @@ -100,7 +101,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode To { return container; } - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.PowerShell.cs similarity index 61% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.PowerShell.cs index e01e335c7499..86104e98bb7c 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactListResult.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.PowerShell.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - /// The response of a Contact list operation. - [System.ComponentModel.TypeConverter(typeof(ContactListResultTypeConverter))] - public partial class ContactListResult + /// The check availability result. + [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityResponseTypeConverter))] + public partial class CheckNameAvailabilityResponse { /// @@ -63,11 +63,11 @@ public partial class ContactListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal ContactListResult(global::System.Collections.IDictionary content) + internal CheckNameAvailabilityResponse(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -76,23 +76,27 @@ internal ContactListResult(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Value")) + if (content.Contains("NameAvailable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("NextLink")) + if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).Reason = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason?) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).Reason, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason.CreateFrom); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal ContactListResult(global::System.Management.Automation.PSObject content) + internal CheckNameAvailabilityResponse(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -101,51 +105,55 @@ internal ContactListResult(global::System.Management.Automation.PSObject content return; } // actually deserialize - if (content.Contains("Value")) + if (content.Contains("NameAvailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).Reason = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason?) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).Reason, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason.CreateFrom); } - if (content.Contains("NextLink")) + if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ContactListResult(content); + return new CheckNameAvailabilityResponse(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ContactListResult(content); + return new CheckNameAvailabilityResponse(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -164,9 +172,9 @@ public override string ToString() return ToJsonString(); } } - /// The response of a Contact list operation. - [System.ComponentModel.TypeConverter(typeof(ContactListResultTypeConverter))] - public partial interface IContactListResult + /// The check availability result. + [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityResponseTypeConverter))] + public partial interface ICheckNameAvailabilityResponse { diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.TypeConverter.cs similarity index 83% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.TypeConverter.cs index 24865b14135e..8e1a35b4b837 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ContactUpdateTags.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.TypeConverter.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ContactUpdateTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class CheckNameAvailabilityResponseTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class ContactUpdateTagsTypeConverter : global::System.Management. public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// not used by this TypeConverter. /// when set to true, will ignore the case when converting. /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter into an instance of + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse).IsAssignableFrom(type)) { return sourceValue; } try { - return ContactUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return CheckNameAvailabilityResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ContactUpdateTags.DeserializeFromPSObject(sourceValue); + return CheckNameAvailabilityResponse.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ContactUpdateTags.DeserializeFromDictionary(sourceValue); + return CheckNameAvailabilityResponse.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.cs b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.cs new file mode 100644 index 000000000000..c14027287b9b --- /dev/null +++ b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.cs @@ -0,0 +1,85 @@ +// 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.VoiceServices.Models.Api20230131 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; + + /// The check availability result. + public partial class CheckNameAvailabilityResponse : + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponseInternal + { + + /// Backing field for property. + private string _message; + + /// Detailed reason why the given name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private bool? _nameAvailable; + + /// Indicates if the resource name is available. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public bool? NameAvailable { get => this._nameAvailable; set => this._nameAvailable = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason? _reason; + + /// The reason why the given name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason? Reason { get => this._reason; set => this._reason = value; } + + /// Creates an new instance. + public CheckNameAvailabilityResponse() + { + + } + } + /// The check availability result. + public partial interface ICheckNameAvailabilityResponse : + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IJsonSerializable + { + /// Detailed reason why the given name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Detailed reason why the given name is not available.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Indicates if the resource name is available. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the resource name is available.", + SerializedName = @"nameAvailable", + PossibleTypes = new [] { typeof(bool) })] + bool? NameAvailable { get; set; } + /// The reason why the given name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The reason why the given name is not available.", + SerializedName = @"reason", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason? Reason { get; set; } + + } + /// The check availability result. + internal partial interface ICheckNameAvailabilityResponseInternal + + { + /// Detailed reason why the given name is not available. + string Message { get; set; } + /// Indicates if the resource name is available. + bool? NameAvailable { get; set; } + /// The reason why the given name is not available. + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason? Reason { get; set; } + + } +} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.json.cs similarity index 71% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.json.cs index 4de4aa2ad235..6849aa778765 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/Contact.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CheckNameAvailabilityResponse.json.cs @@ -3,12 +3,12 @@ // 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.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - /// A Contact resource - public partial class Contact + /// The check availability result. + public partial class CheckNameAvailabilityResponse { /// @@ -54,10 +54,10 @@ public partial class Contact partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject instance to deserialize from. - internal Contact(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json) + internal CheckNameAvailabilityResponse(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -65,31 +65,32 @@ internal Contact(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.J { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactProperties.FromJson(__jsonProperties) : Property;} + {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : NameAvailable;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new Contact(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new CheckNameAvailabilityResponse(json) : null; } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SerializationMode serializationMode) { @@ -101,8 +102,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode To { return container; } - __trackedResource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._nameAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonBoolean((bool)this._nameAvailable) : null, "nameAvailable" ,container.Add ); + AddIf( null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.PowerShell.cs similarity index 59% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.PowerShell.cs index a5dfe984a07e..ca335db3ee46 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CommunicationsGateway partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,11 +78,11 @@ internal CommunicationsGateway(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayPropertiesTypeConverter.ConvertFrom); } if (content.Contains("RetryAfter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SystemDataCreatedBy")) { @@ -134,41 +134,61 @@ internal CommunicationsGateway(global::System.Collections.IDictionary content) } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status.CreateFrom); } if (content.Contains("Connectivity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Connectivity = (string) content.GetValueForProperty("Connectivity",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Connectivity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Connectivity = (string) content.GetValueForProperty("Connectivity",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Connectivity, global::System.Convert.ToString); } if (content.Contains("E911Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).E911Type = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type) content.GetValueForProperty("E911Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).E911Type, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).E911Type = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type) content.GetValueForProperty("E911Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).E911Type, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type.CreateFrom); } if (content.Contains("ServiceLocation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ServiceLocation = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[]) content.GetValueForProperty("ServiceLocation",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ServiceLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ServiceLocation = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[]) content.GetValueForProperty("ServiceLocation",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ServiceLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionPropertiesTypeConverter.ConvertFrom)); } if (content.Contains("Codec")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Codec = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[]) content.GetValueForProperty("Codec",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Codec, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Codec = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[]) content.GetValueForProperty("Codec",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Codec, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs.CreateFrom)); } if (content.Contains("Platform")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Platform = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[]) content.GetValueForProperty("Platform",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Platform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Platform = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[]) content.GetValueForProperty("Platform",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Platform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform.CreateFrom)); } if (content.Contains("ApiBridge")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ApiBridge = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties) content.GetValueForProperty("ApiBridge",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ApiBridge, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ApiBridgePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ApiBridge = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties) content.GetValueForProperty("ApiBridge",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ApiBridge, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ApiBridgePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AutoGeneratedDomainNameLabelScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).AutoGeneratedDomainNameLabelScope = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope?) content.GetValueForProperty("AutoGeneratedDomainNameLabelScope",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).AutoGeneratedDomainNameLabelScope, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope.CreateFrom); + } + if (content.Contains("AutoGeneratedDomainNameLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).AutoGeneratedDomainNameLabel = (string) content.GetValueForProperty("AutoGeneratedDomainNameLabel",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).AutoGeneratedDomainNameLabel, global::System.Convert.ToString); + } + if (content.Contains("TeamsVoicemailPilotNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).TeamsVoicemailPilotNumber = (string) content.GetValueForProperty("TeamsVoicemailPilotNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).TeamsVoicemailPilotNumber, global::System.Convert.ToString); + } + if (content.Contains("OnPremMcpEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).OnPremMcpEnabled = (bool?) content.GetValueForProperty("OnPremMcpEnabled",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).OnPremMcpEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EmergencyDialString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).EmergencyDialString = (string[]) content.GetValueForProperty("EmergencyDialString",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).EmergencyDialString, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -183,11 +203,11 @@ internal CommunicationsGateway(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayPropertiesTypeConverter.ConvertFrom); } if (content.Contains("RetryAfter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SystemDataCreatedBy")) { @@ -239,63 +259,83 @@ internal CommunicationsGateway(global::System.Management.Automation.PSObject con } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status.CreateFrom); } if (content.Contains("Connectivity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Connectivity = (string) content.GetValueForProperty("Connectivity",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Connectivity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Connectivity = (string) content.GetValueForProperty("Connectivity",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Connectivity, global::System.Convert.ToString); } if (content.Contains("E911Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).E911Type = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type) content.GetValueForProperty("E911Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).E911Type, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).E911Type = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type) content.GetValueForProperty("E911Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).E911Type, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type.CreateFrom); } if (content.Contains("ServiceLocation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ServiceLocation = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[]) content.GetValueForProperty("ServiceLocation",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ServiceLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ServiceLocation = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[]) content.GetValueForProperty("ServiceLocation",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ServiceLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionPropertiesTypeConverter.ConvertFrom)); } if (content.Contains("Codec")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Codec = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[]) content.GetValueForProperty("Codec",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Codec, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Codec = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[]) content.GetValueForProperty("Codec",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Codec, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs.CreateFrom)); } if (content.Contains("Platform")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Platform = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[]) content.GetValueForProperty("Platform",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).Platform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Platform = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[]) content.GetValueForProperty("Platform",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).Platform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform.CreateFrom)); } if (content.Contains("ApiBridge")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ApiBridge = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties) content.GetValueForProperty("ApiBridge",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).ApiBridge, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ApiBridgePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ApiBridge = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties) content.GetValueForProperty("ApiBridge",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).ApiBridge, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ApiBridgePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AutoGeneratedDomainNameLabelScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).AutoGeneratedDomainNameLabelScope = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope?) content.GetValueForProperty("AutoGeneratedDomainNameLabelScope",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).AutoGeneratedDomainNameLabelScope, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope.CreateFrom); + } + if (content.Contains("AutoGeneratedDomainNameLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).AutoGeneratedDomainNameLabel = (string) content.GetValueForProperty("AutoGeneratedDomainNameLabel",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).AutoGeneratedDomainNameLabel, global::System.Convert.ToString); + } + if (content.Contains("TeamsVoicemailPilotNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).TeamsVoicemailPilotNumber = (string) content.GetValueForProperty("TeamsVoicemailPilotNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).TeamsVoicemailPilotNumber, global::System.Convert.ToString); + } + if (content.Contains("OnPremMcpEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).OnPremMcpEnabled = (bool?) content.GetValueForProperty("OnPremMcpEnabled",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).OnPremMcpEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EmergencyDialString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).EmergencyDialString = (string[]) content.GetValueForProperty("EmergencyDialString",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).EmergencyDialString, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CommunicationsGateway(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CommunicationsGateway(content); } @@ -305,7 +345,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.TypeConverter.cs index cb18ad482c7a..6d8110b49557 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.cs similarity index 64% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.cs index f7828ea5d332..9e4ee6d6c099 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// A CommunicationsGateway resource public partial class CommunicationsGateway : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IValidates, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IHeaderSerializable { @@ -22,19 +22,33 @@ public partial class CommunicationsGateway : /// Details of API bridge functionality, if required [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties ApiBridge { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).ApiBridge; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).ApiBridge = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties ApiBridge { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).ApiBridge; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).ApiBridge = value ?? null /* model class */; } + + /// + /// The autogenerated label used as part of the FQDNs for accessing the Communications Gateway + /// + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] + public string AutoGeneratedDomainNameLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).AutoGeneratedDomainNameLabel; } + + /// The scope at which the auto-generated domain name can be re-used + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).AutoGeneratedDomainNameLabelScope; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).AutoGeneratedDomainNameLabelScope = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope)""); } /// Voice codecs to support [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[] Codec { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).Codec; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).Codec = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[] Codec { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).Codec; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).Codec = value ?? null /* arrayOf */; } /// How to connect back to the operator network, e.g. MAPS [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public string Connectivity { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).Connectivity; } + public string Connectivity { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).Connectivity; } /// How to handle 911 calls [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type? E911Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).E911Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).E911Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type)""); } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type? E911Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).E911Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).E911Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type)""); } + + /// A list of dial strings used for emergency calling. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] + public string[] EmergencyDialString { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).EmergencyDialString; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).EmergencyDialString = value ?? null /* arrayOf */; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -46,17 +60,20 @@ public partial class CommunicationsGateway : [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)__trackedResource).Location = value ; } + /// Internal Acessors for AutoGeneratedDomainNameLabel + string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal.AutoGeneratedDomainNameLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).AutoGeneratedDomainNameLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).AutoGeneratedDomainNameLabel = value; } + /// Internal Acessors for Connectivity - string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal.Connectivity { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).Connectivity; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).Connectivity = value; } + string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal.Connectivity { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).Connectivity; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).Connectivity = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Status - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).Status = value; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).Status = value; } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Id = value; } @@ -74,20 +91,24 @@ public partial class CommunicationsGateway : [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Name; } + /// Whether an on-premises Mobile Control Point is in use. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] + public bool? OnPremMcpEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).OnPremMcpEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).OnPremMcpEnabled = value ?? default(bool); } + /// What platforms to support [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[] Platform { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).Platform; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).Platform = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[] Platform { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).Platform; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).Platform = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties _property; /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayProperties()); set => this._property = value; } /// Resource provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).ProvisioningState; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] @@ -101,11 +122,11 @@ public partial class CommunicationsGateway : /// The regions in which to deploy the resources needed for Teams Calling [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[] ServiceLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).ServiceLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).ServiceLocation = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[] ServiceLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).ServiceLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).ServiceLocation = value ?? null /* arrayOf */; } /// The current status of the deployment. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal)Property).Status; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).Status; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -141,6 +162,12 @@ public partial class CommunicationsGateway : [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inherited)] public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + /// + /// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] + public string TeamsVoicemailPilotNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).TeamsVoicemailPilotNumber; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)Property).TeamsVoicemailPilotNumber = value ?? null; } + /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// @@ -158,7 +185,7 @@ void Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IHeaderSerializabl { if (headers.TryGetValues("Retry-After", out var __retryAfterHeader0)) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); } } @@ -185,8 +212,26 @@ public partial interface ICommunicationsGateway : ReadOnly = false, Description = @"Details of API bridge functionality, if required", SerializedName = @"apiBridge", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties ApiBridge { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties ApiBridge { get; set; } + /// + /// The autogenerated label used as part of the FQDNs for accessing the Communications Gateway + /// + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The autogenerated label used as part of the FQDNs for accessing the Communications Gateway", + SerializedName = @"autoGeneratedDomainNameLabel", + PossibleTypes = new [] { typeof(string) })] + string AutoGeneratedDomainNameLabel { get; } + /// The scope at which the auto-generated domain name can be re-used + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The scope at which the auto-generated domain name can be re-used", + SerializedName = @"autoGeneratedDomainNameLabelScope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } /// Voice codecs to support [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = false, @@ -211,6 +256,22 @@ public partial interface ICommunicationsGateway : SerializedName = @"e911Type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type) })] Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type? E911Type { get; set; } + /// A list of dial strings used for emergency calling. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of dial strings used for emergency calling.", + SerializedName = @"emergencyDialStrings", + PossibleTypes = new [] { typeof(string) })] + string[] EmergencyDialString { get; set; } + /// Whether an on-premises Mobile Control Point is in use. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether an on-premises Mobile Control Point is in use.", + SerializedName = @"onPremMcpEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? OnPremMcpEnabled { get; set; } /// What platforms to support [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = false, @@ -241,8 +302,8 @@ public partial interface ICommunicationsGateway : ReadOnly = false, Description = @"The regions in which to deploy the resources needed for Teams Calling", SerializedName = @"serviceLocations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[] ServiceLocation { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[] ServiceLocation { get; set; } /// The current status of the deployment. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = false, @@ -251,6 +312,16 @@ public partial interface ICommunicationsGateway : SerializedName = @"status", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status) })] Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Status { get; } + /// + /// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.", + SerializedName = @"teamsVoicemailPilotNumber", + PossibleTypes = new [] { typeof(string) })] + string TeamsVoicemailPilotNumber { get; set; } } /// A CommunicationsGateway resource @@ -258,25 +329,39 @@ internal partial interface ICommunicationsGatewayInternal : Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal { /// Details of API bridge functionality, if required - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties ApiBridge { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties ApiBridge { get; set; } + /// + /// The autogenerated label used as part of the FQDNs for accessing the Communications Gateway + /// + string AutoGeneratedDomainNameLabel { get; set; } + /// The scope at which the auto-generated domain name can be re-used + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } /// Voice codecs to support Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[] Codec { get; set; } /// How to connect back to the operator network, e.g. MAPS string Connectivity { get; set; } /// How to handle 911 calls Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type? E911Type { get; set; } + /// A list of dial strings used for emergency calling. + string[] EmergencyDialString { get; set; } + /// Whether an on-premises Mobile Control Point is in use. + bool? OnPremMcpEnabled { get; set; } /// What platforms to support Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[] Platform { get; set; } /// The resource-specific properties for this resource. - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties Property { get; set; } /// Resource provisioning state. Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get; set; } int? RetryAfter { get; set; } /// The regions in which to deploy the resources needed for Teams Calling - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[] ServiceLocation { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[] ServiceLocation { get; set; } /// The current status of the deployment. Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Status { get; set; } + /// + /// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer. + /// + string TeamsVoicemailPilotNumber { get; set; } } } \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.json.cs similarity index 94% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.json.cs index 6e8ba08ae784..e03b6d737bdc 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGateway.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGateway.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -66,18 +66,18 @@ internal CommunicationsGateway(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices. return; } __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new CommunicationsGateway(json) : null; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.PowerShell.cs similarity index 74% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.PowerShell.cs index 7e119d63574f..1884cc9ad34d 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CommunicationsGatewayListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal CommunicationsGatewayListResult(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,39 @@ internal CommunicationsGatewayListResult(global::System.Management.Automation.PS // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CommunicationsGatewayListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CommunicationsGatewayListResult(content); } @@ -145,7 +145,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.TypeConverter.cs index eaadeb6f921d..27ec36bba415 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.cs similarity index 86% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.cs index 41a1f0898d8e..a211ac7196e4 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// The response of a CommunicationsGateway list operation. public partial class CommunicationsGatewayListResult : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResultInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class CommunicationsGatewayListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway[] _value; /// The CommunicationsGateway items on this page [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public CommunicationsGatewayListResult() @@ -51,8 +51,8 @@ public partial interface ICommunicationsGatewayListResult : ReadOnly = false, Description = @"The CommunicationsGateway items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway[] Value { get; set; } } /// The response of a CommunicationsGateway list operation. @@ -62,7 +62,7 @@ internal partial interface ICommunicationsGatewayListResultInternal /// The link to the next page of items string NextLink { get; set; } /// The CommunicationsGateway items on this page - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway[] Value { get; set; } } } \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.json.cs similarity index 91% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.json.cs index cc6e3d1748ce..62706ef32890 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayListResult.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CommunicationsGatewayListResult(Microsoft.Azure.PowerShell.Cmdlets.Voic { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway) (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGateway.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway) (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGateway.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new CommunicationsGatewayListResult(json) : null; } diff --git a/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.PowerShell.cs new file mode 100644 index 000000000000..853b1ab86b64 --- /dev/null +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.PowerShell.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 +{ + using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; + + /// Details of the CommunicationsGateway resource. + [System.ComponentModel.TypeConverter(typeof(CommunicationsGatewayPropertiesTypeConverter))] + public partial class CommunicationsGatewayProperties + { + + /// + /// 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 CommunicationsGatewayProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status.CreateFrom); + } + if (content.Contains("ServiceLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ServiceLocation = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[]) content.GetValueForProperty("ServiceLocation",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ServiceLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("Connectivity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Connectivity = (string) content.GetValueForProperty("Connectivity",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Connectivity, global::System.Convert.ToString); + } + if (content.Contains("Codec")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Codec = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[]) content.GetValueForProperty("Codec",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Codec, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs.CreateFrom)); + } + if (content.Contains("E911Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).E911Type = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type) content.GetValueForProperty("E911Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).E911Type, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type.CreateFrom); + } + if (content.Contains("Platform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Platform = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[]) content.GetValueForProperty("Platform",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Platform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform.CreateFrom)); + } + if (content.Contains("ApiBridge")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ApiBridge = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties) content.GetValueForProperty("ApiBridge",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ApiBridge, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ApiBridgePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AutoGeneratedDomainNameLabelScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).AutoGeneratedDomainNameLabelScope = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope?) content.GetValueForProperty("AutoGeneratedDomainNameLabelScope",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).AutoGeneratedDomainNameLabelScope, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope.CreateFrom); + } + if (content.Contains("AutoGeneratedDomainNameLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).AutoGeneratedDomainNameLabel = (string) content.GetValueForProperty("AutoGeneratedDomainNameLabel",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).AutoGeneratedDomainNameLabel, global::System.Convert.ToString); + } + if (content.Contains("TeamsVoicemailPilotNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).TeamsVoicemailPilotNumber = (string) content.GetValueForProperty("TeamsVoicemailPilotNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).TeamsVoicemailPilotNumber, global::System.Convert.ToString); + } + if (content.Contains("OnPremMcpEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).OnPremMcpEnabled = (bool?) content.GetValueForProperty("OnPremMcpEnabled",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).OnPremMcpEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EmergencyDialString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).EmergencyDialString = (string[]) content.GetValueForProperty("EmergencyDialString",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).EmergencyDialString, __y => TypeConverterExtensions.SelectToArray(__y, 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 CommunicationsGatewayProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status.CreateFrom); + } + if (content.Contains("ServiceLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ServiceLocation = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[]) content.GetValueForProperty("ServiceLocation",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ServiceLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("Connectivity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Connectivity = (string) content.GetValueForProperty("Connectivity",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Connectivity, global::System.Convert.ToString); + } + if (content.Contains("Codec")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Codec = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[]) content.GetValueForProperty("Codec",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Codec, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs.CreateFrom)); + } + if (content.Contains("E911Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).E911Type = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type) content.GetValueForProperty("E911Type",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).E911Type, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type.CreateFrom); + } + if (content.Contains("Platform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Platform = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[]) content.GetValueForProperty("Platform",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).Platform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform.CreateFrom)); + } + if (content.Contains("ApiBridge")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ApiBridge = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties) content.GetValueForProperty("ApiBridge",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).ApiBridge, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ApiBridgePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AutoGeneratedDomainNameLabelScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).AutoGeneratedDomainNameLabelScope = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope?) content.GetValueForProperty("AutoGeneratedDomainNameLabelScope",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).AutoGeneratedDomainNameLabelScope, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope.CreateFrom); + } + if (content.Contains("AutoGeneratedDomainNameLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).AutoGeneratedDomainNameLabel = (string) content.GetValueForProperty("AutoGeneratedDomainNameLabel",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).AutoGeneratedDomainNameLabel, global::System.Convert.ToString); + } + if (content.Contains("TeamsVoicemailPilotNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).TeamsVoicemailPilotNumber = (string) content.GetValueForProperty("TeamsVoicemailPilotNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).TeamsVoicemailPilotNumber, global::System.Convert.ToString); + } + if (content.Contains("OnPremMcpEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).OnPremMcpEnabled = (bool?) content.GetValueForProperty("OnPremMcpEnabled",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).OnPremMcpEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EmergencyDialString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).EmergencyDialString = (string[]) content.GetValueForProperty("EmergencyDialString",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal)this).EmergencyDialString, __y => TypeConverterExtensions.SelectToArray(__y, 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.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CommunicationsGatewayProperties(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.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CommunicationsGatewayProperties(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.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Details of the CommunicationsGateway resource. + [System.ComponentModel.TypeConverter(typeof(CommunicationsGatewayPropertiesTypeConverter))] + public partial interface ICommunicationsGatewayProperties + + { + + } +} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.TypeConverter.cs index e3f7dab0d0ac..56cbaf24a3c7 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.cs similarity index 56% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.cs index 1032141ea7a5..23ed9b0d53ae 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.cs @@ -3,22 +3,38 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// Details of the CommunicationsGateway resource. public partial class CommunicationsGatewayProperties : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties _apiBridge; + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties _apiBridge; /// Details of API bridge functionality, if required [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties ApiBridge { get => (this._apiBridge = this._apiBridge ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ApiBridgeProperties()); set => this._apiBridge = value; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties ApiBridge { get => (this._apiBridge = this._apiBridge ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ApiBridgeProperties()); set => this._apiBridge = value; } + + /// Backing field for property. + private string _autoGeneratedDomainNameLabel; + + /// + /// The autogenerated label used as part of the FQDNs for accessing the Communications Gateway + /// + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public string AutoGeneratedDomainNameLabel { get => this._autoGeneratedDomainNameLabel; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope? _autoGeneratedDomainNameLabelScope; + + /// The scope at which the auto-generated domain name can be re-used + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get => this._autoGeneratedDomainNameLabelScope; set => this._autoGeneratedDomainNameLabelScope = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[] _codec; @@ -41,14 +57,31 @@ public partial class CommunicationsGatewayProperties : [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type E911Type { get => this._e911Type; set => this._e911Type = value; } + /// Backing field for property. + private string[] _emergencyDialString; + + /// A list of dial strings used for emergency calling. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public string[] EmergencyDialString { get => this._emergencyDialString; set => this._emergencyDialString = value; } + + /// Internal Acessors for AutoGeneratedDomainNameLabel + string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal.AutoGeneratedDomainNameLabel { get => this._autoGeneratedDomainNameLabel; set { {_autoGeneratedDomainNameLabel = value;} } } + /// Internal Acessors for Connectivity - string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal.Connectivity { get => this._connectivity; set { {_connectivity = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal.Connectivity { get => this._connectivity; set { {_connectivity = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Status - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayPropertiesInternal.Status { get => this._status; set { {_status = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayPropertiesInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private bool? _onPremMcpEnabled; + + /// Whether an on-premises Mobile Control Point is in use. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public bool? OnPremMcpEnabled { get => this._onPremMcpEnabled; set => this._onPremMcpEnabled = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[] _platform; @@ -65,11 +98,11 @@ public partial class CommunicationsGatewayProperties : public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[] _serviceLocation; + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[] _serviceLocation; /// The regions in which to deploy the resources needed for Teams Calling [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[] ServiceLocation { get => this._serviceLocation; set => this._serviceLocation = value; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[] ServiceLocation { get => this._serviceLocation; set => this._serviceLocation = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? _status; @@ -78,6 +111,15 @@ public partial class CommunicationsGatewayProperties : [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Status { get => this._status; } + /// Backing field for property. + private string _teamsVoicemailPilotNumber; + + /// + /// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public string TeamsVoicemailPilotNumber { get => this._teamsVoicemailPilotNumber; set => this._teamsVoicemailPilotNumber = value; } + /// Creates an new instance. public CommunicationsGatewayProperties() { @@ -94,8 +136,26 @@ public partial interface ICommunicationsGatewayProperties : ReadOnly = false, Description = @"Details of API bridge functionality, if required", SerializedName = @"apiBridge", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties ApiBridge { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties ApiBridge { get; set; } + /// + /// The autogenerated label used as part of the FQDNs for accessing the Communications Gateway + /// + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The autogenerated label used as part of the FQDNs for accessing the Communications Gateway", + SerializedName = @"autoGeneratedDomainNameLabel", + PossibleTypes = new [] { typeof(string) })] + string AutoGeneratedDomainNameLabel { get; } + /// The scope at which the auto-generated domain name can be re-used + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The scope at which the auto-generated domain name can be re-used", + SerializedName = @"autoGeneratedDomainNameLabelScope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } /// Voice codecs to support [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = true, @@ -120,6 +180,22 @@ public partial interface ICommunicationsGatewayProperties : SerializedName = @"e911Type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type) })] Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type E911Type { get; set; } + /// A list of dial strings used for emergency calling. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of dial strings used for emergency calling.", + SerializedName = @"emergencyDialStrings", + PossibleTypes = new [] { typeof(string) })] + string[] EmergencyDialString { get; set; } + /// Whether an on-premises Mobile Control Point is in use. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether an on-premises Mobile Control Point is in use.", + SerializedName = @"onPremMcpEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? OnPremMcpEnabled { get; set; } /// What platforms to support [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = true, @@ -142,8 +218,8 @@ public partial interface ICommunicationsGatewayProperties : ReadOnly = false, Description = @"The regions in which to deploy the resources needed for Teams Calling", SerializedName = @"serviceLocations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[] ServiceLocation { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[] ServiceLocation { get; set; } /// The current status of the deployment. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = false, @@ -152,6 +228,16 @@ public partial interface ICommunicationsGatewayProperties : SerializedName = @"status", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status) })] Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Status { get; } + /// + /// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer. + /// + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.", + SerializedName = @"teamsVoicemailPilotNumber", + PossibleTypes = new [] { typeof(string) })] + string TeamsVoicemailPilotNumber { get; set; } } /// Details of the CommunicationsGateway resource. @@ -159,21 +245,35 @@ internal partial interface ICommunicationsGatewayPropertiesInternal { /// Details of API bridge functionality, if required - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties ApiBridge { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties ApiBridge { get; set; } + /// + /// The autogenerated label used as part of the FQDNs for accessing the Communications Gateway + /// + string AutoGeneratedDomainNameLabel { get; set; } + /// The scope at which the auto-generated domain name can be re-used + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } /// Voice codecs to support Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs[] Codec { get; set; } /// How to connect back to the operator network, e.g. MAPS string Connectivity { get; set; } /// How to handle 911 calls Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type E911Type { get; set; } + /// A list of dial strings used for emergency calling. + string[] EmergencyDialString { get; set; } + /// Whether an on-premises Mobile Control Point is in use. + bool? OnPremMcpEnabled { get; set; } /// What platforms to support Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform[] Platform { get; set; } /// Resource provisioning state. Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get; set; } /// The regions in which to deploy the resources needed for Teams Calling - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[] ServiceLocation { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[] ServiceLocation { get; set; } /// The current status of the deployment. Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.Status? Status { get; set; } + /// + /// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer. + /// + string TeamsVoicemailPilotNumber { get; set; } } } \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.json.cs similarity index 73% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.json.cs index 274597224706..5dc032fecbd1 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayProperties.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -67,23 +67,28 @@ internal CommunicationsGatewayProperties(Microsoft.Azure.PowerShell.Cmdlets.Voic } {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_serviceLocation = If( json?.PropertyT("serviceLocations"), out var __jsonServiceLocations) ? If( __jsonServiceLocations as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties) (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties.FromJson(__u) )) ))() : null : ServiceLocation;} + {_serviceLocation = If( json?.PropertyT("serviceLocations"), out var __jsonServiceLocations) ? If( __jsonServiceLocations as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties) (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties.FromJson(__u) )) ))() : null : ServiceLocation;} {_connectivity = If( json?.PropertyT("connectivity"), out var __jsonConnectivity) ? (string)__jsonConnectivity : (string)Connectivity;} {_codec = If( json?.PropertyT("codecs"), out var __jsonCodecs) ? If( __jsonCodecs as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs) (__p is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TeamsCodecs)""))) ))() : null : Codec;} {_e911Type = If( json?.PropertyT("e911Type"), out var __jsonE911Type) ? (string)__jsonE911Type : (string)E911Type;} {_platform = If( json?.PropertyT("platforms"), out var __jsonPlatforms) ? If( __jsonPlatforms as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform) (__k is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString __j ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform)(__j.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CommunicationsPlatform)""))) ))() : null : Platform;} - {_apiBridge = If( json?.PropertyT("apiBridge"), out var __jsonApiBridge) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ApiBridgeProperties.FromJson(__jsonApiBridge) : ApiBridge;} + {_apiBridge = If( json?.PropertyT("apiBridge"), out var __jsonApiBridge) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ApiBridgeProperties.FromJson(__jsonApiBridge) : ApiBridge;} + {_autoGeneratedDomainNameLabelScope = If( json?.PropertyT("autoGeneratedDomainNameLabelScope"), out var __jsonAutoGeneratedDomainNameLabelScope) ? (string)__jsonAutoGeneratedDomainNameLabelScope : (string)AutoGeneratedDomainNameLabelScope;} + {_autoGeneratedDomainNameLabel = If( json?.PropertyT("autoGeneratedDomainNameLabel"), out var __jsonAutoGeneratedDomainNameLabel) ? (string)__jsonAutoGeneratedDomainNameLabel : (string)AutoGeneratedDomainNameLabel;} + {_teamsVoicemailPilotNumber = If( json?.PropertyT("teamsVoicemailPilotNumber"), out var __jsonTeamsVoicemailPilotNumber) ? (string)__jsonTeamsVoicemailPilotNumber : (string)TeamsVoicemailPilotNumber;} + {_onPremMcpEnabled = If( json?.PropertyT("onPremMcpEnabled"), out var __jsonOnPremMcpEnabled) ? (bool?)__jsonOnPremMcpEnabled : OnPremMcpEnabled;} + {_emergencyDialString = If( json?.PropertyT("emergencyDialStrings"), out var __jsonEmergencyDialStrings) ? If( __jsonEmergencyDialStrings as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : EmergencyDialString;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new CommunicationsGatewayProperties(json) : null; } @@ -145,6 +150,22 @@ public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode To container.Add("platforms",__m); } AddIf( null != this._apiBridge ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) this._apiBridge.ToJson(null,serializationMode) : null, "apiBridge" ,container.Add ); + AddIf( null != (((object)this._autoGeneratedDomainNameLabelScope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._autoGeneratedDomainNameLabelScope.ToString()) : null, "autoGeneratedDomainNameLabelScope" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._autoGeneratedDomainNameLabel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._autoGeneratedDomainNameLabel.ToString()) : null, "autoGeneratedDomainNameLabel" ,container.Add ); + } + AddIf( null != (((object)this._teamsVoicemailPilotNumber)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._teamsVoicemailPilotNumber.ToString()) : null, "teamsVoicemailPilotNumber" ,container.Add ); + AddIf( null != this._onPremMcpEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonBoolean((bool)this._onPremMcpEnabled) : null, "onPremMcpEnabled" ,container.Add ); + if (null != this._emergencyDialString) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.XNodeArray(); + foreach( var __i in this._emergencyDialString ) + { + AddIf(null != (((object)__i)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); + } + container.Add("emergencyDialStrings",__h); + } AfterToJson(ref container); return container; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.PowerShell.cs similarity index 80% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.PowerShell.cs index 81a66448dcbe..59f51fb01769 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CommunicationsGatewayUpdate partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,13 +78,13 @@ internal CommunicationsGatewayUpdate(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayUpdateTagsTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -99,35 +99,35 @@ internal CommunicationsGatewayUpdate(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayUpdateTagsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CommunicationsGatewayUpdate(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CommunicationsGatewayUpdate(content); } @@ -137,7 +137,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.TypeConverter.cs index 414b0bf50d0b..33a8b1b68a5c 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.cs similarity index 76% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.cs index d9ac17b01059..ad04a9a34c88 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// The type used for update operations of the CommunicationsGateway. public partial class CommunicationsGatewayUpdate : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayUpdateTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayUpdateTags()); set => this._tag = value; } /// Creates an new instance. public CommunicationsGatewayUpdate() @@ -36,8 +36,8 @@ public partial interface ICommunicationsGatewayUpdate : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags Tag { get; set; } } /// The type used for update operations of the CommunicationsGateway. @@ -45,7 +45,7 @@ internal partial interface ICommunicationsGatewayUpdateInternal { /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags Tag { get; set; } } } \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.json.cs similarity index 94% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.json.cs index 53ee98806664..d6992155db20 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdate.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -65,18 +65,18 @@ internal CommunicationsGatewayUpdate(Microsoft.Azure.PowerShell.Cmdlets.VoiceSer { return; } - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayUpdateTags.FromJson(__jsonTags) : Tag;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayUpdateTags.FromJson(__jsonTags) : Tag;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new CommunicationsGatewayUpdate(json) : null; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.PowerShell.cs similarity index 88% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.PowerShell.cs index 0b652fa3fc95..c6e3bbb2e689 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CommunicationsGatewayUpdateTags partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -82,7 +82,7 @@ internal CommunicationsGatewayUpdateTags(global::System.Collections.IDictionary } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -101,29 +101,29 @@ internal CommunicationsGatewayUpdateTags(global::System.Management.Automation.PS } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CommunicationsGatewayUpdateTags(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CommunicationsGatewayUpdateTags(content); } @@ -133,7 +133,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.TypeConverter.cs index 8c37c26a4064..a883419ffcf1 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.cs similarity index 90% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.cs index 31d6f7b32562..1d8b1bb6a42c 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// Resource tags. public partial class CommunicationsGatewayUpdateTags : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTagsInternal { /// Creates an new instance. diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.dictionary.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.dictionary.cs similarity index 96% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.dictionary.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.dictionary.cs index cf6e8c0c25d2..f01e3a91e450 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.dictionary.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayUpdateTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayUpdateTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.json.cs similarity index 95% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.json.cs index 8ed360e8f5fe..c82a2af000b3 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/CommunicationsGatewayUpdateTags.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/CommunicationsGatewayUpdateTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -71,13 +71,13 @@ internal CommunicationsGatewayUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.Voic } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new CommunicationsGatewayUpdateTags(json) : null; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.PowerShell.cs similarity index 64% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.PowerShell.cs index 95d97f44dfdf..325ad07b6937 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class PrimaryRegionProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrimaryRegionProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrimaryRegionProperties(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +113,25 @@ internal PrimaryRegionProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("OperatorAddress")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)this).OperatorAddress = (string[]) content.GetValueForProperty("OperatorAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)this).OperatorAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).OperatorAddress = (string[]) content.GetValueForProperty("OperatorAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).OperatorAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("EsrpAddress")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)this).EsrpAddress = (string[]) content.GetValueForProperty("EsrpAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)this).EsrpAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).EsrpAddress = (string[]) content.GetValueForProperty("EsrpAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).EsrpAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AllowedSignalingSourceAddressPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).AllowedSignalingSourceAddressPrefix = (string[]) content.GetValueForProperty("AllowedSignalingSourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).AllowedSignalingSourceAddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AllowedMediaSourceAddressPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).AllowedMediaSourceAddressPrefix = (string[]) content.GetValueForProperty("AllowedMediaSourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).AllowedMediaSourceAddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +146,19 @@ internal PrimaryRegionProperties(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("OperatorAddress")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)this).OperatorAddress = (string[]) content.GetValueForProperty("OperatorAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)this).OperatorAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).OperatorAddress = (string[]) content.GetValueForProperty("OperatorAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).OperatorAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("EsrpAddress")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)this).EsrpAddress = (string[]) content.GetValueForProperty("EsrpAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)this).EsrpAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).EsrpAddress = (string[]) content.GetValueForProperty("EsrpAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).EsrpAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AllowedSignalingSourceAddressPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).AllowedSignalingSourceAddressPrefix = (string[]) content.GetValueForProperty("AllowedSignalingSourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).AllowedSignalingSourceAddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AllowedMediaSourceAddressPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).AllowedMediaSourceAddressPrefix = (string[]) content.GetValueForProperty("AllowedMediaSourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)this).AllowedMediaSourceAddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.TypeConverter.cs index f7de1a72b36a..87408a9fe041 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.cs b/src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.cs similarity index 57% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.cs rename to src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.cs index e503698d32ea..3e4537bcafbc 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.cs @@ -3,16 +3,30 @@ // 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.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// The configuration used in this region as primary, and other regions as backup. public partial class PrimaryRegionProperties : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal { + /// Backing field for property. + private string[] _allowedMediaSourceAddressPrefix; + + /// The allowed source IP address or CIDR ranges for media + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public string[] AllowedMediaSourceAddressPrefix { get => this._allowedMediaSourceAddressPrefix; set => this._allowedMediaSourceAddressPrefix = value; } + + /// Backing field for property. + private string[] _allowedSignalingSourceAddressPrefix; + + /// The allowed source IP address or CIDR ranges for signaling + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public string[] AllowedSignalingSourceAddressPrefix { get => this._allowedSignalingSourceAddressPrefix; set => this._allowedSignalingSourceAddressPrefix = value; } + /// Backing field for property. private string[] _esrpAddress; @@ -37,6 +51,22 @@ public PrimaryRegionProperties() public partial interface IPrimaryRegionProperties : Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IJsonSerializable { + /// The allowed source IP address or CIDR ranges for media + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allowed source IP address or CIDR ranges for media", + SerializedName = @"allowedMediaSourceAddressPrefixes", + PossibleTypes = new [] { typeof(string) })] + string[] AllowedMediaSourceAddressPrefix { get; set; } + /// The allowed source IP address or CIDR ranges for signaling + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allowed source IP address or CIDR ranges for signaling", + SerializedName = @"allowedSignalingSourceAddressPrefixes", + PossibleTypes = new [] { typeof(string) })] + string[] AllowedSignalingSourceAddressPrefix { get; set; } /// IP address to use to contact the ESRP from this region [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = false, @@ -59,6 +89,10 @@ public partial interface IPrimaryRegionProperties : internal partial interface IPrimaryRegionPropertiesInternal { + /// The allowed source IP address or CIDR ranges for media + string[] AllowedMediaSourceAddressPrefix { get; set; } + /// The allowed source IP address or CIDR ranges for signaling + string[] AllowedSignalingSourceAddressPrefix { get; set; } /// IP address to use to contact the ESRP from this region string[] EsrpAddress { get; set; } /// IP address to use to contact the operator network from this region diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.json.cs similarity index 75% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.json.cs index fb6df2620c90..ddbf48c3eac8 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/PrimaryRegionProperties.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/PrimaryRegionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrimaryRegionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new PrimaryRegionProperties(json) : null; } @@ -79,6 +79,8 @@ internal PrimaryRegionProperties(Microsoft.Azure.PowerShell.Cmdlets.VoiceService } {_operatorAddress = If( json?.PropertyT("operatorAddresses"), out var __jsonOperatorAddresses) ? If( __jsonOperatorAddresses as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : OperatorAddress;} {_esrpAddress = If( json?.PropertyT("esrpAddresses"), out var __jsonEsrpAddresses) ? If( __jsonEsrpAddresses as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : EsrpAddress;} + {_allowedSignalingSourceAddressPrefix = If( json?.PropertyT("allowedSignalingSourceAddressPrefixes"), out var __jsonAllowedSignalingSourceAddressPrefixes) ? If( __jsonAllowedSignalingSourceAddressPrefixes as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : AllowedSignalingSourceAddressPrefix;} + {_allowedMediaSourceAddressPrefix = If( json?.PropertyT("allowedMediaSourceAddressPrefixes"), out var __jsonAllowedMediaSourceAddressPrefixes) ? If( __jsonAllowedMediaSourceAddressPrefixes as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : AllowedMediaSourceAddressPrefix;} AfterFromJson(json); } @@ -119,6 +121,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode To } container.Add("esrpAddresses",__r); } + if (null != this._allowedSignalingSourceAddressPrefix) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.XNodeArray(); + foreach( var __n in this._allowedSignalingSourceAddressPrefix ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("allowedSignalingSourceAddressPrefixes",__m); + } + if (null != this._allowedMediaSourceAddressPrefix) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.XNodeArray(); + foreach( var __i in this._allowedMediaSourceAddressPrefix ) + { + AddIf(null != (((object)__i)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); + } + container.Add("allowedMediaSourceAddressPrefixes",__h); + } AfterToJson(ref container); return container; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.PowerShell.cs similarity index 57% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.PowerShell.cs index 9cfe4e9907a0..758fdf33d836 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class ServiceRegionProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ServiceRegionProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ServiceRegionProperties(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +113,33 @@ internal ServiceRegionProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrimaryRegionProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionProperty = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties) content.GetValueForProperty("PrimaryRegionProperty",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionProperty, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.PrimaryRegionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionProperty = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties) content.GetValueForProperty("PrimaryRegionProperty",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionProperty, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.PrimaryRegionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("PrimaryRegionPropertyOperatorAddress")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyOperatorAddress = (string[]) content.GetValueForProperty("PrimaryRegionPropertyOperatorAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyOperatorAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyOperatorAddress = (string[]) content.GetValueForProperty("PrimaryRegionPropertyOperatorAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyOperatorAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("PrimaryRegionPropertyEsrpAddress")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyEsrpAddress = (string[]) content.GetValueForProperty("PrimaryRegionPropertyEsrpAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyEsrpAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyEsrpAddress = (string[]) content.GetValueForProperty("PrimaryRegionPropertyEsrpAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyEsrpAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix = (string[]) content.GetValueForProperty("PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PrimaryRegionPropertyAllowedMediaSourceAddressPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyAllowedMediaSourceAddressPrefix = (string[]) content.GetValueForProperty("PrimaryRegionPropertyAllowedMediaSourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyAllowedMediaSourceAddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +154,27 @@ internal ServiceRegionProperties(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("PrimaryRegionProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionProperty = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties) content.GetValueForProperty("PrimaryRegionProperty",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionProperty, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.PrimaryRegionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionProperty = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties) content.GetValueForProperty("PrimaryRegionProperty",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionProperty, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.PrimaryRegionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("PrimaryRegionPropertyOperatorAddress")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyOperatorAddress = (string[]) content.GetValueForProperty("PrimaryRegionPropertyOperatorAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyOperatorAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyOperatorAddress = (string[]) content.GetValueForProperty("PrimaryRegionPropertyOperatorAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyOperatorAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("PrimaryRegionPropertyEsrpAddress")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyEsrpAddress = (string[]) content.GetValueForProperty("PrimaryRegionPropertyEsrpAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyEsrpAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyEsrpAddress = (string[]) content.GetValueForProperty("PrimaryRegionPropertyEsrpAddress",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyEsrpAddress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix = (string[]) content.GetValueForProperty("PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PrimaryRegionPropertyAllowedMediaSourceAddressPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyAllowedMediaSourceAddressPrefix = (string[]) content.GetValueForProperty("PrimaryRegionPropertyAllowedMediaSourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal)this).PrimaryRegionPropertyAllowedMediaSourceAddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.TypeConverter.cs index 623fee2ac874..fdd4db79b2cd 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.cs b/src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.cs similarity index 55% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.cs rename to src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.cs index c842bdd3aeff..49051c8da558 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.cs @@ -3,18 +3,18 @@ // 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.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// The service region configuration needed for Teams Callings. public partial class ServiceRegionProperties : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal { /// Internal Acessors for PrimaryRegionProperty - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionPropertiesInternal.PrimaryRegionProperty { get => (this._primaryRegionProperty = this._primaryRegionProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.PrimaryRegionProperties()); set { {_primaryRegionProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionPropertiesInternal.PrimaryRegionProperty { get => (this._primaryRegionProperty = this._primaryRegionProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.PrimaryRegionProperties()); set { {_primaryRegionProperty = value;} } } /// Backing field for property. private string _name; @@ -26,19 +26,27 @@ public partial class ServiceRegionProperties : public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties _primaryRegionProperty; + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties _primaryRegionProperty; /// The configuration used in this region as primary, and other regions as backup. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties PrimaryRegionProperty { get => (this._primaryRegionProperty = this._primaryRegionProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.PrimaryRegionProperties()); set => this._primaryRegionProperty = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties PrimaryRegionProperty { get => (this._primaryRegionProperty = this._primaryRegionProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.PrimaryRegionProperties()); set => this._primaryRegionProperty = value; } + + /// The allowed source IP address or CIDR ranges for media + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] + public string[] PrimaryRegionPropertyAllowedMediaSourceAddressPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).AllowedMediaSourceAddressPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).AllowedMediaSourceAddressPrefix = value ?? null /* arrayOf */; } + + /// The allowed source IP address or CIDR ranges for signaling + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] + public string[] PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).AllowedSignalingSourceAddressPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).AllowedSignalingSourceAddressPrefix = value ?? null /* arrayOf */; } /// IP address to use to contact the ESRP from this region [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public string[] PrimaryRegionPropertyEsrpAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).EsrpAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).EsrpAddress = value ?? null /* arrayOf */; } + public string[] PrimaryRegionPropertyEsrpAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).EsrpAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).EsrpAddress = value ?? null /* arrayOf */; } /// IP address to use to contact the operator network from this region [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public string[] PrimaryRegionPropertyOperatorAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).OperatorAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).OperatorAddress = value ; } + public string[] PrimaryRegionPropertyOperatorAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).OperatorAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionPropertiesInternal)PrimaryRegionProperty).OperatorAddress = value ; } /// Creates an new instance. public ServiceRegionProperties() @@ -60,6 +68,22 @@ public partial interface IServiceRegionProperties : SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; set; } + /// The allowed source IP address or CIDR ranges for media + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allowed source IP address or CIDR ranges for media", + SerializedName = @"allowedMediaSourceAddressPrefixes", + PossibleTypes = new [] { typeof(string) })] + string[] PrimaryRegionPropertyAllowedMediaSourceAddressPrefix { get; set; } + /// The allowed source IP address or CIDR ranges for signaling + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allowed source IP address or CIDR ranges for signaling", + SerializedName = @"allowedSignalingSourceAddressPrefixes", + PossibleTypes = new [] { typeof(string) })] + string[] PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix { get; set; } /// IP address to use to contact the ESRP from this region [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = false, @@ -87,7 +111,11 @@ internal partial interface IServiceRegionPropertiesInternal /// string Name { get; set; } /// The configuration used in this region as primary, and other regions as backup. - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IPrimaryRegionProperties PrimaryRegionProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IPrimaryRegionProperties PrimaryRegionProperty { get; set; } + /// The allowed source IP address or CIDR ranges for media + string[] PrimaryRegionPropertyAllowedMediaSourceAddressPrefix { get; set; } + /// The allowed source IP address or CIDR ranges for signaling + string[] PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix { get; set; } /// IP address to use to contact the ESRP from this region string[] PrimaryRegionPropertyEsrpAddress { get; set; } /// IP address to use to contact the operator network from this region diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.json.cs similarity index 95% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.json.cs index 132ae0d1595c..095256c2e46d 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/ServiceRegionProperties.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/ServiceRegionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ServiceRegionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new ServiceRegionProperties(json) : null; } @@ -77,7 +77,7 @@ internal ServiceRegionProperties(Microsoft.Azure.PowerShell.Cmdlets.VoiceService { return; } - {_primaryRegionProperty = If( json?.PropertyT("primaryRegionProperties"), out var __jsonPrimaryRegionProperties) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.PrimaryRegionProperties.FromJson(__jsonPrimaryRegionProperties) : PrimaryRegionProperty;} + {_primaryRegionProperty = If( json?.PropertyT("primaryRegionProperties"), out var __jsonPrimaryRegionProperties) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.PrimaryRegionProperties.FromJson(__jsonPrimaryRegionProperties) : PrimaryRegionProperty;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} AfterFromJson(json); } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLine.PowerShell.cs similarity index 82% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLine.PowerShell.cs index bb6481e28d39..c6188c197ea1 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLine.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class TestLine partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TestLine(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TestLine(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,11 +111,11 @@ internal TestLine(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLinePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLinePropertiesTypeConverter.ConvertFrom); } if (content.Contains("RetryAfter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SystemDataCreatedBy")) { @@ -167,21 +167,21 @@ internal TestLine(global::System.Collections.IDictionary content) } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); } if (content.Contains("PhoneNumber")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).PhoneNumber, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).PhoneNumber, global::System.Convert.ToString); } if (content.Contains("Purpose")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).Purpose = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose) content.GetValueForProperty("Purpose",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).Purpose, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).Purpose = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose) content.GetValueForProperty("Purpose",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).Purpose, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose.CreateFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -196,11 +196,11 @@ internal TestLine(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLinePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLinePropertiesTypeConverter.ConvertFrom); } if (content.Contains("RetryAfter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SystemDataCreatedBy")) { @@ -252,15 +252,15 @@ internal TestLine(global::System.Management.Automation.PSObject content) } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); } if (content.Contains("PhoneNumber")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).PhoneNumber, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).PhoneNumber, global::System.Convert.ToString); } if (content.Contains("Purpose")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).Purpose = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose) content.GetValueForProperty("Purpose",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).Purpose, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).Purpose = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose) content.GetValueForProperty("Purpose",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).Purpose, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLine.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLine.TypeConverter.cs index 9330b0085dfc..731255883faf 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLine.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLine.cs similarity index 88% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLine.cs index 7e31d034a789..459b5a893ae5 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLine.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// A TestLine resource public partial class TestLine : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IValidates, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IHeaderSerializable { @@ -31,10 +31,10 @@ public partial class TestLine : public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceInternal)__trackedResource).Location = value ; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IResourceInternal)__trackedResource).Id = value; } @@ -54,22 +54,22 @@ public partial class TestLine : /// The phone number [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public string PhoneNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)Property).PhoneNumber; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)Property).PhoneNumber = value ?? null; } + public string PhoneNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)Property).PhoneNumber; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)Property).PhoneNumber = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties _property; /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineProperties()); set => this._property = value; } /// Resource provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)Property).ProvisioningState; } /// Purpose of this test line, e.g. automated or manual testing [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose? Purpose { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)Property).Purpose; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)Property).Purpose = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose)""); } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose? Purpose { get => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)Property).Purpose; set => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)Property).Purpose = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose)""); } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] @@ -126,7 +126,7 @@ void Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IHeaderSerializabl { if (headers.TryGetValues("Retry-After", out var __retryAfterHeader0)) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); } } @@ -194,7 +194,7 @@ internal partial interface ITestLineInternal : /// The phone number string PhoneNumber { get; set; } /// The resource-specific properties for this resource. - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties Property { get; set; } /// Resource provisioning state. Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? ProvisioningState { get; set; } /// Purpose of this test line, e.g. automated or manual testing diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLine.json.cs similarity index 95% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLine.json.cs index 4af3b68e35fe..c4d3d3165ead 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLine.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLine.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TestLine partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new TestLine(json) : null; } @@ -78,7 +78,7 @@ internal TestLine(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json. return; } __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.PowerShell.cs similarity index 75% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.PowerShell.cs index 1479b33b26ca..828e7a30a988 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class TestLineListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TestLineListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TestLineListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal TestLineListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal TestLineListResult(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.TypeConverter.cs index 126346a69cd9..eaff91f30a36 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.cs similarity index 87% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.cs index e2e0bf3fa356..c0b9b7dca60a 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// The response of a TestLine list operation. public partial class TestLineListResult : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResultInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class TestLineListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine[] _value; /// The TestLine items on this page [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public TestLineListResult() @@ -51,8 +51,8 @@ public partial interface ITestLineListResult : ReadOnly = false, Description = @"The TestLine items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine[] Value { get; set; } } /// The response of a TestLine list operation. @@ -62,7 +62,7 @@ internal partial interface ITestLineListResultInternal /// The link to the next page of items string NextLink { get; set; } /// The TestLine items on this page - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine[] Value { get; set; } } } \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.json.cs similarity index 92% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.json.cs index e34accc8fe68..f9cacd10f96e 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineListResult.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TestLineListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new TestLineListResult(json) : null; } @@ -77,7 +77,7 @@ internal TestLineListResult(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Run { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine) (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLine.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine) (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLine.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.PowerShell.cs similarity index 73% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.PowerShell.cs index 5b7f768ebb8c..923fe4f1c117 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class TestLineProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TestLineProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TestLineProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal TestLineProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); } if (content.Contains("PhoneNumber")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).PhoneNumber, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).PhoneNumber, global::System.Convert.ToString); } if (content.Contains("Purpose")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).Purpose = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose) content.GetValueForProperty("Purpose",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).Purpose, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).Purpose = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose) content.GetValueForProperty("Purpose",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).Purpose, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose.CreateFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal TestLineProperties(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState.CreateFrom); } if (content.Contains("PhoneNumber")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).PhoneNumber, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).PhoneNumber = (string) content.GetValueForProperty("PhoneNumber",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).PhoneNumber, global::System.Convert.ToString); } if (content.Contains("Purpose")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).Purpose = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose) content.GetValueForProperty("Purpose",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal)this).Purpose, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).Purpose = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose) content.GetValueForProperty("Purpose",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal)this).Purpose, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.TestLinePurpose.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.TypeConverter.cs index 3eac8bbf46e7..129cfb656dc1 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.cs similarity index 94% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.cs index 00c8a91f83db..762ba512d745 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.cs @@ -3,18 +3,18 @@ // 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.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// Details of the TestLine resource. public partial class TestLineProperties : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal { /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLinePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLinePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private string _phoneNumber; diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.json.cs similarity index 96% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.json.cs index 5659f54838f6..4526d98f777a 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineProperties.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TestLineProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new TestLineProperties(json) : null; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.PowerShell.cs similarity index 81% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.PowerShell.cs index 00f6d1674f65..ea1bdbef3634 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class TestLineUpdate partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TestLineUpdate(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TestLineUpdate(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,13 +111,13 @@ internal TestLineUpdate(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineUpdateTagsTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,7 +132,7 @@ internal TestLineUpdate(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineUpdateTagsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.TypeConverter.cs index 5456620b9556..6da63fd65213 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.cs similarity index 78% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.cs index 95c3ebdddb0e..406d48faae82 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// The type used for update operations of the TestLine. public partial class TestLineUpdate : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineUpdateTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineUpdateTags()); set => this._tag = value; } /// Creates an new instance. public TestLineUpdate() @@ -36,8 +36,8 @@ public partial interface ITestLineUpdate : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags) })] - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags Tag { get; set; } } /// The type used for update operations of the TestLine. @@ -45,7 +45,7 @@ internal partial interface ITestLineUpdateInternal { /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags Tag { get; set; } } } \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.json.cs similarity index 95% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.json.cs index d6e6c7176025..f03d16a8969d 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdate.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TestLineUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new TestLineUpdate(json) : null; } @@ -77,7 +77,7 @@ internal TestLineUpdate(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime { return; } - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineUpdateTags.FromJson(__jsonTags) : Tag;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineUpdateTags.FromJson(__jsonTags) : Tag;} AfterFromJson(json); } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.PowerShell.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.PowerShell.cs similarity index 89% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.PowerShell.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.PowerShell.cs index bbe929701caa..e19e227cdf43 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class TestLineUpdateTags partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TestLineUpdateTags(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TestLineUpdateTags(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api2022120 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -117,7 +115,7 @@ internal TestLineUpdateTags(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.TypeConverter.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.TypeConverter.cs similarity index 97% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.TypeConverter.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.TypeConverter.cs index a69821c954de..0b66e460efb7 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.TypeConverter.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.cs similarity index 91% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.cs index 85ef0145511d..22fea2ae0f74 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; /// Resource tags. public partial class TestLineUpdateTags : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTagsInternal { /// Creates an new instance. diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.dictionary.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.dictionary.cs similarity index 96% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.dictionary.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.dictionary.cs index 534303e1d680..cbf3c691eab6 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.dictionary.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineUpdateTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineUpdateTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.json.cs b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.json.cs similarity index 96% rename from src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.json.cs rename to src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.json.cs index 1cf3141889b3..3c289fa7908e 100644 --- a/src/VoiceServices/generated/api/Models/Api20221201Preview/TestLineUpdateTags.json.cs +++ b/src/VoiceServices/generated/api/Models/Api20230131/TestLineUpdateTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TestLineUpdateTags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new TestLineUpdateTags(json) : null; } diff --git a/src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.TypeConverter.cs b/src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.TypeConverter.cs deleted file mode 100644 index 3b497d3bfe14..000000000000 --- a/src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.TypeConverter.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ContactsDeleteAcceptedResponseHeadersTypeConverter : 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.VoiceServices.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Models.IContactsDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ContactsDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ContactsDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ContactsDeleteAcceptedResponseHeaders.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/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.cs b/src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.cs deleted file mode 100644 index d4f052ef8cf0..000000000000 --- a/src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - public partial class ContactsDeleteAcceptedResponseHeaders : - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeaders, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeadersInternal, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IHeaderSerializable - { - - /// Backing field for property. - private int? _retryAfter; - - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } - - /// Creates an new instance. - public ContactsDeleteAcceptedResponseHeaders() - { - - } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Retry-After", out var __retryAfterHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader0) is string __headerRetryAfterHeader0 ? int.TryParse( __headerRetryAfterHeader0, out int __headerRetryAfterHeader0Value ) ? __headerRetryAfterHeader0Value : default(int?) : default(int?); - } - } - } - public partial interface IContactsDeleteAcceptedResponseHeaders - - { - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Retry-After", - PossibleTypes = new [] { typeof(int) })] - int? RetryAfter { get; set; } - - } - internal partial interface IContactsDeleteAcceptedResponseHeadersInternal - - { - int? RetryAfter { get; set; } - - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.json.cs b/src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.json.cs deleted file mode 100644 index 657adfc5f34d..000000000000 --- a/src/VoiceServices/generated/api/Models/ContactsDeleteAcceptedResponseHeaders.json.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - - public partial class ContactsDeleteAcceptedResponseHeaders - { - - /// - /// 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.VoiceServices.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.VoiceServices.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.VoiceServices.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.VoiceServices.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject instance to deserialize from. - internal ContactsDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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.VoiceServices.Models.IContactsDeleteAcceptedResponseHeaders. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeaders. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IContactsDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject json ? new ContactsDeleteAcceptedResponseHeaders(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.VoiceServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.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/VoiceServices/generated/api/Models/VoiceServicesIdentity.PowerShell.cs b/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.PowerShell.cs index a9a39c54dbd4..648416274ac3 100644 --- a/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.PowerShell.cs +++ b/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.PowerShell.cs @@ -137,9 +137,9 @@ internal VoiceServicesIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).CommunicationsGatewayName = (string) content.GetValueForProperty("CommunicationsGatewayName",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).CommunicationsGatewayName, global::System.Convert.ToString); } - if (content.Contains("ContactName")) + if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).ContactName = (string) content.GetValueForProperty("ContactName",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).ContactName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("TestLineName")) { @@ -178,9 +178,9 @@ internal VoiceServicesIdentity(global::System.Management.Automation.PSObject con { ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).CommunicationsGatewayName = (string) content.GetValueForProperty("CommunicationsGatewayName",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).CommunicationsGatewayName, global::System.Convert.ToString); } - if (content.Contains("ContactName")) + if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).ContactName = (string) content.GetValueForProperty("ContactName",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).ContactName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentityInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("TestLineName")) { diff --git a/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.cs b/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.cs index bbf7dadcd088..2700124334c2 100644 --- a/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.cs +++ b/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.cs @@ -19,13 +19,6 @@ public partial class VoiceServicesIdentity : [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] public string CommunicationsGatewayName { get => this._communicationsGatewayName; set => this._communicationsGatewayName = value; } - /// Backing field for property. - private string _contactName; - - /// Unique identifier for this contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] - public string ContactName { get => this._contactName; set => this._contactName = value; } - /// Backing field for property. private string _id; @@ -33,6 +26,13 @@ public partial class VoiceServicesIdentity : [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] public string Id { get => this._id; set => this._id = value; } + /// Backing field for property. + private string _location; + + /// The location in which uniqueness will be verified. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + /// Backing field for property. private string _resourceGroupName; @@ -71,14 +71,6 @@ public partial interface IVoiceServicesIdentity : SerializedName = @"communicationsGatewayName", PossibleTypes = new [] { typeof(string) })] string CommunicationsGatewayName { get; set; } - /// Unique identifier for this contact - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Unique identifier for this contact", - SerializedName = @"contactName", - PossibleTypes = new [] { typeof(string) })] - string ContactName { get; set; } /// Resource identity path [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = false, @@ -87,6 +79,14 @@ public partial interface IVoiceServicesIdentity : SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } + /// The location in which uniqueness will be verified. + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location in which uniqueness will be verified.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } /// The name of the resource group. The name is case insensitive. [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = false, @@ -118,10 +118,10 @@ internal partial interface IVoiceServicesIdentityInternal { /// Unique identifier for this deployment string CommunicationsGatewayName { get; set; } - /// Unique identifier for this contact - string ContactName { get; set; } /// Resource identity path string Id { get; set; } + /// The location in which uniqueness will be verified. + string Location { get; set; } /// The name of the resource group. The name is case insensitive. string ResourceGroupName { get; set; } /// The ID of the target subscription. diff --git a/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.json.cs b/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.json.cs index a9eb3f5cd63b..b1a348708387 100644 --- a/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.json.cs +++ b/src/VoiceServices/generated/api/Models/VoiceServicesIdentity.json.cs @@ -86,7 +86,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode To AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); AddIf( null != (((object)this._communicationsGatewayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._communicationsGatewayName.ToString()) : null, "communicationsGatewayName" ,container.Add ); - AddIf( null != (((object)this._contactName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._contactName.ToString()) : null, "contactName" ,container.Add ); + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); AddIf( null != (((object)this._testLineName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._testLineName.ToString()) : null, "testLineName" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AfterToJson(ref container); @@ -108,7 +108,7 @@ internal VoiceServicesIdentity(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices. {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} {_communicationsGatewayName = If( json?.PropertyT("communicationsGatewayName"), out var __jsonCommunicationsGatewayName) ? (string)__jsonCommunicationsGatewayName : (string)CommunicationsGatewayName;} - {_contactName = If( json?.PropertyT("contactName"), out var __jsonContactName) ? (string)__jsonContactName : (string)ContactName;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} {_testLineName = If( json?.PropertyT("testLineName"), out var __jsonTestLineName) ? (string)__jsonTestLineName : (string)TestLineName;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} AfterFromJson(json); diff --git a/src/VoiceServices/generated/api/Support/AutoGeneratedDomainNameLabelScope.Completer.cs b/src/VoiceServices/generated/api/Support/AutoGeneratedDomainNameLabelScope.Completer.cs new file mode 100644 index 000000000000..6486d0888196 --- /dev/null +++ b/src/VoiceServices/generated/api/Support/AutoGeneratedDomainNameLabelScope.Completer.cs @@ -0,0 +1,47 @@ +// 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.VoiceServices.Support +{ + + /// Available auto-generated domain name scopes. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScopeTypeConverter))] + public partial struct AutoGeneratedDomainNameLabelScope : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TenantReuse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TenantReuse'", "TenantReuse", global::System.Management.Automation.CompletionResultType.ParameterValue, "TenantReuse"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SubscriptionReuse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SubscriptionReuse'", "SubscriptionReuse", global::System.Management.Automation.CompletionResultType.ParameterValue, "SubscriptionReuse"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ResourceGroupReuse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ResourceGroupReuse'", "ResourceGroupReuse", global::System.Management.Automation.CompletionResultType.ParameterValue, "ResourceGroupReuse"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NoReuse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NoReuse'", "NoReuse", global::System.Management.Automation.CompletionResultType.ParameterValue, "NoReuse"); + } + } + } +} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Support/AutoGeneratedDomainNameLabelScope.TypeConverter.cs b/src/VoiceServices/generated/api/Support/AutoGeneratedDomainNameLabelScope.TypeConverter.cs new file mode 100644 index 000000000000..4d3e17f3de27 --- /dev/null +++ b/src/VoiceServices/generated/api/Support/AutoGeneratedDomainNameLabelScope.TypeConverter.cs @@ -0,0 +1,59 @@ +// 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.VoiceServices.Support +{ + + /// Available auto-generated domain name scopes. + public partial class AutoGeneratedDomainNameLabelScopeTypeConverter : + 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) => true; + + /// + /// 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 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) => AutoGeneratedDomainNameLabelScope.CreateFrom(sourceValue); + + /// 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/VoiceServices/generated/api/Support/AutoGeneratedDomainNameLabelScope.cs b/src/VoiceServices/generated/api/Support/AutoGeneratedDomainNameLabelScope.cs new file mode 100644 index 000000000000..c5b52e929b96 --- /dev/null +++ b/src/VoiceServices/generated/api/Support/AutoGeneratedDomainNameLabelScope.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.VoiceServices.Support +{ + + /// Available auto-generated domain name scopes. + public partial struct AutoGeneratedDomainNameLabelScope : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope NoReuse = @"NoReuse"; + + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope ResourceGroupReuse = @"ResourceGroupReuse"; + + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope SubscriptionReuse = @"SubscriptionReuse"; + + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope TenantReuse = @"TenantReuse"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private AutoGeneratedDomainNameLabelScope(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AutoGeneratedDomainNameLabelScope + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AutoGeneratedDomainNameLabelScope(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AutoGeneratedDomainNameLabelScope + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type AutoGeneratedDomainNameLabelScope (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AutoGeneratedDomainNameLabelScope && Equals((AutoGeneratedDomainNameLabelScope)obj); + } + + /// Returns hashCode for enum AutoGeneratedDomainNameLabelScope + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AutoGeneratedDomainNameLabelScope + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AutoGeneratedDomainNameLabelScope + /// the value to convert to an instance of . + + public static implicit operator AutoGeneratedDomainNameLabelScope(string value) + { + return new AutoGeneratedDomainNameLabelScope(value); + } + + /// Implicit operator to convert AutoGeneratedDomainNameLabelScope to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope e) + { + return e._value; + } + + /// Overriding != operator for enum AutoGeneratedDomainNameLabelScope + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope e1, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AutoGeneratedDomainNameLabelScope + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope e1, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Support/CheckNameAvailabilityReason.Completer.cs b/src/VoiceServices/generated/api/Support/CheckNameAvailabilityReason.Completer.cs new file mode 100644 index 000000000000..878697e48a23 --- /dev/null +++ b/src/VoiceServices/generated/api/Support/CheckNameAvailabilityReason.Completer.cs @@ -0,0 +1,39 @@ +// 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.VoiceServices.Support +{ + + /// Possible reasons for a name not being available. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReasonTypeConverter))] + public partial struct CheckNameAvailabilityReason : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Invalid".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Invalid'", "Invalid", global::System.Management.Automation.CompletionResultType.ParameterValue, "Invalid"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AlreadyExists".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AlreadyExists'", "AlreadyExists", global::System.Management.Automation.CompletionResultType.ParameterValue, "AlreadyExists"); + } + } + } +} \ No newline at end of file diff --git a/src/VoiceServices/generated/api/Support/CheckNameAvailabilityReason.TypeConverter.cs b/src/VoiceServices/generated/api/Support/CheckNameAvailabilityReason.TypeConverter.cs new file mode 100644 index 000000000000..69b33717577c --- /dev/null +++ b/src/VoiceServices/generated/api/Support/CheckNameAvailabilityReason.TypeConverter.cs @@ -0,0 +1,59 @@ +// 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.VoiceServices.Support +{ + + /// Possible reasons for a name not being available. + public partial class CheckNameAvailabilityReasonTypeConverter : + 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) => true; + + /// + /// 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 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) => CheckNameAvailabilityReason.CreateFrom(sourceValue); + + /// 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/VoiceServices/generated/api/Support/CheckNameAvailabilityReason.cs b/src/VoiceServices/generated/api/Support/CheckNameAvailabilityReason.cs new file mode 100644 index 000000000000..ff57bdfbcfb3 --- /dev/null +++ b/src/VoiceServices/generated/api/Support/CheckNameAvailabilityReason.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.VoiceServices.Support +{ + + /// Possible reasons for a name not being available. + public partial struct CheckNameAvailabilityReason : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason AlreadyExists = @"AlreadyExists"; + + public static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason Invalid = @"Invalid"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private CheckNameAvailabilityReason(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to CheckNameAvailabilityReason + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CheckNameAvailabilityReason(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type CheckNameAvailabilityReason + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CheckNameAvailabilityReason (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CheckNameAvailabilityReason && Equals((CheckNameAvailabilityReason)obj); + } + + /// Returns hashCode for enum CheckNameAvailabilityReason + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CheckNameAvailabilityReason + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CheckNameAvailabilityReason + /// the value to convert to an instance of . + + public static implicit operator CheckNameAvailabilityReason(string value) + { + return new CheckNameAvailabilityReason(value); + } + + /// Implicit operator to convert CheckNameAvailabilityReason to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason e) + { + return e._value; + } + + /// Overriding != operator for enum CheckNameAvailabilityReason + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason e1, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CheckNameAvailabilityReason + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason e1, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.CheckNameAvailabilityReason e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsContact_Get.cs b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsContact_Get.cs deleted file mode 100644 index 559e68206437..000000000000 --- a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsContact_Get.cs +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - using System; - - /// Get a Contact - /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVoiceServicesCommunicationsContact_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact))] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Get a Contact")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] - public partial class GetAzVoiceServicesCommunicationsContact_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.MicrosoftVoiceServices Client => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.ClientAPI; - - /// Backing field for property. - private string _communicationsGatewayName; - - /// Unique identifier for this deployment - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique identifier for this deployment")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Unique identifier for this deployment", - SerializedName = @"communicationsGatewayName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string CommunicationsGatewayName { get => this._communicationsGatewayName; set => this._communicationsGatewayName = value; } - - /// - /// The credentials, account, tenant, and subscription used for communication with Azure - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// Unique identifier for this contact - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique identifier for this contact")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Unique identifier for this contact", - SerializedName = @"contactName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("ContactName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string[] _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public GetAzVoiceServicesCommunicationsContact_Get() - { - - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token); - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - foreach( var SubscriptionId in this.SubscriptionId ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ContactsGet(SubscriptionId, ResourceGroupName, CommunicationsGatewayName, Name, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CommunicationsGatewayName=CommunicationsGatewayName,Name=Name}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, CommunicationsGatewayName=CommunicationsGatewayName, Name=Name }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, CommunicationsGatewayName=CommunicationsGatewayName, Name=Name }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsContact_GetViaIdentity.cs b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsContact_GetViaIdentity.cs deleted file mode 100644 index d54496bbe2d8..000000000000 --- a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsContact_GetViaIdentity.cs +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - using System; - - /// Get a Contact - /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVoiceServicesCommunicationsContact_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact))] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Get a Contact")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] - public partial class GetAzVoiceServicesCommunicationsContact_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.MicrosoftVoiceServices Client => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.ClientAPI; - - /// - /// The credentials, account, tenant, and subscription used for communication with Azure - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public GetAzVoiceServicesCommunicationsContact_GetViaIdentity() - { - - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token); - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.ContactsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ResourceGroupName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.CommunicationsGatewayName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CommunicationsGatewayName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ContactName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ContactName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.ContactsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CommunicationsGatewayName ?? null, InputObject.ContactName ?? null, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsContact_List.cs b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsContact_List.cs deleted file mode 100644 index def02120c75a..000000000000 --- a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsContact_List.cs +++ /dev/null @@ -1,425 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - using System; - - /// List Contact resources by CommunicationsGateway - /// - /// [OpenAPI] ListByCommunicationsGateway=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVoiceServicesCommunicationsContact_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact))] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"List Contact resources by CommunicationsGateway")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] - public partial class GetAzVoiceServicesCommunicationsContact_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A flag to tell whether it is the first onOK call. - private bool _isFirst = true; - - /// Link to retrieve next page. - private string _nextLink; - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.MicrosoftVoiceServices Client => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.ClientAPI; - - /// Backing field for property. - private string _communicationsGatewayName; - - /// Unique identifier for this deployment - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique identifier for this deployment")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Unique identifier for this deployment", - SerializedName = @"communicationsGatewayName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string CommunicationsGatewayName { get => this._communicationsGatewayName; set => this._communicationsGatewayName = value; } - - /// - /// The credentials, account, tenant, and subscription used for communication with Azure - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string[] _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResult - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public GetAzVoiceServicesCommunicationsContact_List() - { - - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token); - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - foreach( var SubscriptionId in this.SubscriptionId ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ContactsListByCommunicationsGateway(SubscriptionId, ResourceGroupName, CommunicationsGatewayName, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CommunicationsGatewayName=CommunicationsGatewayName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, CommunicationsGatewayName=CommunicationsGatewayName }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, CommunicationsGatewayName=CommunicationsGatewayName }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactListResult - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // response should be returning an array of some kind. +Pageable - // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); - _nextLink = result.NextLink; - if (_isFirst) - { - _isFirst = false; - while (_nextLink != null) - { - if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) - { - requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Method.Get ); - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ContactsListByCommunicationsGateway_Call(requestMessage, onOk, onDefault, this, Pipeline); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_Get.cs b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_Get.cs index e1c66342ff7f..eaa3ed82d0ac 100644 --- a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_Get.cs +++ b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_Get.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVoiceServicesCommunicationsGateway_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Get a CommunicationsGateway")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class GetAzVoiceServicesCommunicationsGateway_Get : global::System.Management.Automation.PSCmdlet, @@ -158,12 +158,12 @@ public partial class GetAzVoiceServicesCommunicationsGateway_Get : global::Syste /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -379,12 +379,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,7 +396,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway WriteObject((await response)); } } diff --git a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_GetViaIdentity.cs b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_GetViaIdentity.cs index 4fcee4c9001c..55769e5d8939 100644 --- a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_GetViaIdentity.cs +++ b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_GetViaIdentity.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVoiceServicesCommunicationsGateway_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Get a CommunicationsGateway")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class GetAzVoiceServicesCommunicationsGateway_GetViaIdentity : global::System.Management.Automation.PSCmdlet, @@ -119,12 +119,12 @@ public partial class GetAzVoiceServicesCommunicationsGateway_GetViaIdentity : gl /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -357,12 +357,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +374,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway WriteObject((await response)); } } diff --git a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_List.cs b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_List.cs index 3c7e3dd8ba12..d0975d1159fd 100644 --- a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_List.cs +++ b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_List.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.VoiceServices/communicationsGateways" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVoiceServicesCommunicationsGateway_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"List CommunicationsGateway resources by subscription ID")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class GetAzVoiceServicesCommunicationsGateway_List : global::System.Management.Automation.PSCmdlet, @@ -135,12 +135,12 @@ public partial class GetAzVoiceServicesCommunicationsGateway_List : global::Syst /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -356,12 +356,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_List1.cs b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_List1.cs index 2af45b3fdf58..e35acb62f096 100644 --- a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_List1.cs +++ b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsGateway_List1.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVoiceServicesCommunicationsGateway_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"List CommunicationsGateway resources by resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class GetAzVoiceServicesCommunicationsGateway_List1 : global::System.Management.Automation.PSCmdlet, @@ -149,12 +149,12 @@ public partial class GetAzVoiceServicesCommunicationsGateway_List1 : global::Sys /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -370,12 +370,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_Get.cs b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_Get.cs index 6e0c4d306436..059281e8e5e9 100644 --- a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_Get.cs +++ b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_Get.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines/{testLineName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVoiceServicesCommunicationsTestLine_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Get a TestLine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class GetAzVoiceServicesCommunicationsTestLine_Get : global::System.Management.Automation.PSCmdlet, @@ -172,12 +172,12 @@ public partial class GetAzVoiceServicesCommunicationsTestLine_Get : global::Syst /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -393,12 +393,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +410,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine WriteObject((await response)); } } diff --git a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_GetViaIdentity.cs b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_GetViaIdentity.cs index 239c3fb9b439..8d45ed589b24 100644 --- a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_GetViaIdentity.cs +++ b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_GetViaIdentity.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines/{testLineName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVoiceServicesCommunicationsTestLine_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Get a TestLine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class GetAzVoiceServicesCommunicationsTestLine_GetViaIdentity : global::System.Management.Automation.PSCmdlet, @@ -119,12 +119,12 @@ public partial class GetAzVoiceServicesCommunicationsTestLine_GetViaIdentity : g /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -361,12 +361,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +378,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine WriteObject((await response)); } } diff --git a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_List.cs b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_List.cs index 62c1103b94a9..7e11d0518903 100644 --- a/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_List.cs +++ b/src/VoiceServices/generated/cmdlets/GetAzVoiceServicesCommunicationsTestLine_List.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] ListByCommunicationsGateway=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVoiceServicesCommunicationsTestLine_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"List TestLine resources by CommunicationsGateway")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class GetAzVoiceServicesCommunicationsTestLine_List : global::System.Management.Automation.PSCmdlet, @@ -163,12 +163,12 @@ public partial class GetAzVoiceServicesCommunicationsTestLine_List : global::Sys /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -384,12 +384,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsContact_CreateExpanded.cs b/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsContact_CreateExpanded.cs deleted file mode 100644 index ced436c64e47..000000000000 --- a/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsContact_CreateExpanded.cs +++ /dev/null @@ -1,556 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - using System; - - /// Create a Contact - /// - /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzVoiceServicesCommunicationsContact_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact))] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Create a Contact")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] - public partial class NewAzVoiceServicesCommunicationsContact_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A Contact resource - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.Contact(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.MicrosoftVoiceServices Client => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.ClientAPI; - - /// Backing field for property. - private string _communicationsGatewayName; - - /// Unique identifier for this deployment - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique identifier for this deployment")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Unique identifier for this deployment", - SerializedName = @"communicationsGatewayName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string CommunicationsGatewayName { get => this._communicationsGatewayName; set => this._communicationsGatewayName = value; } - - /// - /// The credentials, account, tenant, and subscription used for communication with Azure - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Email address of contact - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Email address of contact")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Email address of contact", - SerializedName = @"email", - PossibleTypes = new [] { typeof(string) })] - public string Email { get => _resourceBody.Email ?? null; set => _resourceBody.Email = value; } - - /// Full name of contact - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Full name of contact")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Full name of contact", - SerializedName = @"contactName", - PossibleTypes = new [] { typeof(string) })] - public string FullContactName { get => _resourceBody.ContactName ?? null; set => _resourceBody.ContactName = value; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// Unique identifier for this contact - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique identifier for this contact")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Unique identifier for this contact", - SerializedName = @"contactName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("ContactName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// Telephone number of contact - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Telephone number of contact")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Telephone number of contact", - SerializedName = @"phoneNumber", - PossibleTypes = new [] { typeof(string) })] - public string PhoneNumber { get => _resourceBody.PhoneNumber ?? null; set => _resourceBody.PhoneNumber = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Job title of contact - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Job title of contact")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Job title of contact", - SerializedName = @"role", - PossibleTypes = new [] { typeof(string) })] - public string Role { get => _resourceBody.Role ?? null; set => _resourceBody.Role = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of NewAzVoiceServicesCommunicationsContact_CreateExpanded - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets.NewAzVoiceServicesCommunicationsContact_CreateExpanded Clone() - { - var clone = new NewAzVoiceServicesCommunicationsContact_CreateExpanded(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone._resourceBody = this._resourceBody; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.CommunicationsGatewayName = this.CommunicationsGatewayName; - clone.Name = this.Name; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzVoiceServicesCommunicationsContact_CreateExpanded() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'ContactsCreateOrUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ContactsCreateOrUpdate(SubscriptionId, ResourceGroupName, CommunicationsGatewayName, Name, _resourceBody, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CommunicationsGatewayName=CommunicationsGatewayName,Name=Name,body=_resourceBody}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, CommunicationsGatewayName=CommunicationsGatewayName, Name=Name, body=_resourceBody }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, CommunicationsGatewayName=CommunicationsGatewayName, Name=Name, body=_resourceBody }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsGateway_CreateExpanded.cs b/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsGateway_CreateExpanded.cs index d19ca52e6ca9..2680ef064b7b 100644 --- a/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsGateway_CreateExpanded.cs +++ b/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsGateway_CreateExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzVoiceServicesCommunicationsGateway_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Create a CommunicationsGateway")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class NewAzVoiceServicesCommunicationsGateway_CreateExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,7 +34,7 @@ public partial class NewAzVoiceServicesCommunicationsGateway_CreateExpanded : gl private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// A CommunicationsGateway resource - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGateway(); + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGateway(); /// Details of API bridge functionality, if required [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -45,8 +45,8 @@ public partial class NewAzVoiceServicesCommunicationsGateway_CreateExpanded : gl ReadOnly = false, Description = @"Details of API bridge functionality, if required", SerializedName = @"apiBridge", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IApiBridgeProperties ApiBridge { get => _resourceBody.ApiBridge ?? null /* object */; set => _resourceBody.ApiBridge = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IApiBridgeProperties ApiBridge { get => _resourceBody.ApiBridge ?? null /* object */; set => _resourceBody.ApiBridge = value; } /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -83,6 +83,18 @@ public partial class NewAzVoiceServicesCommunicationsGateway_CreateExpanded : gl [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// The scope at which the auto-generated domain name can be re-used + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The scope at which the auto-generated domain name can be re-used")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The scope at which the auto-generated domain name can be re-used", + SerializedName = @"autoGeneratedDomainNameLabelScope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope))] + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope DomainNameLabelScope { get => _resourceBody.AutoGeneratedDomainNameLabelScope ?? ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope)""); set => _resourceBody.AutoGeneratedDomainNameLabelScope = value; } + /// How to handle 911 calls [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "How to handle 911 calls")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] @@ -95,6 +107,18 @@ public partial class NewAzVoiceServicesCommunicationsGateway_CreateExpanded : gl [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type))] public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type E911Type { get => _resourceBody.E911Type ?? ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.E911Type)""); set => _resourceBody.E911Type = value; } + /// A list of dial strings used for emergency calling. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of dial strings used for emergency calling.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of dial strings used for emergency calling.", + SerializedName = @"emergencyDialStrings", + PossibleTypes = new [] { typeof(string) })] + public string[] EmergencyDialString { get => _resourceBody.EmergencyDialString ?? null /* arrayOf */; set => _resourceBody.EmergencyDialString = value; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -151,6 +175,17 @@ public partial class NewAzVoiceServicesCommunicationsGateway_CreateExpanded : gl [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + /// Whether an on-premises Mobile Control Point is in use. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether an on-premises Mobile Control Point is in use.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether an on-premises Mobile Control Point is in use.", + SerializedName = @"onPremMcpEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter OnPremMcpEnabled { get => _resourceBody.OnPremMcpEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.OnPremMcpEnabled = value; } + /// /// The instance of the that the remote call will use. /// @@ -208,8 +243,8 @@ public partial class NewAzVoiceServicesCommunicationsGateway_CreateExpanded : gl ReadOnly = false, Description = @"The regions in which to deploy the resources needed for Teams Calling", SerializedName = @"serviceLocations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[] ServiceLocation { get => _resourceBody.ServiceLocation ?? null /* arrayOf */; set => _resourceBody.ServiceLocation = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[] ServiceLocation { get => _resourceBody.ServiceLocation ?? null /* arrayOf */; set => _resourceBody.ServiceLocation = value; } /// Backing field for property. private string _subscriptionId; @@ -241,6 +276,19 @@ public partial class NewAzVoiceServicesCommunicationsGateway_CreateExpanded : gl PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags) })] public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + /// + /// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.", + SerializedName = @"teamsVoicemailPilotNumber", + PossibleTypes = new [] { typeof(string) })] + public string TeamsVoicemailPilotNumber { get => _resourceBody.TeamsVoicemailPilotNumber ?? null; set => _resourceBody.TeamsVoicemailPilotNumber = value; } + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior @@ -258,12 +306,12 @@ public partial class NewAzVoiceServicesCommunicationsGateway_CreateExpanded : gl /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -533,12 +581,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -550,7 +598,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway WriteObject((await response)); } } diff --git a/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsTestLine_CreateExpanded.cs b/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsTestLine_CreateExpanded.cs index 62d2b7be8fd1..aef326b070c2 100644 --- a/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsTestLine_CreateExpanded.cs +++ b/src/VoiceServices/generated/cmdlets/NewAzVoiceServicesCommunicationsTestLine_CreateExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines/{testLineName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzVoiceServicesCommunicationsTestLine_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Create a TestLine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class NewAzVoiceServicesCommunicationsTestLine_CreateExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,7 +34,7 @@ public partial class NewAzVoiceServicesCommunicationsTestLine_CreateExpanded : g private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// A TestLine resource - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLine(); + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLine(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -234,12 +234,12 @@ public partial class NewAzVoiceServicesCommunicationsTestLine_CreateExpanded : g /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -510,12 +510,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -527,7 +527,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine WriteObject((await response)); } } diff --git a/src/VoiceServices/generated/cmdlets/RemoveAzVoiceServicesCommunicationsContact_Delete.cs b/src/VoiceServices/generated/cmdlets/RemoveAzVoiceServicesCommunicationsContact_Delete.cs deleted file mode 100644 index a1f5dfa19a51..000000000000 --- a/src/VoiceServices/generated/cmdlets/RemoveAzVoiceServicesCommunicationsContact_Delete.cs +++ /dev/null @@ -1,524 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - using System; - - /// Delete a Contact - /// - /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzVoiceServicesCommunicationsContact_Delete", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Delete a Contact")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] - public partial class RemoveAzVoiceServicesCommunicationsContact_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.MicrosoftVoiceServices Client => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.ClientAPI; - - /// Backing field for property. - private string _communicationsGatewayName; - - /// Unique identifier for this deployment - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique identifier for this deployment")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Unique identifier for this deployment", - SerializedName = @"communicationsGatewayName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string CommunicationsGatewayName { get => this._communicationsGatewayName; set => this._communicationsGatewayName = value; } - - /// - /// The credentials, account, tenant, and subscription used for communication with Azure - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// Unique identifier for this contact - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique identifier for this contact")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Unique identifier for this contact", - SerializedName = @"contactName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("ContactName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of - /// what happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onNoContent method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzVoiceServicesCommunicationsContact_Delete - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets.RemoveAzVoiceServicesCommunicationsContact_Delete Clone() - { - var clone = new RemoveAzVoiceServicesCommunicationsContact_Delete(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.CommunicationsGatewayName = this.CommunicationsGatewayName; - clone.Name = this.Name; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'ContactsDelete' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ContactsDelete(SubscriptionId, ResourceGroupName, CommunicationsGatewayName, Name, onOk, onNoContent, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CommunicationsGatewayName=CommunicationsGatewayName,Name=Name}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public RemoveAzVoiceServicesCommunicationsContact_Delete() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, CommunicationsGatewayName=CommunicationsGatewayName, Name=Name }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, CommunicationsGatewayName=CommunicationsGatewayName, Name=Name }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 204 (NoContent). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnNoContent(responseMessage, ref _returnNow); - // if overrideOnNoContent has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/cmdlets/RemoveAzVoiceServicesCommunicationsContact_DeleteViaIdentity.cs b/src/VoiceServices/generated/cmdlets/RemoveAzVoiceServicesCommunicationsContact_DeleteViaIdentity.cs deleted file mode 100644 index 30c1d7d5fbb5..000000000000 --- a/src/VoiceServices/generated/cmdlets/RemoveAzVoiceServicesCommunicationsContact_DeleteViaIdentity.cs +++ /dev/null @@ -1,493 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - using System; - - /// Delete a Contact - /// - /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzVoiceServicesCommunicationsContact_DeleteViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Delete a Contact")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] - public partial class RemoveAzVoiceServicesCommunicationsContact_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.MicrosoftVoiceServices Client => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.ClientAPI; - - /// - /// The credentials, account, tenant, and subscription used for communication with Azure - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of - /// what happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onNoContent method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// - /// a duplicate instance of RemoveAzVoiceServicesCommunicationsContact_DeleteViaIdentity - /// - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets.RemoveAzVoiceServicesCommunicationsContact_DeleteViaIdentity Clone() - { - var clone = new RemoveAzVoiceServicesCommunicationsContact_DeleteViaIdentity(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'ContactsDelete' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.ContactsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ResourceGroupName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.CommunicationsGatewayName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CommunicationsGatewayName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ContactName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ContactName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.ContactsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CommunicationsGatewayName ?? null, InputObject.ContactName ?? null, onOk, onNoContent, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public RemoveAzVoiceServicesCommunicationsContact_DeleteViaIdentity() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 204 (NoContent). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnNoContent(responseMessage, ref _returnNow); - // if overrideOnNoContent has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded.cs b/src/VoiceServices/generated/cmdlets/TestAzVoiceServicesNameAvailability_CheckExpanded.cs similarity index 84% rename from src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded.cs rename to src/VoiceServices/generated/cmdlets/TestAzVoiceServicesNameAvailability_CheckExpanded.cs index 2b3c7fa1ebd1..09b4802cec8a 100644 --- a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded.cs +++ b/src/VoiceServices/generated/cmdlets/TestAzVoiceServicesNameAvailability_CheckExpanded.cs @@ -8,15 +8,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; using System; - /// Update a Contact + /// Check whether the resource name is available in the given region. /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}" + /// [OpenAPI] CheckLocal=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.VoiceServices/locations/{location}/checkNameAvailability" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzVoiceServicesCommunicationsContact_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact))] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Update a Contact")] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzVoiceServicesNameAvailability_CheckExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Check whether the resource name is available in the given region.")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] - public partial class UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + public partial class TestAzVoiceServicesNameAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener { /// A unique id generatd for the this cmdlet when it is instantiated. @@ -28,14 +28,14 @@ public partial class UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded : /// A unique id generatd for the this cmdlet when ProcessRecord() is called. private string __processRecordId; + /// The check availability request body. + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityRequest _body = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CheckNameAvailabilityRequest(); + /// /// The for this operation. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - /// The type used for update operations of the Contact. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactUpdate(); - /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] @@ -44,20 +44,6 @@ public partial class UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded : /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.MicrosoftVoiceServices Client => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.ClientAPI; - /// Backing field for property. - private string _communicationsGatewayName; - - /// Unique identifier for this deployment - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique identifier for this deployment")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Unique identifier for this deployment", - SerializedName = @"communicationsGatewayName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string CommunicationsGatewayName { get => this._communicationsGatewayName; set => this._communicationsGatewayName = value; } - /// /// The credentials, account, tenant, and subscription used for communication with Azure /// @@ -82,6 +68,20 @@ public partial class UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded : /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Backing field for property. + private string _location; + + /// The location in which uniqueness will be verified. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The location in which uniqueness will be verified.")] + [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The location in which uniqueness will be verified.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -90,20 +90,16 @@ public partial class UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded : /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Backing field for property. - private string _name; - - /// Unique identifier for this contact - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique identifier for this contact")] + /// The name of the resource for which availability needs to be checked. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the resource for which availability needs to be checked.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, - Description = @"Unique identifier for this contact", - SerializedName = @"contactName", + Description = @"The name of the resource for which availability needs to be checked.", + SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("ContactName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } + public string Name { get => _body.Name ?? null; set => _body.Name = value; } /// /// The instance of the that the remote call will use. @@ -126,20 +122,6 @@ public partial class UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded : [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - /// Backing field for property. private string _subscriptionId; @@ -158,17 +140,16 @@ public partial class UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded : [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + /// The resource type. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + Description = @"The resource type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + public string Type { get => _body.Type ?? null; set => _body.Type = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -187,12 +168,12 @@ public partial class UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded : /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -280,7 +261,7 @@ protected override void ProcessRecord() try { // work - if (ShouldProcess($"Call remote 'ContactsUpdate' operation")) + if (ShouldProcess($"Call remote 'NameAvailabilityCheckLocal' operation")) { using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token) ) { @@ -332,12 +313,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ContactsUpdate(SubscriptionId, ResourceGroupName, CommunicationsGatewayName, Name, _propertiesBody, onOk, onDefault, this, Pipeline); + await this.Client.NameAvailabilityCheckLocal(Location, SubscriptionId, _body, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,CommunicationsGatewayName=CommunicationsGatewayName,Name=Name,body=_propertiesBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Location=Location,SubscriptionId=SubscriptionId,body=_body}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -357,9 +338,9 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Intializes a new instance of the cmdlet class. /// - public UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded() + public TestAzVoiceServicesNameAvailability_CheckExpanded() { } @@ -391,14 +372,14 @@ public UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, CommunicationsGatewayName=CommunicationsGatewayName, Name=Name, body=_propertiesBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Location=Location, SubscriptionId=SubscriptionId, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, CommunicationsGatewayName=CommunicationsGatewayName, Name=Name, body=_propertiesBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Location=Location, SubscriptionId=SubscriptionId, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -408,12 +389,12 @@ public UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,7 +406,7 @@ public UpdateAzVoiceServicesCommunicationsContact_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse WriteObject((await response)); } } diff --git a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsContact_UpdateViaIdentityExpanded.cs b/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsContact_UpdateViaIdentityExpanded.cs deleted file mode 100644 index 2f7e6774d2f8..000000000000 --- a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsContact_UpdateViaIdentityExpanded.cs +++ /dev/null @@ -1,405 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Extensions; - using System; - - /// Update a Contact - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzVoiceServicesCommunicationsContact_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact))] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Update a Contact")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] - public partial class UpdateAzVoiceServicesCommunicationsContact_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// The type used for update operations of the Contact. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ContactUpdate(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.MicrosoftVoiceServices Client => Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.ClientAPI; - - /// - /// The credentials, account, tenant, and subscription used for communication with Azure - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContactUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'ContactsUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token); - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.ContactsUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ResourceGroupName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.CommunicationsGatewayName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CommunicationsGatewayName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ContactName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ContactName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.ContactsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.CommunicationsGatewayName ?? null, InputObject.ContactName ?? null, _propertiesBody, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet - /// class. - /// - public UpdateAzVoiceServicesCommunicationsContact_UpdateViaIdentityExpanded() - { - - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api30.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsGateway_UpdateExpanded.cs b/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsGateway_UpdateExpanded.cs index 866af9d888ef..10bd2e367679 100644 --- a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsGateway_UpdateExpanded.cs +++ b/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsGateway_UpdateExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzVoiceServicesCommunicationsGateway_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Update a CommunicationsGateway")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class UpdateAzVoiceServicesCommunicationsGateway_UpdateExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,7 +34,7 @@ public partial class UpdateAzVoiceServicesCommunicationsGateway_UpdateExpanded : private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// The type used for update operations of the CommunicationsGateway. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayUpdate(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -153,8 +153,8 @@ public partial class UpdateAzVoiceServicesCommunicationsGateway_UpdateExpanded : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -173,12 +173,12 @@ public partial class UpdateAzVoiceServicesCommunicationsGateway_UpdateExpanded : /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -394,12 +394,12 @@ public UpdateAzVoiceServicesCommunicationsGateway_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -411,7 +411,7 @@ public UpdateAzVoiceServicesCommunicationsGateway_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway WriteObject((await response)); } } diff --git a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsGateway_UpdateViaIdentityExpanded.cs b/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsGateway_UpdateViaIdentityExpanded.cs index 99703cba08b0..1d77e5ef4c5b 100644 --- a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsGateway_UpdateViaIdentityExpanded.cs +++ b/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsGateway_UpdateViaIdentityExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzVoiceServicesCommunicationsGateway_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Update a CommunicationsGateway")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class UpdateAzVoiceServicesCommunicationsGateway_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,7 +34,7 @@ public partial class UpdateAzVoiceServicesCommunicationsGateway_UpdateViaIdentit private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// The type used for update operations of the CommunicationsGateway. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.CommunicationsGatewayUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.CommunicationsGatewayUpdate(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -114,8 +114,8 @@ public partial class UpdateAzVoiceServicesCommunicationsGateway_UpdateViaIdentit ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGatewayUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGatewayUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -134,12 +134,12 @@ public partial class UpdateAzVoiceServicesCommunicationsGateway_UpdateViaIdentit /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -376,12 +376,12 @@ public UpdateAzVoiceServicesCommunicationsGateway_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -393,7 +393,7 @@ public UpdateAzVoiceServicesCommunicationsGateway_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway WriteObject((await response)); } } diff --git a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsTestLine_UpdateExpanded.cs b/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsTestLine_UpdateExpanded.cs index fe2e62f48681..0df9525c8b20 100644 --- a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsTestLine_UpdateExpanded.cs +++ b/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsTestLine_UpdateExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines/{testLineName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzVoiceServicesCommunicationsTestLine_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Update a TestLine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class UpdateAzVoiceServicesCommunicationsTestLine_UpdateExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,7 +34,7 @@ public partial class UpdateAzVoiceServicesCommunicationsTestLine_UpdateExpanded private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// The type used for update operations of the TestLine. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineUpdate(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -167,8 +167,8 @@ public partial class UpdateAzVoiceServicesCommunicationsTestLine_UpdateExpanded ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -187,12 +187,12 @@ public partial class UpdateAzVoiceServicesCommunicationsTestLine_UpdateExpanded /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -408,12 +408,12 @@ public UpdateAzVoiceServicesCommunicationsTestLine_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,7 +425,7 @@ public UpdateAzVoiceServicesCommunicationsTestLine_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine WriteObject((await response)); } } diff --git a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsTestLine_UpdateViaIdentityExpanded.cs b/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsTestLine_UpdateViaIdentityExpanded.cs index 55aed4a5d99b..674ca38b998f 100644 --- a/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsTestLine_UpdateViaIdentityExpanded.cs +++ b/src/VoiceServices/generated/cmdlets/UpdateAzVoiceServicesCommunicationsTestLine_UpdateViaIdentityExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines/{testLineName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzVoiceServicesCommunicationsTestLine_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Description(@"Update a TestLine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Generated] public partial class UpdateAzVoiceServicesCommunicationsTestLine_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,7 +34,7 @@ public partial class UpdateAzVoiceServicesCommunicationsTestLine_UpdateViaIdenti private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// The type used for update operations of the TestLine. - private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.TestLineUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.TestLineUpdate(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -114,8 +114,8 @@ public partial class UpdateAzVoiceServicesCommunicationsTestLine_UpdateViaIdenti ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLineUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLineUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -134,12 +134,12 @@ public partial class UpdateAzVoiceServicesCommunicationsTestLine_UpdateViaIdenti /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -380,12 +380,12 @@ public UpdateAzVoiceServicesCommunicationsTestLine_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -397,7 +397,7 @@ public UpdateAzVoiceServicesCommunicationsTestLine_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine WriteObject((await response)); } } diff --git a/src/VoiceServices/help/Az.VoiceServices.md b/src/VoiceServices/help/Az.VoiceServices.md index 713a846373d1..4afc94f1208e 100644 --- a/src/VoiceServices/help/Az.VoiceServices.md +++ b/src/VoiceServices/help/Az.VoiceServices.md @@ -11,18 +11,12 @@ Locale: en-US Microsoft Azure PowerShell: VoiceServices cmdlets ## Az.VoiceServices Cmdlets -### [Get-AzVoiceServicesCommunicationsContact](Get-AzVoiceServicesCommunicationsContact.md) -Get a Contact - ### [Get-AzVoiceServicesCommunicationsGateway](Get-AzVoiceServicesCommunicationsGateway.md) Get a CommunicationsGateway ### [Get-AzVoiceServicesCommunicationsTestLine](Get-AzVoiceServicesCommunicationsTestLine.md) Get a TestLine -### [New-AzVoiceServicesCommunicationsContact](New-AzVoiceServicesCommunicationsContact.md) -Create a Contact - ### [New-AzVoiceServicesCommunicationsGateway](New-AzVoiceServicesCommunicationsGateway.md) Create a CommunicationsGateway @@ -32,17 +26,14 @@ Create an in-memory object for ServiceRegionProperties. ### [New-AzVoiceServicesCommunicationsTestLine](New-AzVoiceServicesCommunicationsTestLine.md) Create a TestLine -### [Remove-AzVoiceServicesCommunicationsContact](Remove-AzVoiceServicesCommunicationsContact.md) -Delete a Contact - ### [Remove-AzVoiceServicesCommunicationsGateway](Remove-AzVoiceServicesCommunicationsGateway.md) Delete a CommunicationsGateway ### [Remove-AzVoiceServicesCommunicationsTestLine](Remove-AzVoiceServicesCommunicationsTestLine.md) Delete a TestLine -### [Update-AzVoiceServicesCommunicationsContact](Update-AzVoiceServicesCommunicationsContact.md) -Update a Contact +### [Test-AzVoiceServicesNameAvailability](Test-AzVoiceServicesNameAvailability.md) +Check whether the resource name is available in the given region. ### [Update-AzVoiceServicesCommunicationsGateway](Update-AzVoiceServicesCommunicationsGateway.md) Update a CommunicationsGateway diff --git a/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsContact.md b/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsContact.md deleted file mode 100644 index 3749214e252b..000000000000 --- a/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsContact.md +++ /dev/null @@ -1,200 +0,0 @@ ---- -external help file: -Module Name: Az.VoiceServices -online version: https://learn.microsoft.com/powershell/module/az.voiceservices/get-azvoiceservicescommunicationscontact -schema: 2.0.0 ---- - -# Get-AzVoiceServicesCommunicationsContact - -## SYNOPSIS -Get a Contact - -## SYNTAX - -### List (Default) -``` -Get-AzVoiceServicesCommunicationsContact -CommunicationsGatewayName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [] -``` - -### Get -``` -Get-AzVoiceServicesCommunicationsContact -CommunicationsGatewayName -Name - -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] -``` - -### GetViaIdentity -``` -Get-AzVoiceServicesCommunicationsContact -InputObject [-DefaultProfile ] - [] -``` - -## DESCRIPTION -Get a Contact - -## EXAMPLES - -### Example 1: List all contacts under the communications gateway -```powershell -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus gateway-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 7:47:30 AM v-diya@microsoft.com User vtest-communication-rg -``` - -List all contacts under the communications gateway. - -### Example 2: Get a contact -```powershell -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus gateway-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 7:47:30 AM v-diya@microsoft.com User vtest-communication-rg -``` - -Get a contact. - -### Example 3: Get a contact by pipeline -```powershell -New-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -Location 'westcentralus' -PhoneNumber "+1-555-1234" -FullContactName "John Smith" -Email "johnsmith@example.com" -Role "Network Manager" | Get-AzVoiceServicesCommunicationsContact -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus gateway-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 7:47:30 AM v-diya@microsoft.com User vtest-communication-rg -``` - -Get a contact by pipeline. - -## PARAMETERS - -### -CommunicationsGatewayName -Unique identifier for this deployment - -```yaml -Type: System.String -Parameter Sets: Get, List -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity -Parameter Sets: GetViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Name -Unique identifier for this contact - -```yaml -Type: System.String -Parameter Sets: Get -Aliases: ContactName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. -The name is case insensitive. - -```yaml -Type: System.String -Parameter Sets: Get, List -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -The ID of the target subscription. - -```yaml -Type: System.String[] -Parameter Sets: Get, List -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - -## NOTES - -ALIASES - -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 - - `[CommunicationsGatewayName ]`: Unique identifier for this deployment - - `[ContactName ]`: Unique identifier for this contact - - `[Id ]`: Resource identity path - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[TestLineName ]`: Unique identifier for this test line - -## RELATED LINKS - diff --git a/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsGateway.md b/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsGateway.md index a716fa32ec4a..1d55897c5db8 100644 --- a/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsGateway.md +++ b/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsGateway.md @@ -187,7 +187,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway +### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway ## NOTES @@ -200,8 +200,8 @@ To create the parameters described below, construct a hash table containing the `INPUTOBJECT `: Identity Parameter - `[CommunicationsGatewayName ]`: Unique identifier for this deployment - - `[ContactName ]`: Unique identifier for this contact - `[Id ]`: Resource identity path + - `[Location ]`: The location in which uniqueness will be verified. - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SubscriptionId ]`: The ID of the target subscription. - `[TestLineName ]`: Unique identifier for this test line diff --git a/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsTestLine.md b/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsTestLine.md index eecdc5ce7f15..0395026e8d00 100644 --- a/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsTestLine.md +++ b/src/VoiceServices/help/Get-AzVoiceServicesCommunicationsTestLine.md @@ -177,7 +177,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine +### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine ## NOTES @@ -190,8 +190,8 @@ To create the parameters described below, construct a hash table containing the `INPUTOBJECT `: Identity Parameter - `[CommunicationsGatewayName ]`: Unique identifier for this deployment - - `[ContactName ]`: Unique identifier for this contact - `[Id ]`: Resource identity path + - `[Location ]`: The location in which uniqueness will be verified. - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SubscriptionId ]`: The ID of the target subscription. - `[TestLineName ]`: Unique identifier for this test line diff --git a/src/VoiceServices/help/New-AzVoiceServicesCommunicationsContact.md b/src/VoiceServices/help/New-AzVoiceServicesCommunicationsContact.md deleted file mode 100644 index 7b7b8a42a65f..000000000000 --- a/src/VoiceServices/help/New-AzVoiceServicesCommunicationsContact.md +++ /dev/null @@ -1,283 +0,0 @@ ---- -external help file: -Module Name: Az.VoiceServices -online version: https://learn.microsoft.com/powershell/module/az.voiceservices/new-azvoiceservicescommunicationscontact -schema: 2.0.0 ---- - -# New-AzVoiceServicesCommunicationsContact - -## SYNOPSIS -Create a Contact - -## SYNTAX - -``` -New-AzVoiceServicesCommunicationsContact -CommunicationsGatewayName -Name - -ResourceGroupName -Location [-SubscriptionId ] [-Email ] - [-FullContactName ] [-PhoneNumber ] [-Role ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -Create a Contact - -## EXAMPLES - -### Example 1: Create a contact for the communications gateway -```powershell -New-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name contact-01 -Location 'westcentralus' -PhoneNumber "+1-555-1234" -FullContactName "John Smith" -Email "johnsmith@example.com" -Role "Network Manager" -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus contact-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 7:47:30 AM v-diya@microsoft.com User vtest-communication-rg -``` - -Create a contact for the communications gateway. - -## PARAMETERS - -### -AsJob -Run the command as a job - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CommunicationsGatewayName -Unique identifier for this deployment - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Email -Email address of contact - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FullContactName -Full name of contact - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Location -The geo-location where the resource lives - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name -Unique identifier for this contact - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ContactName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NoWait -Run the command asynchronously - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PhoneNumber -Telephone number of contact - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. -The name is case insensitive. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Role -Job title of contact - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -The ID of the target subscription. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -Resource tags. - -```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - -## NOTES - -ALIASES - -## RELATED LINKS - diff --git a/src/VoiceServices/help/New-AzVoiceServicesCommunicationsGateway.md b/src/VoiceServices/help/New-AzVoiceServicesCommunicationsGateway.md index d246d2e19fdc..00f574fb91a0 100644 --- a/src/VoiceServices/help/New-AzVoiceServicesCommunicationsGateway.md +++ b/src/VoiceServices/help/New-AzVoiceServicesCommunicationsGateway.md @@ -14,8 +14,10 @@ Create a CommunicationsGateway ``` New-AzVoiceServicesCommunicationsGateway -Name -ResourceGroupName -Location - [-SubscriptionId ] [-ApiBridge ] [-Codec ] [-E911Type ] - [-Platform ] [-ServiceLocation ] [-Tag ] + [-SubscriptionId ] [-ApiBridge ] [-Codec ] + [-DomainNameLabelScope ] [-E911Type ] + [-EmergencyDialString ] [-OnPremMcpEnabled] [-Platform ] + [-ServiceLocation ] [-Tag ] [-TeamsVoicemailPilotNumber ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -103,6 +105,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -DomainNameLabelScope +The scope at which the auto-generated domain name can be re-used + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Support.AutoGeneratedDomainNameLabelScope +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -E911Type How to handle 911 calls @@ -118,6 +135,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EmergencyDialString +A list of dial strings used for emergency calling. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Location The geo-location where the resource lives @@ -163,6 +195,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -OnPremMcpEnabled +Whether an on-premises Mobile Control Point is in use. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Platform What platforms to support @@ -199,7 +246,7 @@ The regions in which to deploy the resources needed for Teams Calling To construct, see NOTES section for SERVICELOCATION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IServiceRegionProperties[] +Type: Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.IServiceRegionProperties[] Parameter Sets: (All) Aliases: @@ -240,6 +287,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TeamsVoicemailPilotNumber +This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. @@ -278,7 +340,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway +### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway ## NOTES @@ -292,6 +354,8 @@ To create the parameters described below, construct a hash table containing the `SERVICELOCATION `: The regions in which to deploy the resources needed for Teams Calling - `Name `: The name of the region in which the resources needed for Teams Calling will be deployed. - `PrimaryRegionPropertyOperatorAddress `: IP address to use to contact the operator network from this region + - `[PrimaryRegionPropertyAllowedMediaSourceAddressPrefix ]`: The allowed source IP address or CIDR ranges for media + - `[PrimaryRegionPropertyAllowedSignalingSourceAddressPrefix ]`: The allowed source IP address or CIDR ranges for signaling - `[PrimaryRegionPropertyEsrpAddress ]`: IP address to use to contact the ESRP from this region ## RELATED LINKS diff --git a/src/VoiceServices/help/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.md b/src/VoiceServices/help/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.md index 0b06f75cb1ee..27bada233d71 100644 --- a/src/VoiceServices/help/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.md +++ b/src/VoiceServices/help/New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.md @@ -93,7 +93,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ServiceRegionProperties +### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties ## NOTES diff --git a/src/VoiceServices/help/New-AzVoiceServicesCommunicationsTestLine.md b/src/VoiceServices/help/New-AzVoiceServicesCommunicationsTestLine.md index 0b1e084d7228..7788d551afa1 100644 --- a/src/VoiceServices/help/New-AzVoiceServicesCommunicationsTestLine.md +++ b/src/VoiceServices/help/New-AzVoiceServicesCommunicationsTestLine.md @@ -244,7 +244,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine +### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine ## NOTES diff --git a/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsContact.md b/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsContact.md deleted file mode 100644 index f8d095ad47d7..000000000000 --- a/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsContact.md +++ /dev/null @@ -1,246 +0,0 @@ ---- -external help file: -Module Name: Az.VoiceServices -online version: https://learn.microsoft.com/powershell/module/az.voiceservices/remove-azvoiceservicescommunicationscontact -schema: 2.0.0 ---- - -# Remove-AzVoiceServicesCommunicationsContact - -## SYNOPSIS -Delete a Contact - -## SYNTAX - -### Delete (Default) -``` -Remove-AzVoiceServicesCommunicationsContact -CommunicationsGatewayName -Name - -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] -``` - -### DeleteViaIdentity -``` -Remove-AzVoiceServicesCommunicationsContact -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -Delete a Contact - -## EXAMPLES - -### Example 1: Delete a contact -```powershell -Remove-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -``` - -Delete a contact. - -### Example 2: Delete a contact by pipeline -```powershell -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 | Remove-AzVoiceServicesCommunicationsContact -``` - -Delete a contact by pipeline. - -## PARAMETERS - -### -AsJob -Run the command as a job - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CommunicationsGatewayName -Unique identifier for this deployment - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity -Parameter Sets: DeleteViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Name -Unique identifier for this contact - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: ContactName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NoWait -Run the command asynchronously - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Returns true when the command succeeds - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. -The name is case insensitive. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -The ID of the target subscription. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity - -## OUTPUTS - -### System.Boolean - -## NOTES - -ALIASES - -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 - - `[CommunicationsGatewayName ]`: Unique identifier for this deployment - - `[ContactName ]`: Unique identifier for this contact - - `[Id ]`: Resource identity path - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[TestLineName ]`: Unique identifier for this test line - -## RELATED LINKS - diff --git a/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsGateway.md b/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsGateway.md index 826d7e0d5f32..375671bc9f9b 100644 --- a/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsGateway.md +++ b/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsGateway.md @@ -221,8 +221,8 @@ To create the parameters described below, construct a hash table containing the `INPUTOBJECT `: Identity Parameter - `[CommunicationsGatewayName ]`: Unique identifier for this deployment - - `[ContactName ]`: Unique identifier for this contact - `[Id ]`: Resource identity path + - `[Location ]`: The location in which uniqueness will be verified. - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SubscriptionId ]`: The ID of the target subscription. - `[TestLineName ]`: Unique identifier for this test line diff --git a/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsTestLine.md b/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsTestLine.md index f4e30ab29485..74193f0721c9 100644 --- a/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsTestLine.md +++ b/src/VoiceServices/help/Remove-AzVoiceServicesCommunicationsTestLine.md @@ -236,8 +236,8 @@ To create the parameters described below, construct a hash table containing the `INPUTOBJECT `: Identity Parameter - `[CommunicationsGatewayName ]`: Unique identifier for this deployment - - `[ContactName ]`: Unique identifier for this contact - `[Id ]`: Resource identity path + - `[Location ]`: The location in which uniqueness will be verified. - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SubscriptionId ]`: The ID of the target subscription. - `[TestLineName ]`: Unique identifier for this test line diff --git a/src/VoiceServices/help/Test-AzVoiceServicesNameAvailability.md b/src/VoiceServices/help/Test-AzVoiceServicesNameAvailability.md new file mode 100644 index 000000000000..888a6da78af5 --- /dev/null +++ b/src/VoiceServices/help/Test-AzVoiceServicesNameAvailability.md @@ -0,0 +1,160 @@ +--- +external help file: +Module Name: Az.VoiceServices +online version: https://learn.microsoft.com/powershell/module/az.voiceservices/test-azvoiceservicesnameavailability +schema: 2.0.0 +--- + +# Test-AzVoiceServicesNameAvailability + +## SYNOPSIS +Check whether the resource name is available in the given region. + +## SYNTAX + +``` +Test-AzVoiceServicesNameAvailability -Location [-SubscriptionId ] [-Name ] + [-Type ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Check whether the resource name is available in the given region. + +## EXAMPLES + +### Example 1: Checks whether the resource name is available in the given region +```powershell +Test-AzVoiceServicesNameAvailability -Location eastus -Name 'VoiceServicesTestName' -Type "Microsoft.VoiceServices/CommunicationsGateways" +``` + +```output +Message NameAvailable Reason +------- ------------- ------ + True +``` + +This command checks whether the resource name is available in the given region. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The location in which uniqueness will be verified. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the resource for which availability needs to be checked. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +The resource type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICheckNameAvailabilityResponse + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsContact.md b/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsContact.md deleted file mode 100644 index 3a6eae9b2c4f..000000000000 --- a/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsContact.md +++ /dev/null @@ -1,228 +0,0 @@ ---- -external help file: -Module Name: Az.VoiceServices -online version: https://learn.microsoft.com/powershell/module/az.voiceservices/update-azvoiceservicescommunicationscontact -schema: 2.0.0 ---- - -# Update-AzVoiceServicesCommunicationsContact - -## SYNOPSIS -Update a Contact - -## SYNTAX - -### UpdateExpanded (Default) -``` -Update-AzVoiceServicesCommunicationsContact -CommunicationsGatewayName -Name - -ResourceGroupName [-SubscriptionId ] [-Tag ] [-DefaultProfile ] - [-Confirm] [-WhatIf] [] -``` - -### UpdateViaIdentityExpanded -``` -Update-AzVoiceServicesCommunicationsContact -InputObject [-Tag ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -Update a Contact - -## EXAMPLES - -### Example 1: Update a contact -```powershell -Update-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 -Tag @{'key1'='value1'} -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus gateway-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 8:34:33 AM v-diya@microsoft.com User vtest-communication-rg -``` - -Update a contact. - -### Example 2: Update a contact by pipeline -```powershell -Get-AzVoiceServicesCommunicationsContact -ResourceGroupName vtest-communication-rg -CommunicationsGatewayName vsc-gateway-pwsh01 -Name gateway-01 | Update-AzVoiceServicesCommunicationsContact -Tag @{'key1'='value1'} -``` - -```output -Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName RetryAfter --------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- ---------- -westcentralus gateway-01 12/7/2022 7:47:30 AM v-diya@microsoft.com User 12/7/2022 8:34:33 AM v-diya@microsoft.com User vtest-communication-rg -``` - -Update a contact by pipeline. - -## PARAMETERS - -### -CommunicationsGatewayName -Unique identifier for this deployment - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity -Parameter Sets: UpdateViaIdentityExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Name -Unique identifier for this contact - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: ContactName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. -The name is case insensitive. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -The ID of the target subscription. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -Resource tags. - -```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.IContact - -## NOTES - -ALIASES - -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 - - `[CommunicationsGatewayName ]`: Unique identifier for this deployment - - `[ContactName ]`: Unique identifier for this contact - - `[Id ]`: Resource identity path - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[TestLineName ]`: Unique identifier for this test line - -## RELATED LINKS - diff --git a/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsGateway.md b/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsGateway.md index 1bedca6078bc..00d2068ac1bd 100644 --- a/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsGateway.md +++ b/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsGateway.md @@ -190,7 +190,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ICommunicationsGateway +### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway ## NOTES @@ -203,8 +203,8 @@ To create the parameters described below, construct a hash table containing the `INPUTOBJECT `: Identity Parameter - `[CommunicationsGatewayName ]`: Unique identifier for this deployment - - `[ContactName ]`: Unique identifier for this contact - `[Id ]`: Resource identity path + - `[Location ]`: The location in which uniqueness will be verified. - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SubscriptionId ]`: The ID of the target subscription. - `[TestLineName ]`: Unique identifier for this test line diff --git a/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsTestLine.md b/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsTestLine.md index d8ee4f40c395..6795b10acb1b 100644 --- a/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsTestLine.md +++ b/src/VoiceServices/help/Update-AzVoiceServicesCommunicationsTestLine.md @@ -205,7 +205,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20221201Preview.ITestLine +### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine ## NOTES @@ -218,8 +218,8 @@ To create the parameters described below, construct a hash table containing the `INPUTOBJECT `: Identity Parameter - `[CommunicationsGatewayName ]`: Unique identifier for this deployment - - `[ContactName ]`: Unique identifier for this contact - `[Id ]`: Resource identity path + - `[Location ]`: The location in which uniqueness will be verified. - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SubscriptionId ]`: The ID of the target subscription. - `[TestLineName ]`: Unique identifier for this test line diff --git a/src/VoiceServices/how-to.md b/src/VoiceServices/how-to.md index 507bccafe00b..c0c70a163fe6 100644 --- a/src/VoiceServices/how-to.md +++ b/src/VoiceServices/how-to.md @@ -14,7 +14,7 @@ To generate documentation, the process is now integrated into the `build-module. To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. ## Packing `Az.VoiceServices` -To pack `Az.VoiceServices` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://learn.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. +To pack `Az.VoiceServices` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://docs.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. ## Module Script Details There are multiple scripts created for performing different actions for developing `Az.VoiceServices`. diff --git a/src/VoiceServices/internal/README.md b/src/VoiceServices/internal/README.md index 305ad459eadd..dd41073ece0b 100644 --- a/src/VoiceServices/internal/README.md +++ b/src/VoiceServices/internal/README.md @@ -8,7 +8,7 @@ This directory contains a module to handle *internal only* cmdlets. Cmdlets that - Packaged: yes ## Details -The `Az.VoiceServices.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.VoiceServices`. Instead, this sub-module is imported by the `..\custom\Az.VoiceServices.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.VoiceServices.internal\Get-Example` would call an internal cmdlet named `Get-Example`. +The `Az.VoiceServices.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.VoiceServices`. Instead, this sub-module is imported by the `..\custom\Az.VoiceServices.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.VoiceServices.internal\Get-Example` would call an internal cmdlet named `Get-Example`. ## Purpose This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.VoiceServices`. diff --git a/src/VoiceServices/test/New-AzVoiceServicesCommunicationsContact.Recording.json b/src/VoiceServices/test/New-AzVoiceServicesCommunicationsContact.Recording.json deleted file mode 100644 index 4a82bdde9ef8..000000000000 --- a/src/VoiceServices/test/New-AzVoiceServicesCommunicationsContact.Recording.json +++ /dev/null @@ -1,527 +0,0 @@ -{ - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": "{\n \"location\": \"westcentralus\",\n \"properties\": {\n \"contactName\": \"John Smith\",\n \"phoneNumber\": \"+1-555-1234\",\n \"email\": \"johnsmith@example.com\",\n \"role\": \"Network Manager\"\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "191" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "ETag": [ "\"0000a336-0000-0600-0000-639182720000\"" ], - "Vary": [ "Accept-Encoding" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-providerhub-traffic": [ "True" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-request-id": [ "018cf49d-555c-47b3-ab85-0a1740e3844a" ], - "x-ms-correlation-request-id": [ "cffe3430-8111-4b76-aa32-842d3b3c4ef2" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062139Z:cffe3430-8111-4b76-aa32-842d3b3c4ef2" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:21:38 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "703" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:21:36.5944576Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:21:36.5944576Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "e4714625-cc75-4cc8-a7c3-641dd2db99cc" ], - "CommandName": [ "New-AzVoiceServicesCommunicationsContact" ], - "FullCommandName": [ "New-AzVoiceServicesCommunicationsContact_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.0", "Az.VoiceServices/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "ETag": [ "\"0000a336-0000-0600-0000-639182720000\"" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "27304df5-55b1-4d93-97e3-b7e4180f19e7" ], - "x-ms-correlation-request-id": [ "2de40c6a-2006-4aa3-8b37-eb4f835813ae" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062209Z:2de40c6a-2006-4aa3-8b37-eb4f835813ae" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:09 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "703" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:21:36.5944576Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:21:36.5944576Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "e4714625-cc75-4cc8-a7c3-641dd2db99cc" ], - "CommandName": [ "New-AzVoiceServicesCommunicationsContact" ], - "FullCommandName": [ "New-AzVoiceServicesCommunicationsContact_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.0", "Az.VoiceServices/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "ETag": [ "\"0000a336-0000-0600-0000-639182720000\"" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "eebca97f-e6da-405d-8530-ceb6f92123ac" ], - "x-ms-correlation-request-id": [ "6747724d-2f1a-419c-8ae1-08d5d28baeed" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062210Z:6747724d-2f1a-419c-8ae1-08d5d28baeed" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:10 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "703" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:21:36.5944576Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:21:36.5944576Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts?api-version=2022-12-01-preview+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts?api-version=2022-12-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "db27b9f7-a492-4440-84a9-5e9e10f518b6" ], - "CommandName": [ "Get-AzVoiceServicesCommunicationsContact" ], - "FullCommandName": [ "Get-AzVoiceServicesCommunicationsContact_List" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.0", "Az.VoiceServices/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-original-request-ids": [ "b2c2f6fb-58b5-4fa3-92e7-c1c6de98741f", "4a3070e9-5c8d-41de-b331-713448dd3a3b" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "dc950edf-e594-40f0-9591-bf9ae763a492" ], - "x-ms-correlation-request-id": [ "dc950edf-e594-40f0-9591-bf9ae763a492" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062213Z:dc950edf-e594-40f0-9591-bf9ae763a492" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:13 GMT" ] - }, - "ContentHeaders": { - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ], - "Content-Length": [ "715" ] - }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:21:36.5944576Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:21:36.5944576Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}]}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "3fb33614-66b0-4ac7-a20b-70b8b5dd7f0f" ], - "CommandName": [ "Get-AzVoiceServicesCommunicationsContact" ], - "FullCommandName": [ "Get-AzVoiceServicesCommunicationsContact_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.0", "Az.VoiceServices/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "ETag": [ "\"0000a336-0000-0600-0000-639182720000\"" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "b0a953e9-d2b2-45c2-ad9d-366be7b4ac38" ], - "x-ms-correlation-request-id": [ "61dab130-7761-4921-b679-171994ba3fcd" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062213Z:61dab130-7761-4921-b679-171994ba3fcd" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:13 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "703" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:21:36.5944576Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:21:36.5944576Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+6": { - "Request": { - "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": "{\n \"tags\": {\n \"key1\": \"value1\"\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "40" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "ETag": [ "\"0000a436-0000-0600-0000-639182960000\"" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "94ddce03-eadb-481f-be1a-975bfa32edf4" ], - "x-ms-correlation-request-id": [ "285cb3ba-269c-4bc9-9ebe-02c8a2985014" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062215Z:285cb3ba-269c-4bc9-9ebe-02c8a2985014" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:14 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "728" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"tags\":{\"key1\":\"value1\"},\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:21:36.5944576Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:22:14.0478849Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+7": { - "Request": { - "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "41618dae-db17-4ea5-84c2-7af1b367e981" ], - "CommandName": [ "Remove-AzVoiceServicesCommunicationsContact" ], - "FullCommandName": [ "Remove-AzVoiceServicesCommunicationsContact_Delete" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.0", "Az.VoiceServices/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Vary": [ "Accept-Encoding" ], - "x-ms-providerhub-traffic": [ "True" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-request-id": [ "00000000-0000-0000-0000-000000000000" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "f2d2892e-fa1f-4efc-8b33-f69d0aa66591" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062217Z:f2d2892e-fa1f-4efc-8b33-f69d0aa66591" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:17 GMT" ] - }, - "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] - }, - "Content": null, - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpandedViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": "{\n \"location\": \"westcentralus\",\n \"properties\": {\n \"contactName\": \"John Smith\",\n \"phoneNumber\": \"+1-555-1234\",\n \"email\": \"johnsmith@example.com\",\n \"role\": \"Network Manager\"\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "191" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "ETag": [ "\"0000a536-0000-0600-0000-6391829a0000\"" ], - "Vary": [ "Accept-Encoding" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-providerhub-traffic": [ "True" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-request-id": [ "7e259b1b-205a-483b-8adf-7c99532b6aa1" ], - "x-ms-correlation-request-id": [ "985235bb-6f92-427d-ad55-f45a10366665" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062219Z:985235bb-6f92-427d-ad55-f45a10366665" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:19 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "697" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:22:18.6417Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:22:18.6417Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "684197af-4857-43ee-a511-43705c1841dc" ], - "CommandName": [ "New-AzVoiceServicesCommunicationsContact" ], - "FullCommandName": [ "New-AzVoiceServicesCommunicationsContact_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.0", "Az.VoiceServices/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "ETag": [ "\"0000a536-0000-0600-0000-6391829a0000\"" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "a9deca34-313a-45ee-9586-20ee8b7fe88c" ], - "x-ms-correlation-request-id": [ "04f55006-18cf-4f5b-af5c-60b35f129366" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062249Z:04f55006-18cf-4f5b-af5c-60b35f129366" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:49 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "697" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:22:18.6417Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:22:18.6417Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "684197af-4857-43ee-a511-43705c1841dc" ], - "CommandName": [ "New-AzVoiceServicesCommunicationsContact" ], - "FullCommandName": [ "New-AzVoiceServicesCommunicationsContact_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.0", "Az.VoiceServices/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "ETag": [ "\"0000a536-0000-0600-0000-6391829a0000\"" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "8a91698c-8b7c-43ae-b145-acfceb2eeafa" ], - "x-ms-correlation-request-id": [ "1a72dc90-6977-47b1-9f9e-531470d57d80" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062250Z:1a72dc90-6977-47b1-9f9e-531470d57d80" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:49 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "697" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:22:18.6417Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:22:18.6417Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "09f31c5f-e358-4e52-9be0-9d28bf628607" ], - "CommandName": [ "Get-AzVoiceServicesCommunicationsContact" ], - "FullCommandName": [ "Get-AzVoiceServicesCommunicationsContact_GetViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.0", "Az.VoiceServices/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "ETag": [ "\"0000a536-0000-0600-0000-6391829a0000\"" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "4e4cdb1b-bf4e-4738-9d00-ff7b476eca73" ], - "x-ms-correlation-request-id": [ "3c2f6bc1-3cd8-4400-bedf-f7e1a6fa44c4" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062250Z:3c2f6bc1-3cd8-4400-bedf-f7e1a6fa44c4" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:50 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "697" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:22:18.6417Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:22:18.6417Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpandedViaIdentity+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+5": { - "Request": { - "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": "{\n \"tags\": {\n \"key1\": \"value1\"\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "40" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "ETag": [ "\"0000a636-0000-0600-0000-639182bb0000\"" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "d8224595-35f7-4437-9cc3-930cd40f6047" ], - "x-ms-correlation-request-id": [ "53dae8be-6893-4477-9651-90a9eeb5cd0e" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062252Z:53dae8be-6893-4477-9651-90a9eeb5cd0e" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:51 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "725" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h\",\"name\":\"contact-674l8h\",\"type\":\"microsoft.voiceservices/communicationsgateways/contacts\",\"location\":\"westcentralus\",\"tags\":{\"key1\":\"value1\"},\"systemData\":{\"createdBy\":\"v-diya@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2022-12-08T06:22:18.6417Z\",\"lastModifiedBy\":\"v-diya@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2022-12-08T06:22:51.2356967Z\"},\"properties\":{\"contactName\":\"John Smith\",\"phoneNumber\":\"+1-555-1234\",\"email\":\"johnsmith@example.com\",\"role\":\"Network Manager\",\"provisioningState\":\"Succeeded\"}}", - "isContentBase64": false - } - }, - "New-AzVoiceServicesCommunicationsContact+[NoContext]+CreateExpandedViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview+6": { - "Request": { - "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/contacts/contact-674l8h?api-version=2022-12-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "13" ], - "x-ms-client-request-id": [ "004a5184-2610-4360-991d-e777a99dad12" ], - "CommandName": [ "Remove-AzVoiceServicesCommunicationsContact" ], - "FullCommandName": [ "Remove-AzVoiceServicesCommunicationsContact_DeleteViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.0", "Az.VoiceServices/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Vary": [ "Accept-Encoding" ], - "x-ms-providerhub-traffic": [ "True" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-request-id": [ "00000000-0000-0000-0000-000000000000" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-correlation-request-id": [ "b0135d09-812a-44e6-a6f4-a4ce2b9e8f12" ], - "x-ms-routing-request-id": [ "JAPANEAST:20221208T062254Z:b0135d09-812a-44e6-a6f4-a4ce2b9e8f12" ], - "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Thu, 08 Dec 2022 06:22:53 GMT" ] - }, - "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] - }, - "Content": null, - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/VoiceServices/test/New-AzVoiceServicesCommunicationsContact.Tests.ps1 b/src/VoiceServices/test/New-AzVoiceServicesCommunicationsContact.Tests.ps1 deleted file mode 100644 index 22198b7cf130..000000000000 --- a/src/VoiceServices/test/New-AzVoiceServicesCommunicationsContact.Tests.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzVoiceServicesCommunicationsContact')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzVoiceServicesCommunicationsContact.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'New-AzVoiceServicesCommunicationsContact' { - It 'CreateExpanded' { - { - New-AzVoiceServicesCommunicationsContact -ResourceGroupName $env.resourceGroup -CommunicationsGatewayName $env.gatewayName01 -Name $env.contactName02 -Location $env.location -PhoneNumber "+1-555-1234" -FullContactName "John Smith" -Email "johnsmith@example.com" -Role "Network Manager" - Get-AzVoiceServicesCommunicationsContact -ResourceGroupName $env.resourceGroup -CommunicationsGatewayName $env.gatewayName01 - Get-AzVoiceServicesCommunicationsContact -ResourceGroupName $env.resourceGroup -CommunicationsGatewayName $env.gatewayName01 -Name $env.contactName02 - Update-AzVoiceServicesCommunicationsContact -ResourceGroupName $env.resourceGroup -CommunicationsGatewayName $env.gatewayName01 -Name $env.contactName02 -Tag @{'key1'='value1'} - Remove-AzVoiceServicesCommunicationsContact -ResourceGroupName $env.resourceGroup -CommunicationsGatewayName $env.gatewayName01 -Name $env.contactName02 - } | Should -Not -Throw - } - It 'CreateExpandedViaIdentity' { - { - $contact = New-AzVoiceServicesCommunicationsContact -ResourceGroupName $env.resourceGroup -CommunicationsGatewayName $env.gatewayName01 -Name $env.contactName02 -Location $env.location -PhoneNumber "+1-555-1234" -FullContactName "John Smith" -Email "johnsmith@example.com" -Role "Network Manager" - Get-AzVoiceServicesCommunicationsContact -InputObject $contact - Update-AzVoiceServicesCommunicationsContact -InputObject $contact -Tag @{'key1'='value1'} - Remove-AzVoiceServicesCommunicationsContact -InputObject $contact - } | Should -Not -Throw - } -} diff --git a/src/VoiceServices/test/New-AzVoiceServicesCommunicationsGateway.Recording.json b/src/VoiceServices/test/New-AzVoiceServicesCommunicationsGateway.Recording.json index ed443945ac26..e4f1d6864ac8 100644 --- a/src/VoiceServices/test/New-AzVoiceServicesCommunicationsGateway.Recording.json +++ b/src/VoiceServices/test/New-AzVoiceServicesCommunicationsGateway.Recording.json @@ -1,8 +1,8 @@ { - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview+1": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31", "Content": "{\n \"location\": \"westcentralus\",\n \"properties\": {\n \"serviceLocations\": [\n {\n \"primaryRegionProperties\": {\n \"operatorAddresses\": [ \"198.51.100.1\" ]\n },\n \"name\": \"useast\"\n },\n {\n \"primaryRegionProperties\": {\n \"operatorAddresses\": [ \"198.51.100.2\" ]\n },\n \"name\": \"useast2\"\n }\n ],\n \"connectivity\": \"PublicAddress\",\n \"codecs\": [ \"PCMA\" ],\n \"e911Type\": \"Standard\",\n \"platforms\": [ \"OperatorConnect\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -37,10 +37,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview+2": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -80,10 +80,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview+3": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -123,10 +123,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview+4": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -166,10 +166,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview+5": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31+5": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31", "Content": "{\n \"tags\": {\n \"key1\": \"value1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -203,10 +203,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview+6": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31+6": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-8hsd4a?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -244,10 +244,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview+1": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31", "Content": "{\n \"location\": \"westcentralus\",\n \"properties\": {\n \"serviceLocations\": [\n {\n \"primaryRegionProperties\": {\n \"operatorAddresses\": [ \"198.51.100.1\" ]\n },\n \"name\": \"useast\"\n },\n {\n \"primaryRegionProperties\": {\n \"operatorAddresses\": [ \"198.51.100.2\" ]\n },\n \"name\": \"useast2\"\n }\n ],\n \"connectivity\": \"PublicAddress\",\n \"codecs\": [ \"PCMA\" ],\n \"e911Type\": \"Standard\",\n \"platforms\": [ \"OperatorConnect\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -282,10 +282,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview+2": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -325,10 +325,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview+3": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -368,10 +368,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview+4": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -411,10 +411,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview+5": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31+5": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31", "Content": "{\n \"tags\": {\n \"key1\": \"value1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -448,10 +448,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview+6": { + "New-AzVoiceServicesCommunicationsGateway+[NoContext]+CreateExpandedViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31+6": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-456v4a?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { diff --git a/src/VoiceServices/test/New-AzVoiceServicesCommunicationsTestLine.Recording.json b/src/VoiceServices/test/New-AzVoiceServicesCommunicationsTestLine.Recording.json index 8238560a5491..39f44f5ba61e 100644 --- a/src/VoiceServices/test/New-AzVoiceServicesCommunicationsTestLine.Recording.json +++ b/src/VoiceServices/test/New-AzVoiceServicesCommunicationsTestLine.Recording.json @@ -1,8 +1,8 @@ { - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+1": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": "{\n \"location\": \"westcentralus\",\n \"properties\": {\n \"phoneNumber\": \"+1-555-1234\",\n \"purpose\": \"Automated\"\n }\n}", "isContentBase64": false, "Headers": { @@ -37,10 +37,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+2": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -79,10 +79,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+3": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -121,10 +121,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines?api-version=2022-12-01-preview+4": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines?api-version=2023-01-31+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -162,10 +162,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+5": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -204,10 +204,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+6": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+6": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": "{\n \"tags\": {\n \"key1\": \"value1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -241,10 +241,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+7": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+7": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -282,10 +282,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+1": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": "{\n \"location\": \"westcentralus\",\n \"properties\": {\n \"phoneNumber\": \"+1-555-1234\",\n \"purpose\": \"Automated\"\n }\n}", "isContentBase64": false, "Headers": { @@ -320,10 +320,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+2": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -362,10 +362,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+3": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -404,10 +404,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+4": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { @@ -446,10 +446,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+5": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+5": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": "{\n \"tags\": {\n \"key1\": \"value1\"\n }\n}", "isContentBase64": false, "Headers": { @@ -483,10 +483,10 @@ "isContentBase64": false } }, - "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview+6": { + "New-AzVoiceServicesCommunicationsTestLine+[NoContext]+CreateExpandedViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31+6": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2022-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/voiceservices-rgn5lhg7/providers/Microsoft.VoiceServices/communicationsGateways/vsgateway-g3zla6/testLines/contact-hwxd62?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { diff --git a/src/VoiceServices/test/Test-AzVoiceServicesNameAvailability.Recording.json b/src/VoiceServices/test/Test-AzVoiceServicesNameAvailability.Recording.json new file mode 100644 index 000000000000..6425cae7c2a0 --- /dev/null +++ b/src/VoiceServices/test/Test-AzVoiceServicesNameAvailability.Recording.json @@ -0,0 +1,38 @@ +{ + "Test-AzVoiceServicesNameAvailability+[NoContext]+CheckExpanded+$POST+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.VoiceServices/locations/eastus/checkNameAvailability?api-version=2023-01-31+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.VoiceServices/locations/eastus/checkNameAvailability?api-version=2023-01-31", + "Content": "{\n \"name\": \"VoiceServicesTestName\",\n \"type\": \"Microsoft.VoiceServices/CommunicationsGateways\"\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "97" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "54a15974-3720-4b3d-a6eb-277a0cc04164" ], + "x-ms-correlation-request-id": [ "c43362b7-cdfb-47ac-b22b-6eeeab81beb9" ], + "x-ms-routing-request-id": [ "JAPANEAST:20230130T073450Z:c43362b7-cdfb-47ac-b22b-6eeeab81beb9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Mon, 30 Jan 2023 07:34:49 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "22" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"nameAvailable\":true}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/VoiceServices/test/Test-AzVoiceServicesNameAvailability.Tests.ps1 b/src/VoiceServices/test/Test-AzVoiceServicesNameAvailability.Tests.ps1 new file mode 100644 index 000000000000..2b53939d5247 --- /dev/null +++ b/src/VoiceServices/test/Test-AzVoiceServicesNameAvailability.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzVoiceServicesNameAvailability')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzVoiceServicesNameAvailability.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Test-AzVoiceServicesNameAvailability' { + It 'CheckExpanded' { + { Test-AzVoiceServicesNameAvailability -Location eastus -Name 'VoiceServicesTestName' -Type "Microsoft.VoiceServices/CommunicationsGateways" } | Should -Not -Throw + } +} diff --git a/src/VoiceServices/test/swagger/common-types/data-plane/v1/types.json b/src/VoiceServices/test/swagger/common-types/data-plane/v1/types.json deleted file mode 100644 index 6cee173c406a..000000000000 --- a/src/VoiceServices/test/swagger/common-types/data-plane/v1/types.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "1.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "ErrorDetail": { - "type": "object", - "description": "The error detail.", - "properties": { - "code": { - "readOnly": true, - "type": "string", - "description": "The error code." - }, - "message": { - "readOnly": true, - "type": "string", - "description": "The error message." - }, - "target": { - "readOnly": true, - "type": "string", - "description": "The error target." - }, - "details": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDetail" - }, - "x-ms-identifiers": [], - "description": "The error details." - }, - "additionalInfo": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorAdditionalInfo" - }, - "x-ms-identifiers": [], - "description": "The error additional info." - } - } - }, - "ErrorResponse": { - "type": "object", - "title": "Error response", - "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", - "properties": { - "error": { - "description": "The error object.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "ErrorAdditionalInfo": { - "type": "object", - "properties": { - "type": { - "readOnly": true, - "type": "string", - "description": "The additional info type." - }, - "info": { - "readOnly": true, - "type": "object", - "description": "The additional info." - } - }, - "description": "The resource management error additional info." - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v1/privatelinks.json b/src/VoiceServices/test/swagger/common-types/resource-management/v1/privatelinks.json deleted file mode 100644 index 5ceea8c222c7..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v1/privatelinks.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "1.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "PrivateEndpoint": { - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "The ARM identifier for Private Endpoint" - } - }, - "description": "The Private Endpoint resource." - }, - "PrivateEndpointConnection": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/PrivateEndpointConnectionProperties", - "x-ms-client-flatten": true, - "description": "Resource properties." - } - }, - "allOf": [ - { - "$ref": "./types.json#/definitions/Resource" - } - ], - "description": "The Private Endpoint Connection resource." - }, - "PrivateEndpointConnectionProperties": { - "type": "object", - "properties": { - "privateEndpoint": { - "$ref": "#/definitions/PrivateEndpoint", - "description": "The resource of private end point." - }, - "privateLinkServiceConnectionState": { - "$ref": "#/definitions/PrivateLinkServiceConnectionState", - "description": "A collection of information about the state of the connection between service consumer and provider." - }, - "provisioningState": { - "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", - "description": "The provisioning state of the private endpoint connection resource." - } - }, - "required": [ - "privateLinkServiceConnectionState" - ], - "description": "Properties of the PrivateEndpointConnectProperties." - }, - "PrivateLinkServiceConnectionState": { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/PrivateEndpointServiceConnectionStatus", - "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." - }, - "description": { - "type": "string", - "description": "The reason for approval/rejection of the connection." - }, - "actionsRequired": { - "type": "string", - "description": "A message indicating if changes on the service provider require any updates on the consumer." - } - }, - "description": "A collection of information about the state of the connection between service consumer and provider." - }, - "PrivateEndpointServiceConnectionStatus": { - "type": "string", - "description": "The private endpoint connection status.", - "enum": [ - "Pending", - "Approved", - "Rejected" - ], - "x-ms-enum": { - "name": "PrivateEndpointServiceConnectionStatus", - "modelAsString": true - } - }, - "PrivateEndpointConnectionProvisioningState": { - "type": "string", - "readOnly": true, - "description": "The current provisioning state.", - "enum": [ - "Succeeded", - "Creating", - "Deleting", - "Failed" - ], - "x-ms-enum": { - "name": "PrivateEndpointConnectionProvisioningState", - "modelAsString": true - } - }, - "PrivateLinkResource": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/PrivateLinkResourceProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "./types.json#/definitions/Resource" - } - ], - "description": "A private link resource" - }, - "PrivateLinkResourceProperties": { - "type": "object", - "properties": { - "groupId": { - "description": "The private link resource group id.", - "type": "string", - "readOnly": true - }, - "requiredMembers": { - "description": "The private link resource required member names.", - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - }, - "requiredZoneNames": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The private link resource Private link DNS zone name." - } - }, - "description": "Properties of a private link resource." - }, - "PrivateEndpointConnectionListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "description": "Array of private endpoint connections", - "items": { - "$ref": "#/definitions/PrivateEndpointConnection" - } - } - }, - "description": "List of private endpoint connection associated with the specified storage account" - }, - "PrivateLinkResourceListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "description": "Array of private link resources", - "items": { - "$ref": "#/definitions/PrivateLinkResource" - } - } - }, - "description": "A list of private link resources" - } - }, - "parameters": { - "PrivateEndpointConnectionName": { - "name": "privateEndpointConnectionName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the private endpoint connection associated with the Azure resource", - "x-ms-parameter-location": "method" - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v1/types.json b/src/VoiceServices/test/swagger/common-types/resource-management/v1/types.json deleted file mode 100644 index 71216592bf7c..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v1/types.json +++ /dev/null @@ -1,578 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "1.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "Resource": { - "title": "Resource", - "description": "Common fields that are returned in the response for all Azure Resource Manager resources", - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "type": { - "readOnly": true, - "type": "string", - "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" - } - }, - "x-ms-azure-resource": true - }, - "AzureEntityResource": { - "x-ms-client-name": "AzureEntityResource", - "title": "Entity Resource", - "description": "The resource model definition for an Azure Resource Manager resource with an etag.", - "type": "object", - "properties": { - "etag": { - "type": "string", - "readOnly": true, - "description": "Resource Etag." - } - }, - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "TrackedResource": { - "title": "Tracked Resource", - "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", - "type": "object", - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, - "location": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "The geo-location where the resource lives" - } - }, - "required": [ - "location" - ], - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ProxyResource": { - "title": "Proxy Resource", - "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ResourceModelWithAllowedPropertySet": { - "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "x-ms-mutability": [ - "read" - ], - "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "type": { - "readOnly": true, - "type": "string", - "x-ms-mutability": [ - "read" - ], - "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" - }, - "location": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "The geo-location where the resource lives" - }, - "managedBy": { - "type": "string", - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." - }, - "kind": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", - "pattern": "^[-\\w\\._,\\(\\)]+$" - }, - "etag": { - "readOnly": true, - "type": "string", - "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, - "identity": { - "allOf": [ - { - "$ref": "#/definitions/Identity" - } - ] - }, - "sku": { - "allOf": [ - { - "$ref": "#/definitions/Sku" - } - ] - }, - "plan": { - "allOf": [ - { - "$ref": "#/definitions/Plan" - } - ] - } - }, - "x-ms-azure-resource": true - }, - "Sku": { - "description": "The resource model definition representing SKU", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" - }, - "tier": { - "type": "string", - "enum": [ - "Free", - "Basic", - "Standard", - "Premium" - ], - "x-ms-enum": { - "name": "SkuTier", - "modelAsString": false - }, - "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." - }, - "size": { - "type": "string", - "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " - }, - "family": { - "type": "string", - "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." - }, - "capacity": { - "type": "integer", - "format": "int32", - "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." - } - }, - "required": [ - "name" - ] - }, - "Identity": { - "description": "Identity for the resource.", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "type": "string", - "description": "The principal ID of resource identity." - }, - "tenantId": { - "readOnly": true, - "type": "string", - "description": "The tenant ID of resource." - }, - "type": { - "type": "string", - "description": "The identity type.", - "enum": [ - "SystemAssigned" - ], - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - } - } - } - }, - "Plan": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A user defined name of the 3rd Party Artifact that is being procured." - }, - "publisher": { - "type": "string", - "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" - }, - "product": { - "type": "string", - "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " - }, - "promotionCode": { - "type": "string", - "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." - }, - "version": { - "type": "string", - "description": "The version of the desired product/artifact." - } - }, - "description": "Plan for the resource.", - "required": [ - "name", - "publisher", - "product" - ] - }, - "ErrorResponse": { - "title": "Error Response", - "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)", - "type": "object", - "properties": { - "code": { - "readOnly": true, - "type": "string", - "description": "The error code." - }, - "message": { - "readOnly": true, - "type": "string", - "description": "The error message." - }, - "target": { - "readOnly": true, - "type": "string", - "description": "The error target." - }, - "details": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResponse" - }, - "x-ms-identifiers": [ - "message", - "target" - ], - "description": "The error details." - }, - "additionalInfo": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorAdditionalInfo" - }, - "x-ms-identifiers": [], - "description": "The error additional info." - } - } - }, - "ErrorAdditionalInfo": { - "type": "object", - "properties": { - "type": { - "readOnly": true, - "type": "string", - "description": "The additional info type." - }, - "info": { - "readOnly": true, - "type": "object", - "description": "The additional info." - } - }, - "description": "The resource management error additional info." - }, - "Operation": { - "title": "REST API Operation", - "description": "Details of a REST API operation, returned from the Resource Provider Operations API", - "type": "object", - "properties": { - "name": { - "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", - "type": "string", - "readOnly": true - }, - "isDataAction": { - "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", - "type": "boolean", - "readOnly": true - }, - "display": { - "description": "Localized display information for this particular operation.", - "type": "object", - "properties": { - "provider": { - "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", - "type": "string", - "readOnly": true - }, - "description": { - "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", - "type": "string", - "readOnly": true - } - } - }, - "origin": { - "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", - "type": "string", - "readOnly": true, - "enum": [ - "user", - "system", - "user,system" - ], - "x-ms-enum": { - "name": "Origin", - "modelAsString": true - } - }, - "actionType": { - "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", - "type": "string", - "readOnly": true, - "enum": [ - "Internal" - ], - "x-ms-enum": { - "name": "ActionType", - "modelAsString": true - } - } - } - }, - "OperationListResult": { - "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "x-ms-identifiers": [ - "name" - ], - "description": "List of operations supported by the resource provider", - "readOnly": true - }, - "nextLink": { - "type": "string", - "description": "URL to get the next set of operation list results (if there are any).", - "readOnly": true - } - } - }, - "locationData": { - "description": "Metadata pertaining to the geographic location of the resource.", - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256, - "description": "A canonical name for the geographic or physical location." - }, - "city": { - "type": "string", - "description": "The city or locality where the resource is located." - }, - "district": { - "type": "string", - "description": "The district, state, or province where the resource is located." - }, - "countryOrRegion": { - "type": "string", - "description": "The country or region where the resource is located" - } - }, - "required": [ - "name" - ] - }, - "systemData": { - "description": "Metadata pertaining to creation and last modification of the resource.", - "type": "object", - "readOnly": true, - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "type": "string", - "description": "The type of identity that last modified the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)" - } - } - }, - "encryptionProperties": { - "description": "Configuration of key for data encryption", - "type": "object", - "properties": { - "status": { - "description": "Indicates whether or not the encryption is enabled for container registry.", - "enum": [ - "enabled", - "disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "EncryptionStatus", - "modelAsString": true - } - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, - "KeyVaultProperties": { - "type": "object", - "properties": { - "keyIdentifier": { - "description": "Key vault uri to access the encryption key.", - "type": "string" - }, - "identity": { - "description": "The client ID of the identity which will be used to access key vault.", - "type": "string" - } - } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the target subscription.", - "minLength": 1 - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for this operation.", - "minLength": 1 - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group. The name is case insensitive.", - "minLength": 1, - "maxLength": 90, - "x-ms-parameter-location": "method" - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v2/privatelinks.json b/src/VoiceServices/test/swagger/common-types/resource-management/v2/privatelinks.json deleted file mode 100644 index 117c93054e7b..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v2/privatelinks.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "PrivateEndpoint": { - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "The ARM identifier for Private Endpoint" - } - }, - "description": "The Private Endpoint resource." - }, - "PrivateEndpointConnection": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/PrivateEndpointConnectionProperties", - "x-ms-client-flatten": true, - "description": "Resource properties." - } - }, - "allOf": [ - { - "$ref": "./types.json#/definitions/Resource" - } - ], - "description": "The Private Endpoint Connection resource." - }, - "PrivateEndpointConnectionProperties": { - "type": "object", - "properties": { - "privateEndpoint": { - "$ref": "#/definitions/PrivateEndpoint", - "description": "The resource of private end point." - }, - "privateLinkServiceConnectionState": { - "$ref": "#/definitions/PrivateLinkServiceConnectionState", - "description": "A collection of information about the state of the connection between service consumer and provider." - }, - "provisioningState": { - "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", - "description": "The provisioning state of the private endpoint connection resource." - } - }, - "required": [ - "privateLinkServiceConnectionState" - ], - "description": "Properties of the PrivateEndpointConnectProperties." - }, - "PrivateLinkServiceConnectionState": { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/PrivateEndpointServiceConnectionStatus", - "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." - }, - "description": { - "type": "string", - "description": "The reason for approval/rejection of the connection." - }, - "actionsRequired": { - "type": "string", - "description": "A message indicating if changes on the service provider require any updates on the consumer." - } - }, - "description": "A collection of information about the state of the connection between service consumer and provider." - }, - "PrivateEndpointServiceConnectionStatus": { - "type": "string", - "description": "The private endpoint connection status.", - "enum": [ - "Pending", - "Approved", - "Rejected" - ], - "x-ms-enum": { - "name": "PrivateEndpointServiceConnectionStatus", - "modelAsString": true - } - }, - "PrivateEndpointConnectionProvisioningState": { - "type": "string", - "readOnly": true, - "description": "The current provisioning state.", - "enum": [ - "Succeeded", - "Creating", - "Deleting", - "Failed" - ], - "x-ms-enum": { - "name": "PrivateEndpointConnectionProvisioningState", - "modelAsString": true - } - }, - "PrivateLinkResource": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/PrivateLinkResourceProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "./types.json#/definitions/Resource" - } - ], - "description": "A private link resource" - }, - "PrivateLinkResourceProperties": { - "type": "object", - "properties": { - "groupId": { - "description": "The private link resource group id.", - "type": "string", - "readOnly": true - }, - "requiredMembers": { - "description": "The private link resource required member names.", - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - }, - "requiredZoneNames": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The private link resource Private link DNS zone name." - } - }, - "description": "Properties of a private link resource." - }, - "PrivateEndpointConnectionListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "description": "Array of private endpoint connections", - "items": { - "$ref": "#/definitions/PrivateEndpointConnection" - } - } - }, - "description": "List of private endpoint connection associated with the specified storage account" - }, - "PrivateLinkResourceListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "description": "Array of private link resources", - "items": { - "$ref": "#/definitions/PrivateLinkResource" - } - } - }, - "description": "A list of private link resources" - } - }, - "parameters": { - "PrivateEndpointConnectionName": { - "name": "privateEndpointConnectionName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the private endpoint connection associated with the Azure resource", - "x-ms-parameter-location": "method" - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v2/types.json b/src/VoiceServices/test/swagger/common-types/resource-management/v2/types.json deleted file mode 100644 index a1d7f19f1588..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v2/types.json +++ /dev/null @@ -1,694 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "Resource": { - "title": "Resource", - "description": "Common fields that are returned in the response for all Azure Resource Manager resources", - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "type": { - "readOnly": true, - "type": "string", - "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" - } - }, - "x-ms-azure-resource": true - }, - "AzureEntityResource": { - "x-ms-client-name": "AzureEntityResource", - "title": "Entity Resource", - "description": "The resource model definition for an Azure Resource Manager resource with an etag.", - "type": "object", - "properties": { - "etag": { - "type": "string", - "readOnly": true, - "description": "Resource Etag." - } - }, - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "TrackedResource": { - "title": "Tracked Resource", - "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", - "type": "object", - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, - "location": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "The geo-location where the resource lives" - } - }, - "required": [ - "location" - ], - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ProxyResource": { - "title": "Proxy Resource", - "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ResourceModelWithAllowedPropertySet": { - "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "x-ms-mutability": [ - "read" - ], - "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "type": { - "readOnly": true, - "type": "string", - "x-ms-mutability": [ - "read" - ], - "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" - }, - "location": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "The geo-location where the resource lives" - }, - "managedBy": { - "type": "string", - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." - }, - "kind": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", - "pattern": "^[-\\w\\._,\\(\\)]+$" - }, - "etag": { - "readOnly": true, - "type": "string", - "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, - "identity": { - "allOf": [ - { - "$ref": "#/definitions/Identity" - } - ] - }, - "sku": { - "allOf": [ - { - "$ref": "#/definitions/Sku" - } - ] - }, - "plan": { - "allOf": [ - { - "$ref": "#/definitions/Plan" - } - ] - } - }, - "x-ms-azure-resource": true - }, - "Sku": { - "description": "The resource model definition representing SKU", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" - }, - "tier": { - "type": "string", - "enum": [ - "Free", - "Basic", - "Standard", - "Premium" - ], - "x-ms-enum": { - "name": "SkuTier", - "modelAsString": false - }, - "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." - }, - "size": { - "type": "string", - "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " - }, - "family": { - "type": "string", - "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." - }, - "capacity": { - "type": "integer", - "format": "int32", - "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." - } - }, - "required": [ - "name" - ] - }, - "Identity": { - "description": "Identity for the resource.", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "type": "string", - "description": "The principal ID of resource identity." - }, - "tenantId": { - "readOnly": true, - "type": "string", - "description": "The tenant ID of resource." - }, - "type": { - "type": "string", - "description": "The identity type.", - "enum": [ - "SystemAssigned" - ], - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - } - } - } - }, - "Plan": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A user defined name of the 3rd Party Artifact that is being procured." - }, - "publisher": { - "type": "string", - "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" - }, - "product": { - "type": "string", - "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " - }, - "promotionCode": { - "type": "string", - "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." - }, - "version": { - "type": "string", - "description": "The version of the desired product/artifact." - } - }, - "description": "Plan for the resource.", - "required": [ - "name", - "publisher", - "product" - ] - }, - "ErrorDetail": { - "description": "The error detail.", - "type": "object", - "properties": { - "code": { - "readOnly": true, - "type": "string", - "description": "The error code." - }, - "message": { - "readOnly": true, - "type": "string", - "description": "The error message." - }, - "target": { - "readOnly": true, - "type": "string", - "description": "The error target." - }, - "details": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDetail" - }, - "x-ms-identifiers": [ - "message", - "target" - ], - "description": "The error details." - }, - "additionalInfo": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorAdditionalInfo" - }, - "x-ms-identifiers": [], - "description": "The error additional info." - } - } - }, - "ErrorResponse": { - "title": "Error response", - "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", - "type": "object", - "properties": { - "error": { - "description": "The error object.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "ErrorAdditionalInfo": { - "type": "object", - "properties": { - "type": { - "readOnly": true, - "type": "string", - "description": "The additional info type." - }, - "info": { - "readOnly": true, - "type": "object", - "description": "The additional info." - } - }, - "description": "The resource management error additional info." - }, - "Operation": { - "title": "REST API Operation", - "description": "Details of a REST API operation, returned from the Resource Provider Operations API", - "type": "object", - "properties": { - "name": { - "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", - "type": "string", - "readOnly": true - }, - "isDataAction": { - "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", - "type": "boolean", - "readOnly": true - }, - "display": { - "description": "Localized display information for this particular operation.", - "type": "object", - "properties": { - "provider": { - "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", - "type": "string", - "readOnly": true - }, - "description": { - "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", - "type": "string", - "readOnly": true - } - } - }, - "origin": { - "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", - "type": "string", - "readOnly": true, - "enum": [ - "user", - "system", - "user,system" - ], - "x-ms-enum": { - "name": "Origin", - "modelAsString": true - } - }, - "actionType": { - "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", - "type": "string", - "readOnly": true, - "enum": [ - "Internal" - ], - "x-ms-enum": { - "name": "ActionType", - "modelAsString": true - } - } - } - }, - "OperationListResult": { - "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "x-ms-identifiers": [ - "name" - ], - "description": "List of operations supported by the resource provider", - "readOnly": true - }, - "nextLink": { - "type": "string", - "description": "URL to get the next set of operation list results (if there are any).", - "readOnly": true - } - } - }, - "OperationStatusResult": { - "description": "The current status of an async operation.", - "type": "object", - "required": [ - "status" - ], - "properties": { - "id": { - "description": "Fully qualified ID for the async operation.", - "type": "string" - }, - "name": { - "description": "Name of the async operation.", - "type": "string" - }, - "status": { - "description": "Operation status.", - "type": "string" - }, - "percentComplete": { - "description": "Percent of the operation that is complete.", - "type": "number", - "minimum": 0, - "maximum": 100 - }, - "startTime": { - "description": "The start time of the operation.", - "type": "string", - "format": "date-time" - }, - "endTime": { - "description": "The end time of the operation.", - "type": "string", - "format": "date-time" - }, - "operations": { - "description": "The operations list.", - "type": "array", - "items": { - "$ref": "#/definitions/OperationStatusResult" - } - }, - "error": { - "description": "If present, details of the operation error.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "locationData": { - "description": "Metadata pertaining to the geographic location of the resource.", - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256, - "description": "A canonical name for the geographic or physical location." - }, - "city": { - "type": "string", - "description": "The city or locality where the resource is located." - }, - "district": { - "type": "string", - "description": "The district, state, or province where the resource is located." - }, - "countryOrRegion": { - "type": "string", - "description": "The country or region where the resource is located" - } - }, - "required": [ - "name" - ] - }, - "systemData": { - "description": "Metadata pertaining to creation and last modification of the resource.", - "type": "object", - "readOnly": true, - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "type": "string", - "description": "The type of identity that last modified the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)" - } - } - }, - "encryptionProperties": { - "description": "Configuration of key for data encryption", - "type": "object", - "properties": { - "status": { - "description": "Indicates whether or not the encryption is enabled for container registry.", - "enum": [ - "enabled", - "disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "EncryptionStatus", - "modelAsString": true - } - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, - "KeyVaultProperties": { - "type": "object", - "properties": { - "keyIdentifier": { - "description": "Key vault uri to access the encryption key.", - "type": "string" - }, - "identity": { - "description": "The client ID of the identity which will be used to access key vault.", - "type": "string" - } - } - }, - "CheckNameAvailabilityRequest": { - "description": "The check availability request body.", - "type": "object", - "properties": { - "name": { - "description": "The name of the resource for which availability needs to be checked.", - "type": "string" - }, - "type": { - "description": "The resource type.", - "type": "string" - } - } - }, - "CheckNameAvailabilityResponse": { - "description": "The check availability result.", - "type": "object", - "properties": { - "nameAvailable": { - "description": "Indicates if the resource name is available.", - "type": "boolean" - }, - "reason": { - "description": "The reason why the given name is not available.", - "type": "string", - "enum": [ - "Invalid", - "AlreadyExists" - ], - "x-ms-enum": { - "name": "CheckNameAvailabilityReason", - "modelAsString": true - } - }, - "message": { - "description": "Detailed reason why the given name is available.", - "type": "string" - } - } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the target subscription.", - "minLength": 1 - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for this operation.", - "minLength": 1 - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group. The name is case insensitive.", - "minLength": 1, - "maxLength": 90, - "x-ms-parameter-location": "method" - }, - "OperationIdParameter": { - "name": "operationId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of an ongoing async operation.", - "minLength": 1, - "x-ms-parameter-location": "method" - }, - "LocationParameter": { - "name": "location", - "in": "path", - "required": true, - "type": "string", - "description": "The name of Azure region.", - "minLength": 1, - "x-ms-parameter-location": "method" - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v3/managedidentity.json b/src/VoiceServices/test/swagger/common-types/resource-management/v3/managedidentity.json deleted file mode 100644 index f5b9f4241af7..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v3/managedidentity.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "3.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "UserAssignedIdentities": { - "title": "User-Assigned Identities", - "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UserAssignedIdentity" - } - }, - "UserAssignedIdentity": { - "type": "object", - "description": "User assigned identity properties", - "properties": { - "principalId": { - "description": "The principal ID of the assigned identity.", - "format": "uuid", - "type": "string", - "readOnly": true - }, - "clientId": { - "description": "The client ID of the assigned identity.", - "format": "uuid", - "type": "string", - "readOnly": true - } - } - }, - "ManagedServiceIdentityType": { - "description": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", - "enum": [ - "None", - "SystemAssigned", - "UserAssigned", - "SystemAssigned,UserAssigned" - ], - "type": "string", - "x-ms-enum": { - "name": "ManagedServiceIdentityType", - "modelAsString": true - } - }, - "ManagedServiceIdentity": { - "description": "Managed service identity (system assigned and/or user assigned identities)", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "tenantId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "type": { - "$ref": "#/definitions/ManagedServiceIdentityType" - }, - "userAssignedIdentities": { - "$ref": "#/definitions/UserAssignedIdentities" - } - }, - "required": [ - "type" - ] - }, - "SystemAssignedServiceIdentityType": { - "description": "Type of managed service identity (either system assigned, or none).", - "enum": [ - "None", - "SystemAssigned" - ], - "type": "string", - "x-ms-enum": { - "name": "SystemAssignedServiceIdentityType", - "modelAsString": true - } - }, - "SystemAssignedServiceIdentity": { - "description": "Managed service identity (either system assigned, or none)", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "tenantId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "type": { - "$ref": "#/definitions/SystemAssignedServiceIdentityType" - } - }, - "required": [ - "type" - ] - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v3/privatelinks.json b/src/VoiceServices/test/swagger/common-types/resource-management/v3/privatelinks.json deleted file mode 100644 index 6d1ba0bc65f3..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v3/privatelinks.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "3.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "PrivateEndpoint": { - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "The ARM identifier for Private Endpoint" - } - }, - "description": "The Private Endpoint resource." - }, - "PrivateEndpointConnection": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/PrivateEndpointConnectionProperties", - "x-ms-client-flatten": true, - "description": "Resource properties." - } - }, - "allOf": [ - { - "$ref": "./types.json#/definitions/Resource" - } - ], - "description": "The Private Endpoint Connection resource." - }, - "PrivateEndpointConnectionProperties": { - "type": "object", - "properties": { - "privateEndpoint": { - "$ref": "#/definitions/PrivateEndpoint", - "description": "The resource of private end point." - }, - "privateLinkServiceConnectionState": { - "$ref": "#/definitions/PrivateLinkServiceConnectionState", - "description": "A collection of information about the state of the connection between service consumer and provider." - }, - "provisioningState": { - "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", - "description": "The provisioning state of the private endpoint connection resource." - } - }, - "required": [ - "privateLinkServiceConnectionState" - ], - "description": "Properties of the PrivateEndpointConnectProperties." - }, - "PrivateLinkServiceConnectionState": { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/PrivateEndpointServiceConnectionStatus", - "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." - }, - "description": { - "type": "string", - "description": "The reason for approval/rejection of the connection." - }, - "actionsRequired": { - "type": "string", - "description": "A message indicating if changes on the service provider require any updates on the consumer." - } - }, - "description": "A collection of information about the state of the connection between service consumer and provider." - }, - "PrivateEndpointServiceConnectionStatus": { - "type": "string", - "description": "The private endpoint connection status.", - "enum": [ - "Pending", - "Approved", - "Rejected" - ], - "x-ms-enum": { - "name": "PrivateEndpointServiceConnectionStatus", - "modelAsString": true - } - }, - "PrivateEndpointConnectionProvisioningState": { - "type": "string", - "readOnly": true, - "description": "The current provisioning state.", - "enum": [ - "Succeeded", - "Creating", - "Deleting", - "Failed" - ], - "x-ms-enum": { - "name": "PrivateEndpointConnectionProvisioningState", - "modelAsString": true - } - }, - "PrivateLinkResource": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/PrivateLinkResourceProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "./types.json#/definitions/Resource" - } - ], - "description": "A private link resource" - }, - "PrivateLinkResourceProperties": { - "type": "object", - "properties": { - "groupId": { - "description": "The private link resource group id.", - "type": "string", - "readOnly": true - }, - "requiredMembers": { - "description": "The private link resource required member names.", - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - }, - "requiredZoneNames": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The private link resource Private link DNS zone name." - } - }, - "description": "Properties of a private link resource." - }, - "PrivateEndpointConnectionListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "description": "Array of private endpoint connections", - "items": { - "$ref": "#/definitions/PrivateEndpointConnection" - } - } - }, - "description": "List of private endpoint connection associated with the specified storage account" - }, - "PrivateLinkResourceListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "description": "Array of private link resources", - "items": { - "$ref": "#/definitions/PrivateLinkResource" - } - } - }, - "description": "A list of private link resources" - } - }, - "parameters": { - "PrivateEndpointConnectionName": { - "name": "privateEndpointConnectionName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the private endpoint connection associated with the Azure resource", - "x-ms-parameter-location": "method" - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v3/types.json b/src/VoiceServices/test/swagger/common-types/resource-management/v3/types.json deleted file mode 100644 index 7885efc272b1..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v3/types.json +++ /dev/null @@ -1,667 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "3.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "Resource": { - "title": "Resource", - "description": "Common fields that are returned in the response for all Azure Resource Manager resources", - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "type": { - "readOnly": true, - "type": "string", - "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" - }, - "systemData": { - "readOnly": true, - "type": "object", - "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", - "$ref": "#/definitions/systemData" - } - }, - "x-ms-azure-resource": true - }, - "AzureEntityResource": { - "x-ms-client-name": "AzureEntityResource", - "title": "Entity Resource", - "description": "The resource model definition for an Azure Resource Manager resource with an etag.", - "type": "object", - "properties": { - "etag": { - "type": "string", - "readOnly": true, - "description": "Resource Etag." - } - }, - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "TrackedResource": { - "title": "Tracked Resource", - "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", - "type": "object", - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, - "location": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "The geo-location where the resource lives" - } - }, - "required": [ - "location" - ], - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ProxyResource": { - "title": "Proxy Resource", - "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ResourceModelWithAllowedPropertySet": { - "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", - "type": "object", - "properties": { - "managedBy": { - "type": "string", - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." - }, - "kind": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", - "pattern": "^[-\\w\\._,\\(\\)]+$" - }, - "etag": { - "readOnly": true, - "type": "string", - "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " - }, - "identity": { - "allOf": [ - { - "$ref": "#/definitions/Identity" - } - ] - }, - "sku": { - "allOf": [ - { - "$ref": "#/definitions/Sku" - } - ] - }, - "plan": { - "allOf": [ - { - "$ref": "#/definitions/Plan" - } - ] - } - }, - "allOf": [ - { - "$ref": "#/definitions/TrackedResource" - } - ], - "x-ms-azure-resource": true - }, - "SkuTier": { - "type": "string", - "enum": [ - "Free", - "Basic", - "Standard", - "Premium" - ], - "x-ms-enum": { - "name": "SkuTier", - "modelAsString": false - }, - "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." - }, - "Sku": { - "description": "The resource model definition representing SKU", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" - }, - "tier": { - "$ref": "#/definitions/SkuTier" - }, - "size": { - "type": "string", - "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " - }, - "family": { - "type": "string", - "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." - }, - "capacity": { - "type": "integer", - "format": "int32", - "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." - } - }, - "required": [ - "name" - ] - }, - "Identity": { - "description": "Identity for the resource.", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "type": "string", - "description": "The principal ID of resource identity." - }, - "tenantId": { - "readOnly": true, - "type": "string", - "description": "The tenant ID of resource." - }, - "type": { - "type": "string", - "description": "The identity type.", - "enum": [ - "SystemAssigned" - ], - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - } - } - } - }, - "Plan": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A user defined name of the 3rd Party Artifact that is being procured." - }, - "publisher": { - "type": "string", - "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" - }, - "product": { - "type": "string", - "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " - }, - "promotionCode": { - "type": "string", - "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." - }, - "version": { - "type": "string", - "description": "The version of the desired product/artifact." - } - }, - "description": "Plan for the resource.", - "required": [ - "name", - "publisher", - "product" - ] - }, - "ErrorDetail": { - "description": "The error detail.", - "type": "object", - "properties": { - "code": { - "readOnly": true, - "type": "string", - "description": "The error code." - }, - "message": { - "readOnly": true, - "type": "string", - "description": "The error message." - }, - "target": { - "readOnly": true, - "type": "string", - "description": "The error target." - }, - "details": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDetail" - }, - "x-ms-identifiers": [ - "message", - "target" - ], - "description": "The error details." - }, - "additionalInfo": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorAdditionalInfo" - }, - "x-ms-identifiers": [], - "description": "The error additional info." - } - } - }, - "ErrorResponse": { - "title": "Error response", - "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", - "type": "object", - "properties": { - "error": { - "description": "The error object.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "ErrorAdditionalInfo": { - "type": "object", - "properties": { - "type": { - "readOnly": true, - "type": "string", - "description": "The additional info type." - }, - "info": { - "readOnly": true, - "type": "object", - "description": "The additional info." - } - }, - "description": "The resource management error additional info." - }, - "Operation": { - "title": "REST API Operation", - "description": "Details of a REST API operation, returned from the Resource Provider Operations API", - "type": "object", - "properties": { - "name": { - "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", - "type": "string", - "readOnly": true - }, - "isDataAction": { - "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", - "type": "boolean", - "readOnly": true - }, - "display": { - "description": "Localized display information for this particular operation.", - "type": "object", - "properties": { - "provider": { - "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", - "type": "string", - "readOnly": true - }, - "description": { - "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", - "type": "string", - "readOnly": true - } - } - }, - "origin": { - "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", - "type": "string", - "readOnly": true, - "enum": [ - "user", - "system", - "user,system" - ], - "x-ms-enum": { - "name": "Origin", - "modelAsString": true - } - }, - "actionType": { - "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", - "type": "string", - "readOnly": true, - "enum": [ - "Internal" - ], - "x-ms-enum": { - "name": "ActionType", - "modelAsString": true - } - } - } - }, - "OperationListResult": { - "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "x-ms-identifiers": [ - "name" - ], - "description": "List of operations supported by the resource provider", - "readOnly": true - }, - "nextLink": { - "type": "string", - "description": "URL to get the next set of operation list results (if there are any).", - "readOnly": true - } - } - }, - "OperationStatusResult": { - "description": "The current status of an async operation.", - "type": "object", - "required": [ - "status" - ], - "properties": { - "id": { - "description": "Fully qualified ID for the async operation.", - "type": "string" - }, - "name": { - "description": "Name of the async operation.", - "type": "string" - }, - "status": { - "description": "Operation status.", - "type": "string" - }, - "percentComplete": { - "description": "Percent of the operation that is complete.", - "type": "number", - "minimum": 0, - "maximum": 100 - }, - "startTime": { - "description": "The start time of the operation.", - "type": "string", - "format": "date-time" - }, - "endTime": { - "description": "The end time of the operation.", - "type": "string", - "format": "date-time" - }, - "operations": { - "description": "The operations list.", - "type": "array", - "items": { - "$ref": "#/definitions/OperationStatusResult" - } - }, - "error": { - "description": "If present, details of the operation error.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "locationData": { - "description": "Metadata pertaining to the geographic location of the resource.", - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256, - "description": "A canonical name for the geographic or physical location." - }, - "city": { - "type": "string", - "description": "The city or locality where the resource is located." - }, - "district": { - "type": "string", - "description": "The district, state, or province where the resource is located." - }, - "countryOrRegion": { - "type": "string", - "description": "The country or region where the resource is located" - } - }, - "required": [ - "name" - ] - }, - "systemData": { - "description": "Metadata pertaining to creation and last modification of the resource.", - "type": "object", - "readOnly": true, - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "type": "string", - "description": "The type of identity that last modified the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)" - } - } - }, - "encryptionProperties": { - "description": "Configuration of key for data encryption", - "type": "object", - "properties": { - "status": { - "description": "Indicates whether or not the encryption is enabled for container registry.", - "enum": [ - "enabled", - "disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "EncryptionStatus", - "modelAsString": true - } - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, - "KeyVaultProperties": { - "type": "object", - "properties": { - "keyIdentifier": { - "description": "Key vault uri to access the encryption key.", - "type": "string" - }, - "identity": { - "description": "The client ID of the identity which will be used to access key vault.", - "type": "string" - } - } - }, - "CheckNameAvailabilityRequest": { - "description": "The check availability request body.", - "type": "object", - "properties": { - "name": { - "description": "The name of the resource for which availability needs to be checked.", - "type": "string" - }, - "type": { - "description": "The resource type.", - "type": "string" - } - } - }, - "CheckNameAvailabilityResponse": { - "description": "The check availability result.", - "type": "object", - "properties": { - "nameAvailable": { - "description": "Indicates if the resource name is available.", - "type": "boolean" - }, - "reason": { - "description": "The reason why the given name is not available.", - "type": "string", - "enum": [ - "Invalid", - "AlreadyExists" - ], - "x-ms-enum": { - "name": "CheckNameAvailabilityReason", - "modelAsString": true - } - }, - "message": { - "description": "Detailed reason why the given name is available.", - "type": "string" - } - } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the target subscription.", - "minLength": 1 - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for this operation.", - "minLength": 1 - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group. The name is case insensitive.", - "minLength": 1, - "maxLength": 90, - "x-ms-parameter-location": "method" - }, - "OperationIdParameter": { - "name": "operationId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of an ongoing async operation.", - "minLength": 1, - "x-ms-parameter-location": "method" - }, - "LocationParameter": { - "name": "location", - "in": "path", - "required": true, - "type": "string", - "description": "The name of Azure region.", - "minLength": 1, - "x-ms-parameter-location": "method" - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v4/customermanagedkeys.json b/src/VoiceServices/test/swagger/common-types/resource-management/v4/customermanagedkeys.json deleted file mode 100644 index d403a8e2c035..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v4/customermanagedkeys.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "4.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "encryption": { - "type": "object", - "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.", - "properties": { - "infrastructureEncryption": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-ms-enum": { - "name": "InfrastructureEncryption", - "modelAsString": true - }, - "description": "Values are enabled and disabled." - }, - "customerManagedKeyEncryption": { - "description": "All Customer-managed key encryption properties for the resource.", - "$ref": "#/definitions/customerManagedKeyEncryption" - } - } - }, - "customerManagedKeyEncryption": { - "type": "object", - "description": "All Customer-managed key encryption properties for the resource.", - "properties": { - "keyEncryptionKeyIdentity": { - "type": "object", - "description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.", - "properties": { - "identityType": { - "type": "string", - "enum": [ - "systemAssignedIdentity", - "userAssignedIdentity", - "delegatedResourceIdentity" - ], - "x-ms-enum": { - "name": "IdentityType", - "modelAsString": true - }, - "description": "Values can be systemAssignedIdentity or userAssignedIdentity" - }, - "userAssignedIdentityResourceId": { - "type": "string", - "format": "arm-id", - "description": "user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and delegatedResourceIdentity." - }, - "delegatedIdentityClientId": { - "type": "string", - "format": "uuid", - "description": "delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only." - } - } - }, - "keyEncryptionKeyUrl": { - "type": "string", - "description": "key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek." - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v4/managedidentity.json b/src/VoiceServices/test/swagger/common-types/resource-management/v4/managedidentity.json deleted file mode 100644 index 05f812c9d58f..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v4/managedidentity.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "4.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "UserAssignedIdentities": { - "title": "User-Assigned Identities", - "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UserAssignedIdentity" - } - }, - "UserAssignedIdentity": { - "type": "object", - "description": "User assigned identity properties", - "properties": { - "principalId": { - "description": "The principal ID of the assigned identity.", - "format": "uuid", - "type": "string", - "readOnly": true - }, - "clientId": { - "description": "The client ID of the assigned identity.", - "format": "uuid", - "type": "string", - "readOnly": true - } - } - }, - "ManagedServiceIdentityType": { - "description": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", - "enum": [ - "None", - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned" - ], - "type": "string", - "x-ms-enum": { - "name": "ManagedServiceIdentityType", - "modelAsString": true - } - }, - "ManagedServiceIdentity": { - "description": "Managed service identity (system assigned and/or user assigned identities)", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "tenantId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "type": { - "$ref": "#/definitions/ManagedServiceIdentityType" - }, - "userAssignedIdentities": { - "$ref": "#/definitions/UserAssignedIdentities" - } - }, - "required": [ - "type" - ] - }, - "SystemAssignedServiceIdentityType": { - "description": "Type of managed service identity (either system assigned, or none).", - "enum": [ - "None", - "SystemAssigned" - ], - "type": "string", - "x-ms-enum": { - "name": "SystemAssignedServiceIdentityType", - "modelAsString": true - } - }, - "SystemAssignedServiceIdentity": { - "description": "Managed service identity (either system assigned, or none)", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "tenantId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "type": { - "$ref": "#/definitions/SystemAssignedServiceIdentityType" - } - }, - "required": [ - "type" - ] - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v4/managedidentitywithdelegation.json b/src/VoiceServices/test/swagger/common-types/resource-management/v4/managedidentitywithdelegation.json deleted file mode 100644 index 74c486888b37..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v4/managedidentitywithdelegation.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "4.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "ManagedServiceIdentityWithDelegation": { - "description": "Managed service identity (system assigned and/or user assigned identities and/or delegated identities) - internal use only.", - "type": "object", - "allOf": [ - { - "$ref": "managedidentity.json#/definitions/ManagedServiceIdentity" - } - ], - "properties": { - "delegatedResources": { - "$ref": "#/definitions/DelegatedResources" - } - } - }, - "DelegatedResources": { - "description": "The set of delegated resources. The delegated resources dictionary keys will be source resource internal ids - internal use only.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/DelegatedResource" - } - }, - "DelegatedResource": { - "type": "object", - "description": "Delegated resource properties - internal use only.", - "properties": { - "resourceId": { - "description": "The ARM resource id of the delegated resource - internal use only.", - "type": "string" - }, - "tenantId": { - "description": "The tenant id of the delegated resource - internal use only.", - "format": "uuid", - "type": "string" - }, - "referralResource": { - "description": "The delegation id of the referral delegation (optional) - internal use only.", - "type": "string" - }, - "location": { - "description": "The source resource location - internal use only.", - "type": "string" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v4/privatelinks.json b/src/VoiceServices/test/swagger/common-types/resource-management/v4/privatelinks.json deleted file mode 100644 index ed72454301db..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v4/privatelinks.json +++ /dev/null @@ -1,190 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "4.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "PrivateEndpoint": { - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "The ARM identifier for private endpoint." - } - }, - "description": "The private endpoint resource." - }, - "PrivateEndpointConnection": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/PrivateEndpointConnectionProperties", - "x-ms-client-flatten": true, - "description": "Resource properties." - } - }, - "allOf": [ - { - "$ref": "../v4/types.json#/definitions/Resource" - } - ], - "description": "The private endpoint connection resource." - }, - "PrivateEndpointConnectionProperties": { - "type": "object", - "properties": { - "groupIds": { - "description": "The group ids for the private endpoint resource.", - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - }, - "privateEndpoint": { - "$ref": "#/definitions/PrivateEndpoint", - "description": "The private endpoint resource." - }, - "privateLinkServiceConnectionState": { - "$ref": "#/definitions/PrivateLinkServiceConnectionState", - "description": "A collection of information about the state of the connection between service consumer and provider." - }, - "provisioningState": { - "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", - "description": "The provisioning state of the private endpoint connection resource." - } - }, - "required": [ - "privateLinkServiceConnectionState" - ], - "description": "Properties of the private endpoint connection." - }, - "PrivateLinkServiceConnectionState": { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/PrivateEndpointServiceConnectionStatus", - "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." - }, - "description": { - "type": "string", - "description": "The reason for approval/rejection of the connection." - }, - "actionsRequired": { - "type": "string", - "description": "A message indicating if changes on the service provider require any updates on the consumer." - } - }, - "description": "A collection of information about the state of the connection between service consumer and provider." - }, - "PrivateEndpointServiceConnectionStatus": { - "type": "string", - "description": "The private endpoint connection status.", - "enum": [ - "Pending", - "Approved", - "Rejected" - ], - "x-ms-enum": { - "name": "PrivateEndpointServiceConnectionStatus", - "modelAsString": true - } - }, - "PrivateEndpointConnectionProvisioningState": { - "type": "string", - "readOnly": true, - "description": "The current provisioning state.", - "enum": [ - "Succeeded", - "Creating", - "Deleting", - "Failed" - ], - "x-ms-enum": { - "name": "PrivateEndpointConnectionProvisioningState", - "modelAsString": true - } - }, - "PrivateLinkResource": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/PrivateLinkResourceProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "../v4/types.json#/definitions/Resource" - } - ], - "description": "A private link resource." - }, - "PrivateLinkResourceProperties": { - "type": "object", - "properties": { - "groupId": { - "description": "The private link resource group id.", - "type": "string", - "readOnly": true - }, - "requiredMembers": { - "description": "The private link resource required member names.", - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - }, - "requiredZoneNames": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The private link resource private link DNS zone name." - } - }, - "description": "Properties of a private link resource." - }, - "PrivateEndpointConnectionListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "description": "Array of private endpoint connections.", - "items": { - "$ref": "#/definitions/PrivateEndpointConnection" - } - } - }, - "description": "List of private endpoint connections associated with the specified resource." - }, - "PrivateLinkResourceListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "description": "Array of private link resources", - "items": { - "$ref": "#/definitions/PrivateLinkResource" - } - } - }, - "description": "A list of private link resources." - } - }, - "parameters": { - "PrivateEndpointConnectionName": { - "name": "privateEndpointConnectionName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the private endpoint connection associated with the Azure resource.", - "x-ms-parameter-location": "method" - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v4/types.json b/src/VoiceServices/test/swagger/common-types/resource-management/v4/types.json deleted file mode 100644 index 84303a33cc90..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v4/types.json +++ /dev/null @@ -1,671 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "4.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "Resource": { - "title": "Resource", - "description": "Common fields that are returned in the response for all Azure Resource Manager resources", - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "format": "arm-id", - "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "type": { - "readOnly": true, - "type": "string", - "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" - }, - "systemData": { - "readOnly": true, - "type": "object", - "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", - "$ref": "#/definitions/systemData" - } - }, - "x-ms-azure-resource": true - }, - "AzureEntityResource": { - "x-ms-client-name": "AzureEntityResource", - "title": "Entity Resource", - "description": "The resource model definition for an Azure Resource Manager resource with an etag.", - "type": "object", - "properties": { - "etag": { - "type": "string", - "readOnly": true, - "description": "Resource Etag." - } - }, - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "TrackedResource": { - "title": "Tracked Resource", - "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", - "type": "object", - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, - "location": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "The geo-location where the resource lives" - } - }, - "required": [ - "location" - ], - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ProxyResource": { - "title": "Proxy Resource", - "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ResourceModelWithAllowedPropertySet": { - "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", - "type": "object", - "properties": { - "managedBy": { - "type": "string", - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." - }, - "kind": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", - "pattern": "^[-\\w\\._,\\(\\)]+$" - }, - "etag": { - "readOnly": true, - "type": "string", - "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " - }, - "identity": { - "allOf": [ - { - "$ref": "#/definitions/Identity" - } - ] - }, - "sku": { - "allOf": [ - { - "$ref": "#/definitions/Sku" - } - ] - }, - "plan": { - "allOf": [ - { - "$ref": "#/definitions/Plan" - } - ] - } - }, - "allOf": [ - { - "$ref": "#/definitions/TrackedResource" - } - ], - "x-ms-azure-resource": true - }, - "SkuTier": { - "type": "string", - "enum": [ - "Free", - "Basic", - "Standard", - "Premium" - ], - "x-ms-enum": { - "name": "SkuTier", - "modelAsString": false - }, - "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." - }, - "Sku": { - "description": "The resource model definition representing SKU", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the SKU. E.g. P3. It is typically a letter+number code" - }, - "tier": { - "$ref": "#/definitions/SkuTier" - }, - "size": { - "type": "string", - "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " - }, - "family": { - "type": "string", - "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." - }, - "capacity": { - "type": "integer", - "format": "int32", - "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." - } - }, - "required": [ - "name" - ] - }, - "Identity": { - "description": "Identity for the resource.", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "type": "string", - "format": "uuid", - "description": "The principal ID of resource identity. The value must be an UUID." - }, - "tenantId": { - "readOnly": true, - "type": "string", - "format": "uuid", - "description": "The tenant ID of resource. The value must be an UUID." - }, - "type": { - "type": "string", - "description": "The identity type.", - "enum": [ - "SystemAssigned" - ], - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - } - } - } - }, - "Plan": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A user defined name of the 3rd Party Artifact that is being procured." - }, - "publisher": { - "type": "string", - "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" - }, - "product": { - "type": "string", - "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " - }, - "promotionCode": { - "type": "string", - "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." - }, - "version": { - "type": "string", - "description": "The version of the desired product/artifact." - } - }, - "description": "Plan for the resource.", - "required": [ - "name", - "publisher", - "product" - ] - }, - "ErrorDetail": { - "description": "The error detail.", - "type": "object", - "properties": { - "code": { - "readOnly": true, - "type": "string", - "description": "The error code." - }, - "message": { - "readOnly": true, - "type": "string", - "description": "The error message." - }, - "target": { - "readOnly": true, - "type": "string", - "description": "The error target." - }, - "details": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDetail" - }, - "x-ms-identifiers": [ - "message", - "target" - ], - "description": "The error details." - }, - "additionalInfo": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorAdditionalInfo" - }, - "x-ms-identifiers": [], - "description": "The error additional info." - } - } - }, - "ErrorResponse": { - "title": "Error response", - "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", - "type": "object", - "properties": { - "error": { - "description": "The error object.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "ErrorAdditionalInfo": { - "type": "object", - "properties": { - "type": { - "readOnly": true, - "type": "string", - "description": "The additional info type." - }, - "info": { - "readOnly": true, - "type": "object", - "description": "The additional info." - } - }, - "description": "The resource management error additional info." - }, - "Operation": { - "title": "REST API Operation", - "description": "Details of a REST API operation, returned from the Resource Provider Operations API", - "type": "object", - "properties": { - "name": { - "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", - "type": "string", - "readOnly": true - }, - "isDataAction": { - "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", - "type": "boolean", - "readOnly": true - }, - "display": { - "description": "Localized display information for this particular operation.", - "type": "object", - "properties": { - "provider": { - "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", - "type": "string", - "readOnly": true - }, - "description": { - "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", - "type": "string", - "readOnly": true - } - } - }, - "origin": { - "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", - "type": "string", - "readOnly": true, - "enum": [ - "user", - "system", - "user,system" - ], - "x-ms-enum": { - "name": "Origin", - "modelAsString": true - } - }, - "actionType": { - "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", - "type": "string", - "readOnly": true, - "enum": [ - "Internal" - ], - "x-ms-enum": { - "name": "ActionType", - "modelAsString": true - } - } - } - }, - "OperationListResult": { - "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "x-ms-identifiers": [ - "name" - ], - "description": "List of operations supported by the resource provider", - "readOnly": true - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "URL to get the next set of operation list results (if there are any).", - "readOnly": true - } - } - }, - "OperationStatusResult": { - "description": "The current status of an async operation.", - "type": "object", - "required": [ - "status" - ], - "properties": { - "id": { - "description": "Fully qualified ID for the async operation.", - "type": "string" - }, - "name": { - "description": "Name of the async operation.", - "type": "string" - }, - "status": { - "description": "Operation status.", - "type": "string" - }, - "percentComplete": { - "description": "Percent of the operation that is complete.", - "type": "number", - "minimum": 0, - "maximum": 100 - }, - "startTime": { - "description": "The start time of the operation.", - "type": "string", - "format": "date-time" - }, - "endTime": { - "description": "The end time of the operation.", - "type": "string", - "format": "date-time" - }, - "operations": { - "description": "The operations list.", - "type": "array", - "items": { - "$ref": "#/definitions/OperationStatusResult" - } - }, - "error": { - "description": "If present, details of the operation error.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "locationData": { - "description": "Metadata pertaining to the geographic location of the resource.", - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256, - "description": "A canonical name for the geographic or physical location." - }, - "city": { - "type": "string", - "description": "The city or locality where the resource is located." - }, - "district": { - "type": "string", - "description": "The district, state, or province where the resource is located." - }, - "countryOrRegion": { - "type": "string", - "description": "The country or region where the resource is located" - } - }, - "required": [ - "name" - ] - }, - "systemData": { - "description": "Metadata pertaining to creation and last modification of the resource.", - "type": "object", - "readOnly": true, - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "type": "string", - "description": "The type of identity that last modified the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)" - } - } - }, - "encryptionProperties": { - "description": "Configuration of key for data encryption", - "type": "object", - "properties": { - "status": { - "description": "Indicates whether or not the encryption is enabled for container registry.", - "enum": [ - "enabled", - "disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "EncryptionStatus", - "modelAsString": true - } - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, - "KeyVaultProperties": { - "type": "object", - "properties": { - "keyIdentifier": { - "description": "Key vault uri to access the encryption key.", - "type": "string" - }, - "identity": { - "description": "The client ID of the identity which will be used to access key vault.", - "type": "string" - } - } - }, - "CheckNameAvailabilityRequest": { - "description": "The check availability request body.", - "type": "object", - "properties": { - "name": { - "description": "The name of the resource for which availability needs to be checked.", - "type": "string" - }, - "type": { - "description": "The resource type.", - "type": "string" - } - } - }, - "CheckNameAvailabilityResponse": { - "description": "The check availability result.", - "type": "object", - "properties": { - "nameAvailable": { - "description": "Indicates if the resource name is available.", - "type": "boolean" - }, - "reason": { - "description": "The reason why the given name is not available.", - "type": "string", - "enum": [ - "Invalid", - "AlreadyExists" - ], - "x-ms-enum": { - "name": "CheckNameAvailabilityReason", - "modelAsString": true - } - }, - "message": { - "description": "Detailed reason why the given name is available.", - "type": "string" - } - } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "format": "uuid", - "description": "The ID of the target subscription. The value must be an UUID." - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for this operation.", - "minLength": 1 - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group. The name is case insensitive.", - "minLength": 1, - "maxLength": 90, - "x-ms-parameter-location": "method" - }, - "OperationIdParameter": { - "name": "operationId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of an ongoing async operation.", - "minLength": 1, - "x-ms-parameter-location": "method" - }, - "LocationParameter": { - "name": "location", - "in": "path", - "required": true, - "type": "string", - "description": "The name of Azure region.", - "minLength": 1, - "x-ms-parameter-location": "method" - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/resource-management/v5/managedidentity.json b/src/VoiceServices/test/swagger/common-types/resource-management/v5/managedidentity.json deleted file mode 100644 index 388dd1f0a0d6..000000000000 --- a/src/VoiceServices/test/swagger/common-types/resource-management/v5/managedidentity.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "5.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "UserAssignedIdentities": { - "title": "User-Assigned Identities", - "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UserAssignedIdentity", - "x-nullable": true - } - }, - "UserAssignedIdentity": { - "type": "object", - "description": "User assigned identity properties", - "properties": { - "principalId": { - "description": "The principal ID of the assigned identity.", - "format": "uuid", - "type": "string", - "readOnly": true - }, - "clientId": { - "description": "The client ID of the assigned identity.", - "format": "uuid", - "type": "string", - "readOnly": true - } - } - }, - "ManagedServiceIdentityType": { - "description": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", - "enum": [ - "None", - "SystemAssigned", - "UserAssigned", - "SystemAssigned,UserAssigned" - ], - "type": "string", - "x-ms-enum": { - "name": "ManagedServiceIdentityType", - "modelAsString": true - } - }, - "ManagedServiceIdentity": { - "description": "Managed service identity (system assigned and/or user assigned identities)", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "tenantId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "type": { - "$ref": "#/definitions/ManagedServiceIdentityType" - }, - "userAssignedIdentities": { - "$ref": "#/definitions/UserAssignedIdentities" - } - }, - "required": [ - "type" - ] - }, - "SystemAssignedServiceIdentityType": { - "description": "Type of managed service identity (either system assigned, or none).", - "enum": [ - "None", - "SystemAssigned" - ], - "type": "string", - "x-ms-enum": { - "name": "SystemAssignedServiceIdentityType", - "modelAsString": true - } - }, - "SystemAssignedServiceIdentity": { - "description": "Managed service identity (either system assigned, or none)", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "tenantId": { - "readOnly": true, - "format": "uuid", - "type": "string", - "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity." - }, - "type": { - "$ref": "#/definitions/SystemAssignedServiceIdentityType" - } - }, - "required": [ - "type" - ] - } - } -} diff --git a/src/VoiceServices/test/swagger/common-types/rfcs/rfc7517.json b/src/VoiceServices/test/swagger/common-types/rfcs/rfc7517.json deleted file mode 100644 index c1032a754504..000000000000 --- a/src/VoiceServices/test/swagger/common-types/rfcs/rfc7517.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "1.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "JSONWebKey": { - "type": "object", - "required": [ - "kty" - ], - "properties": { - "alg": { - "description": "The \"alg\" (algorithm) parameter identifies the algorithm intended for\nuse with the key. The values used should either be registered in the\nIANA \"JSON Web Signature and Encryption Algorithms\" registry\nestablished by [JWA] or be a value that contains a Collision-\nResistant Name.", - "type": "string" - }, - "crv": { - "description": "The \"crv\" (curve) parameter identifies the curve type", - "type": "string" - }, - "d": { - "description": "RSA private exponent or ECC private key", - "type": "string" - }, - "dp": { - "description": "RSA Private Key Parameter", - "type": "string" - }, - "dq": { - "description": "RSA Private Key Parameter", - "type": "string" - }, - "e": { - "description": "RSA public exponent, in Base64", - "type": "string" - }, - "k": { - "description": "Symmetric key", - "type": "string" - }, - "kid": { - "description": "The \"kid\" (key ID) parameter is used to match a specific key. This\nis used, for instance, to choose among a set of keys within a JWK Set\nduring key rollover. The structure of the \"kid\" value is\nunspecified. When \"kid\" values are used within a JWK Set, different\nkeys within the JWK Set SHOULD use distinct \"kid\" values. (One\nexample in which different keys might use the same \"kid\" value is if\nthey have different \"kty\" (key type) values but are considered to be\nequivalent alternatives by the application using them.) The \"kid\"\nvalue is a case-sensitive string.", - "type": "string" - }, - "kty": { - "description": "The \"kty\" (key type) parameter identifies the cryptographic algorithm\nfamily used with the key, such as \"RSA\" or \"EC\". \"kty\" values should\neither be registered in the IANA \"JSON Web Key Types\" registry\nestablished by [JWA] or be a value that contains a Collision-\nResistant Name. The \"kty\" value is a case-sensitive string.", - "type": "string" - }, - "n": { - "description": "RSA modulus, in Base64", - "type": "string" - }, - "p": { - "description": "RSA secret prime", - "type": "string" - }, - "q": { - "description": "RSA secret prime, with p < q", - "type": "string" - }, - "qi": { - "description": "RSA Private Key Parameter", - "type": "string" - }, - "use": { - "description": "Use (\"public key use\") identifies the intended use of\nthe public key. The \"use\" parameter is employed to indicate whether\na public key is used for encrypting data or verifying the signature\non data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).", - "type": "string" - }, - "x": { - "description": "X coordinate for the Elliptic Curve point", - "type": "string" - }, - "x5c": { - "description": "The \"x5c\" (X.509 certificate chain) parameter contains a chain of one\nor more PKIX certificates [RFC5280]. The certificate chain is\nrepresented as a JSON array of certificate value strings. Each\nstring in the array is a base64-encoded (Section 4 of [RFC4648] --\nnot base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.\nThe PKIX certificate containing the key value MUST be the first\ncertificate.", - "type": "array", - "items": { - "type": "string" - } - }, - "y": { - "description": "Y coordinate for the Elliptic Curve point", - "type": "string" - } - } - }, - "JSONWebKeySet": { - "type": "object", - "properties": { - "keys": { - "description": "The value of the \"keys\" parameter is an array of JWK values. By\ndefault, the order of the JWK values within the array does not imply\nan order of preference among them, although applications of JWK Sets\ncan choose to assign a meaning to the order for their purposes, if\ndesired.", - "type": "array", - "items": { - "$ref": "#/definitions/JSONWebKey" - }, - "x-ms-identifiers": [] - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/cadl-project.yaml b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/cadl-project.yaml deleted file mode 100644 index a283814ef29b..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/cadl-project.yaml +++ /dev/null @@ -1,6 +0,0 @@ -emitters: - "@azure-tools/cadl-autorest": - azure-resource-provider-folder: ./swagger/VoiceServices/resource-manager - examples-directory: ./examples - "@azure-tools/cadl-providerhub-controller": - code-kind: model diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/communicationsgateway.cadl b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/communicationsgateway.cadl deleted file mode 100644 index eff7d4e6c752..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/communicationsgateway.cadl +++ /dev/null @@ -1,196 +0,0 @@ -// Definitions for the CommunicationsGateway resource and child resources - -import "@cadl-lang/openapi"; -import "@cadl-lang/rest"; -import "@azure-tools/cadl-providerhub"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; - -namespace Microsoft.VoiceServices; - -using Cadl.Http; -using Cadl.Rest; -using Azure.ResourceManager; - -@doc("A TestLine resource") -@parentResource(CommunicationsGateway) -model TestLine is TrackedResource { - @pattern("^[a-zA-Z0-9-]{3,24}$") - @key("testLineName") - @segment("testLines") - @doc("Unique identifier for this test line") - @visibility("Read") - @path - name: string; -} - -@doc("The purpose of the TestLine resource.") -enum TestLinePurpose { - Manual, - Automated, -} - -@doc("Details of the TestLine resource.") -model TestLineProperties is ResourceProperties { - @doc("The phone number") - @visibility("read", "write", "create") - phoneNumber: string; - @doc("Purpose of this test line, e.g. automated or manual testing") - @visibility("read", "write", "create") - purpose: TestLinePurpose; -} - -@armResourceOperations -interface TestLines extends ResourceRead, ResourceCreate, ResourceDelete, ResourceListByParent, ResourceUpdateNoProperties {} - -@doc("A Contact resource") -@parentResource(CommunicationsGateway) -model Contact is TrackedResource { - @pattern("^[a-zA-Z0-9-]{3,24}$") - @key("contactName") - @segment("contacts") - @doc("Unique identifier for this contact") - @visibility("Read") - @path - name: string; -} - -@doc("Details of the Contact resource.") -model ContactProperties is ResourceProperties { - @doc("Full name of contact") - @visibility("read", "write", "create") - contactName: string; - @doc("Telephone number of contact") - @visibility("read", "write", "create") - phoneNumber: string; - @doc("Email address of contact") - @visibility("read", "write", "create") - email: string; - @doc("Job title of contact") - @visibility("read", "write", "create") - role: string; -} - -@armResourceOperations -interface Contacts extends ResourceRead, ResourceCreate, ResourceDelete, ResourceListByParent, ResourceUpdateNoProperties {} - -@doc("A CommunicationsGateway resource") -model CommunicationsGateway is TrackedResource { - @pattern("^[a-zA-Z0-9-]{3,24}$") - @key("communicationsGatewayName") - @segment("communicationsGateways") - @doc("Unique identifier for this deployment") - @visibility("Read") - @path - name: string; -} - -@doc("The status of the current CommunicationsGateway resource.") -enum Status { - @doc("The resource has been created or updated, but the CommunicationsGateway service has not yet been updated to reflect the changes.") - ChangePending, - @doc("The CommunicationsGateway service is up and running with the parameters specified in the resource.") - Complete, -} - -@doc("The method for terminating emergency calls to the PSTN.") -@knownValues(E911TypeValues) -model E911Type is string {} -enum E911TypeValues { - @doc("Emergency calls are not handled different from other calls") - Standard, - @doc("Emergency calls are routed directly to the ESRP") - DirectToEsrp -} - -@doc("The voice codecs expected for communication with Teams.") -@knownValues(TeamsCodecsValues) -model TeamsCodecs is string {} -enum TeamsCodecsValues { - PCMA, - PCMU, - G722, - G722_2, - SILK_8, - SILK_16 -} - -@doc("How this deployment connects back to the operator network") -@knownValues(ConnectivityValues) -model Connectivity is string {} -enum ConnectivityValues { - @doc("This deployment connects to the operator network using a Public IP address, e.g. when using MAPS") - PublicAddress -} - -@doc("The service region configuration needed for Teams Callings.") -model ServiceRegionProperties { - @doc("The name of the region in which the resources needed for Teams Calling will be deployed.") - @visibility("read", "create") - name: string; - - @doc("The configuration used in this region as primary, and other regions as backup.") - @visibility("read", "write", "create") - primaryRegionProperties: PrimaryRegionProperties; -} - -@doc("The configuration used in this region as primary, and other regions as backup.") -model PrimaryRegionProperties { - @doc("IP address to use to contact the operator network from this region") - @visibility("read", "write", "create") - operatorAddresses: string[]; - - @doc("IP address to use to contact the ESRP from this region") - @visibility("read", "write", "create") - esrpAddresses?: string[]; -} - -@doc("Available platform types.") -@knownValues(CommunicationsPlatformValues) -model CommunicationsPlatform is string {} -enum CommunicationsPlatformValues { - OperatorConnect, - TeamsPhoneMobile -} - -// Currently empty, with presence indicating that this feature should be enabled. -// This is expected to include more properties in future, hence being an object. -@doc("Details of API bridge functionality.") -model ApiBridgeProperties {} - -@doc("Details of the CommunicationsGateway resource.") -model CommunicationsGatewayProperties is ResourceProperties { - @doc("The current status of the deployment.") - @visibility("read") status?: Status; - - @doc("The regions in which to deploy the resources needed for Teams Calling") - @OpenAPI.extension("x-ms-identifiers", ["name"]) - @visibility("read", "write", "create") - serviceLocations: ServiceRegionProperties[]; - - @doc("How to connect back to the operator network, e.g. MAPS") - @visibility("read", "create") - connectivity: Connectivity; - - @doc("Voice codecs to support") - @visibility("read", "write", "create") - codecs: TeamsCodecs[]; - - @doc("How to handle 911 calls") - @visibility("read", "write", "create") - e911Type: E911Type; - - @doc("What platforms to support") - @visibility("read", "write", "create") - // Can be set once we get a cald release with this decorator - // @minItems(1) - platforms: CommunicationsPlatform[]; - - @doc("Details of API bridge functionality, if required") - @visibility("read", "write", "create") - apiBridge?: ApiBridgeProperties; -} - -@armResourceOperations -interface CommunicationsGateways extends ResourceRead, ResourceCreate, ResourceDelete, ResourceListBySubscription, ResourceListByParent, ResourceUpdateNoProperties {} \ No newline at end of file diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_CreateOrUpdate.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_CreateOrUpdate.json deleted file mode 100644 index bb466a7ec891..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_CreateOrUpdate.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "operationId": "CommunicationsGateways_CreateOrUpdate", - "title": "CreateCommunicationsGatewayResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myname", - "communicationsGatewayName": "myname", - "resource": { - "location": "useast", - "properties": { - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", - "name": "myname", - "type": "Microsoft.Voiceservice/communicationsGateways", - "location": "useast", - "properties": { - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "status": "ChangePending", - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", - "name": "myname", - "type": "Microsoft.Voiceservice/communicationsGateways", - "location": "useast", - "properties": { - "status": "ChangePending", - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_Delete.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_Delete.json deleted file mode 100644 index d1f76c24cdad..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_Delete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "operationId": "CommunicationsGateways_Delete", - "title": "DeleteCommunicationsGatewayResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "communicationsGatewayName": "myname", - "location": "useast" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "azure-asyncoperation": "http://azure.async.operation/status" - } - }, - "204": {} - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_Get.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_Get.json deleted file mode 100644 index 8efad685dc33..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_Get.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "operationId": "CommunicationsGateways_Get", - "title": "GetCommunicationsGatewayResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myname", - "communicationsGatewayName": "myname" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", - "name": "myname", - "location": "useast", - "type": "Microsoft.VoiceService/communicationsGateways", - "properties": { - "status": "ChangePending", - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_ListByResourceGroup.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_ListByResourceGroup.json deleted file mode 100644 index 146372a6a349..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_ListByResourceGroup.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "operationId": "CommunicationsGateways_ListByResourceGroup", - "title": "ListCommunicationsGatewayResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", - "name": "myname", - "location": "useast", - "type": "Microsoft.VoiceService/communicationsGateways", - "properties": { - "status": "ChangePending", - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - ] - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_ListBySubscription.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_ListBySubscription.json deleted file mode 100644 index 9fad0988e234..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_ListBySubscription.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "operationId": "CommunicationsGateways_ListBySubscription", - "title": "ListCommunicationsGatewayResourceSub", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "api-version": "2022-12-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", - "name": "myname", - "location": "useast", - "type": "Microsoft.VoiceService/communicationsGateways", - "properties": { - "status": "ChangePending", - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - ] - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_Update.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_Update.json deleted file mode 100644 index ca99b610510c..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_Update.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "operationId": "CommunicationsGateways_Update", - "title": "UpdateCommunicationsGatewayResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "communicationsGatewayName": "myname", - "location": "useast", - "properties": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", - "name": "myname", - "type": "Microsoft.Voiceservice/communicationsGateways", - "location": "useast", - "properties": { - "status": "ChangePending", - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_CreateOrUpdate.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_CreateOrUpdate.json deleted file mode 100644 index 59131c9be8fa..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_CreateOrUpdate.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "operationId": "Contacts_CreateOrUpdate", - "title": "CreateContactResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "contactName": "name2", - "communicationsGatewayName": "myname", - "resource": { - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/contacts/name2", - "name": "name2", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/contacts", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/contacts/name2", - "name": "name2", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/contacts", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_Delete.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_Delete.json deleted file mode 100644 index 270817eb7d8b..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_Delete.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "operationId": "Contacts_Delete", - "title": "DeleteContactResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "contactName": "myline", - "communicationsGatewayName": "myname", - "location": "useast" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "azure-asyncoperation": "http://azure.async.operation/status" - } - }, - "204": {} - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_Get.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_Get.json deleted file mode 100644 index 1a91932af2fa..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_Get.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "operationId": "Contacts_Get", - "title": "GetContactResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "contactName": "name2", - "communicationsGatewayName": "myname" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/Contacts/name2", - "name": "name2", - "type": "Microsoft.Voiceservice/communicationsGateways/contacts", - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_ListByCommunicationsGateway.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_ListByCommunicationsGateway.json deleted file mode 100644 index cfcf664a2cb7..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_ListByCommunicationsGateway.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "operationId": "Contacts_ListByCommunicationsGateway", - "title": "ListContactsResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "communicationsGatewayName": "myname" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/Contacts/name2", - "name": "myline", - "type": "Microsoft.Voiceservice/communicationsGateways/Contacts", - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - ] - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_Update.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_Update.json deleted file mode 100644 index 3890ee058771..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Contacts_Update.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "operationId": "Contacts_Update", - "title": "UpdateContactResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "name2", - "contactName": "name2", - "communicationsGatewayName": "myname", - "location": "useast", - "properties": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/Contacts/name2", - "name": "name2", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/contacts", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Operations_List.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Operations_List.json deleted file mode 100644 index 7dabf395f464..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/Operations_List.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "operationId": "Operations_List", - "title": "OperationsList", - "parameters": { - "api-version": "2022-12-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.VoiceService/communicationsGateways/write", - "display": { - "provider": "Microsoft.VoiceService", - "resource": "communicationsGateways", - "operation": "write", - "description": "Write communicationsGateways resource" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_CreateOrUpdate.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_CreateOrUpdate.json deleted file mode 100644 index f477fbd80634..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_CreateOrUpdate.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "operationId": "TestLines_CreateOrUpdate", - "title": "CreateTestLineResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myline", - "testLineName": "myline", - "communicationsGatewayName": "myname", - "resource": { - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", - "name": "myline", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/testLines", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", - "name": "myline", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/testLines", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_Delete.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_Delete.json deleted file mode 100644 index 9349078ba4af..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_Delete.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "operationId": "TestLines_Delete", - "title": "DeleteTestLineResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myline", - "testLineName": "myline", - "communicationsGatewayName": "myname", - "location": "useast" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "azure-asyncoperation": "http://azure.async.operation/status" - } - }, - "204": {} - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_Get.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_Get.json deleted file mode 100644 index 352a229a38a2..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_Get.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "operationId": "TestLines_Get", - "title": "GetTestLineResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myline", - "testLineName": "myline", - "communicationsGatewayName": "myname" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", - "name": "myline", - "type": "Microsoft.Voiceservice/communicationsGateways/testLines", - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_ListByCommunicationsGateway.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_ListByCommunicationsGateway.json deleted file mode 100644 index 586213c1617a..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_ListByCommunicationsGateway.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "operationId": "TestLines_ListByCommunicationsGateway", - "title": "ListTestLineResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "communicationsGatewayName": "myname" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", - "name": "myline", - "type": "Microsoft.Voiceservice/communicationsGateways/testLines", - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - ] - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_Update.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_Update.json deleted file mode 100644 index 5e2982704607..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/TestLines_Update.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "operationId": "TestLines_Update", - "title": "UpdateTestLineResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myline", - "testLineName": "myline", - "communicationsGatewayName": "myname", - "location": "useast", - "properties": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", - "name": "myline", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/testLines", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/main.cadl b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/main.cadl deleted file mode 100644 index 81e6d8570341..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/main.cadl +++ /dev/null @@ -1,5 +0,0 @@ -// First, import the common Microsoft.VoiceServices definition -import "./voiceservices.cadl"; - -// Then import the resource API definitions -import "./communicationsgateway.cadl"; \ No newline at end of file diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/package.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/package.json deleted file mode 100644 index abf51999fe52..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@azure-tools/cadl-providerhub-template", - "version": "1.0.0", - "private": true, - "type": "module", - "scripts": { - "build": "echo \"Nothing to do for template.\"", - "refreshVSToken": "vsts-npm-auth -config \".npmrc\" -TargetConfig \"$HOME\\.npmrc\"" - }, - "dependencies": { - "@cadl-lang/compiler": "~0.35.0", - "@cadl-lang/openapi": "~0.12.0", - "@cadl-lang/rest": "~0.17.0", - "@azure-tools/cadl-autorest": "~0.20.0", - "@azure-tools/cadl-azure-core": "~0.7.0", - "@azure-tools/cadl-providerhub": "~0.21.0", - "@azure-tools/cadl-providerhub-controller": "~0.16.0", - "@azure-tools/cadl-azure-resource-manager": "~0.10.0" - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/voiceservices.cadl b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/voiceservices.cadl deleted file mode 100644 index e1a8ca9ea64e..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/voiceservices.cadl +++ /dev/null @@ -1,60 +0,0 @@ -import "@cadl-lang/rest"; -import "@azure-tools/cadl-providerhub"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; -import "@cadl-lang/versioning"; - -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; -using Azure.ResourceManager; - -@armProviderNamespace("Microsoft.VoiceServices") -@serviceTitle("Microsoft.VoiceServices") -@serviceVersion("2022-12-01-preview") -@versionedDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) -namespace Microsoft.VoiceServices; - -// Various tooling enforces (or at least suggests) that all models should have a provisioning State field, as this means something special to ARM. - -@doc("Provisioning state of the resource.") -enum ProvisioningStateEnum { - Succeeded, Failed, Canceled -} - -@knownValues(ProvisioningStateEnum) -model ProvisioningState is string; - -@doc("General resource properties.") -model ResourceProperties { - @doc("Resource provisioning state.") - @visibility("read") - provisioningState?: ProvisioningState; -} - -// A helper template for defining empty properties for resource PATCH operations -// In a future release this won't be necessary. -// See https://github.com/Azure/azure-rest-api-specs-pr/pull/8707#discussion_r971363996 for context -@doc("The type used for update operations of the {name}.", TResource) -@friendlyName("{name}Update", TResource) -model ResourceUpdateModelNoProperties - is OptionalProperties>>; - -#suppress "@azure-tools/cadl-azure-resource-manager/arm-resource-interface-requires-decorator" "Interface template does not require this." -#suppress "@azure-tools/cadl-azure-resource-manager/arm-resource-interface-uses-templates" "This is an official operations template." -@doc("Template for resources with no updateable properties") -@armResourceOperations -interface ResourceUpdateNoProperties { - @autoRoute - @doc("Update a {name}", TResource) - @armResourceUpdate(TResource) - @patch - update( - ...ResourceInstanceParameters, - - @doc("The resource properties to be updated.") - @body - properties: ResourceUpdateModelNoProperties - ): ArmResponse | ErrorResponse; -} \ No newline at end of file diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_CreateOrUpdate.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_CreateOrUpdate.json deleted file mode 100644 index bb466a7ec891..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_CreateOrUpdate.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "operationId": "CommunicationsGateways_CreateOrUpdate", - "title": "CreateCommunicationsGatewayResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myname", - "communicationsGatewayName": "myname", - "resource": { - "location": "useast", - "properties": { - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", - "name": "myname", - "type": "Microsoft.Voiceservice/communicationsGateways", - "location": "useast", - "properties": { - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "status": "ChangePending", - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", - "name": "myname", - "type": "Microsoft.Voiceservice/communicationsGateways", - "location": "useast", - "properties": { - "status": "ChangePending", - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_Delete.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_Delete.json deleted file mode 100644 index d1f76c24cdad..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_Delete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "operationId": "CommunicationsGateways_Delete", - "title": "DeleteCommunicationsGatewayResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "communicationsGatewayName": "myname", - "location": "useast" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "azure-asyncoperation": "http://azure.async.operation/status" - } - }, - "204": {} - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_Get.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_Get.json deleted file mode 100644 index 8efad685dc33..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_Get.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "operationId": "CommunicationsGateways_Get", - "title": "GetCommunicationsGatewayResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myname", - "communicationsGatewayName": "myname" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", - "name": "myname", - "location": "useast", - "type": "Microsoft.VoiceService/communicationsGateways", - "properties": { - "status": "ChangePending", - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_ListByResourceGroup.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_ListByResourceGroup.json deleted file mode 100644 index 146372a6a349..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_ListByResourceGroup.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "operationId": "CommunicationsGateways_ListByResourceGroup", - "title": "ListCommunicationsGatewayResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", - "name": "myname", - "location": "useast", - "type": "Microsoft.VoiceService/communicationsGateways", - "properties": { - "status": "ChangePending", - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - ] - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_ListBySubscription.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_ListBySubscription.json deleted file mode 100644 index 9fad0988e234..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_ListBySubscription.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "operationId": "CommunicationsGateways_ListBySubscription", - "title": "ListCommunicationsGatewayResourceSub", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "api-version": "2022-12-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", - "name": "myname", - "location": "useast", - "type": "Microsoft.VoiceService/communicationsGateways", - "properties": { - "status": "ChangePending", - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - ] - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_Update.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_Update.json deleted file mode 100644 index ca99b610510c..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/CommunicationsGateways_Update.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "operationId": "CommunicationsGateways_Update", - "title": "UpdateCommunicationsGatewayResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "communicationsGatewayName": "myname", - "location": "useast", - "properties": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", - "name": "myname", - "type": "Microsoft.Voiceservice/communicationsGateways", - "location": "useast", - "properties": { - "status": "ChangePending", - "serviceLocations": [ - { - "name": "useast", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.1" - ] - } - }, - { - "name": "useast2", - "primaryRegionProperties": { - "operatorAddresses": [ - "198.51.100.2" - ] - } - } - ], - "connectivity": "PublicAddress", - "codecs": [ - "PCMA" - ], - "e911Type": "Standard", - "platforms": [ - "OperatorConnect" - ] - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_CreateOrUpdate.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_CreateOrUpdate.json deleted file mode 100644 index 59131c9be8fa..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_CreateOrUpdate.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "operationId": "Contacts_CreateOrUpdate", - "title": "CreateContactResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "contactName": "name2", - "communicationsGatewayName": "myname", - "resource": { - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/contacts/name2", - "name": "name2", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/contacts", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/contacts/name2", - "name": "name2", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/contacts", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_Delete.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_Delete.json deleted file mode 100644 index 270817eb7d8b..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_Delete.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "operationId": "Contacts_Delete", - "title": "DeleteContactResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "contactName": "myline", - "communicationsGatewayName": "myname", - "location": "useast" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "azure-asyncoperation": "http://azure.async.operation/status" - } - }, - "204": {} - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_Get.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_Get.json deleted file mode 100644 index 1a91932af2fa..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_Get.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "operationId": "Contacts_Get", - "title": "GetContactResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "contactName": "name2", - "communicationsGatewayName": "myname" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/Contacts/name2", - "name": "name2", - "type": "Microsoft.Voiceservice/communicationsGateways/contacts", - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_ListByCommunicationsGateway.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_ListByCommunicationsGateway.json deleted file mode 100644 index cfcf664a2cb7..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_ListByCommunicationsGateway.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "operationId": "Contacts_ListByCommunicationsGateway", - "title": "ListContactsResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "communicationsGatewayName": "myname" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/Contacts/name2", - "name": "myline", - "type": "Microsoft.Voiceservice/communicationsGateways/Contacts", - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - ] - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_Update.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_Update.json deleted file mode 100644 index 3890ee058771..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Contacts_Update.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "operationId": "Contacts_Update", - "title": "UpdateContactResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "name2", - "contactName": "name2", - "communicationsGatewayName": "myname", - "location": "useast", - "properties": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/Contacts/name2", - "name": "name2", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/contacts", - "properties": { - "phoneNumber": "+1-555-1234", - "contactName": "John Smith", - "email": "johnsmith@example.com", - "role": "Network Manager" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Operations_List.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Operations_List.json deleted file mode 100644 index 7dabf395f464..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/Operations_List.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "operationId": "Operations_List", - "title": "OperationsList", - "parameters": { - "api-version": "2022-12-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.VoiceService/communicationsGateways/write", - "display": { - "provider": "Microsoft.VoiceService", - "resource": "communicationsGateways", - "operation": "write", - "description": "Write communicationsGateways resource" - } - } - ], - "nextLink": null - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_CreateOrUpdate.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_CreateOrUpdate.json deleted file mode 100644 index f477fbd80634..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_CreateOrUpdate.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "operationId": "TestLines_CreateOrUpdate", - "title": "CreateTestLineResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myline", - "testLineName": "myline", - "communicationsGatewayName": "myname", - "resource": { - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", - "name": "myline", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/testLines", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", - "name": "myline", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/testLines", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_Delete.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_Delete.json deleted file mode 100644 index 9349078ba4af..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_Delete.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "operationId": "TestLines_Delete", - "title": "DeleteTestLineResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myline", - "testLineName": "myline", - "communicationsGatewayName": "myname", - "location": "useast" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "azure-asyncoperation": "http://azure.async.operation/status" - } - }, - "204": {} - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_Get.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_Get.json deleted file mode 100644 index 352a229a38a2..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_Get.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "operationId": "TestLines_Get", - "title": "GetTestLineResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myline", - "testLineName": "myline", - "communicationsGatewayName": "myname" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", - "name": "myline", - "type": "Microsoft.Voiceservice/communicationsGateways/testLines", - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_ListByCommunicationsGateway.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_ListByCommunicationsGateway.json deleted file mode 100644 index 586213c1617a..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_ListByCommunicationsGateway.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "operationId": "TestLines_ListByCommunicationsGateway", - "title": "ListTestLineResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "communicationsGatewayName": "myname" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", - "name": "myline", - "type": "Microsoft.Voiceservice/communicationsGateways/testLines", - "location": "useast", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - ] - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_Update.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_Update.json deleted file mode 100644 index 5e2982704607..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/examples/TestLines_Update.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "operationId": "TestLines_Update", - "title": "UpdateTestLineResource", - "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "testrg", - "api-version": "2022-12-01-preview", - "name": "myline", - "testLineName": "myline", - "communicationsGatewayName": "myname", - "location": "useast", - "properties": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", - "name": "myline", - "location": "useast", - "type": "Microsoft.Voiceservice/communicationsGateways/testLines", - "properties": { - "phoneNumber": "+1-555-1234", - "purpose": "Automated" - } - } - } - } -} diff --git a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/openapi.json b/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/openapi.json deleted file mode 100644 index fa839b3160ad..000000000000 --- a/src/VoiceServices/test/swagger/voiceservices/resource-manager/Microsoft.VoiceServices/preview/2022-12-01-preview/openapi.json +++ /dev/null @@ -1,1482 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Microsoft.VoiceServices", - "version": "2022-12-01-preview", - "x-cadl-generated": [ - { - "emitter": "@azure-tools/cadl-autorest" - } - ] - }, - "schemes": [ - "https" - ], - "host": "management.azure.com", - "produces": [ - "application/json" - ], - "consumes": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "description": "Azure Active Directory OAuth2 Flow.", - "flow": "implicit", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "tags": [ - { - "name": "TestLines" - }, - { - "name": "Contacts" - }, - { - "name": "CommunicationsGateways" - }, - { - "name": "Operations" - } - ], - "paths": { - "/providers/Microsoft.VoiceServices/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "List the operations for the provider", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "OperationsList": { - "$ref": "./examples/Operations_List.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.VoiceServices/communicationsGateways": { - "get": { - "tags": [ - "CommunicationsGateways" - ], - "operationId": "CommunicationsGateways_ListBySubscription", - "description": "List CommunicationsGateway resources by subscription ID", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/CommunicationsGatewayListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "ListCommunicationsGatewayResourceSub": { - "$ref": "./examples/CommunicationsGateways_ListBySubscription.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways": { - "get": { - "tags": [ - "CommunicationsGateways" - ], - "operationId": "CommunicationsGateways_ListByResourceGroup", - "description": "List CommunicationsGateway resources by resource group", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/CommunicationsGatewayListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "ListCommunicationsGatewayResource": { - "$ref": "./examples/CommunicationsGateways_ListByResourceGroup.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}": { - "get": { - "tags": [ - "CommunicationsGateways" - ], - "operationId": "CommunicationsGateways_Get", - "description": "Get a CommunicationsGateway", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/CommunicationsGateway" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "GetCommunicationsGatewayResource": { - "$ref": "./examples/CommunicationsGateways_Get.json" - } - } - }, - "put": { - "tags": [ - "CommunicationsGateways" - ], - "operationId": "CommunicationsGateways_CreateOrUpdate", - "description": "Create a CommunicationsGateway", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - }, - { - "name": "resource", - "in": "body", - "required": true, - "description": "Resource create parameters.", - "schema": { - "$ref": "#/definitions/CommunicationsGateway" - } - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/CommunicationsGateway" - } - }, - "201": { - "description": "ARM create operation completed successfully.", - "headers": { - "Retry-After": { - "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": "integer", - "format": "int32" - } - }, - "schema": { - "$ref": "#/definitions/CommunicationsGateway" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "CreateCommunicationsGatewayResource": { - "$ref": "./examples/CommunicationsGateways_CreateOrUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "tags": [ - "CommunicationsGateways" - ], - "operationId": "CommunicationsGateways_Delete", - "description": "Delete a CommunicationsGateway", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "202": { - "description": "Resource deletion accepted.", - "headers": { - "Retry-After": { - "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": "integer", - "format": "int32" - } - } - }, - "204": { - "description": "Resource deleted successfully." - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "DeleteCommunicationsGatewayResource": { - "$ref": "./examples/CommunicationsGateways_Delete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "tags": [ - "CommunicationsGateways" - ], - "operationId": "CommunicationsGateways_Update", - "description": "Update a CommunicationsGateway", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - }, - { - "name": "properties", - "in": "body", - "required": true, - "description": "The resource properties to be updated.", - "schema": { - "$ref": "#/definitions/CommunicationsGatewayUpdate" - } - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/CommunicationsGateway" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "UpdateCommunicationsGatewayResource": { - "$ref": "./examples/CommunicationsGateways_Update.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts": { - "get": { - "tags": [ - "Contacts" - ], - "operationId": "Contacts_ListByCommunicationsGateway", - "description": "List Contact resources by CommunicationsGateway", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/ContactListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "ListContactsResource": { - "$ref": "./examples/Contacts_ListByCommunicationsGateway.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/contacts/{contactName}": { - "get": { - "tags": [ - "Contacts" - ], - "operationId": "Contacts_Get", - "description": "Get a Contact", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - }, - { - "$ref": "#/parameters/Contact.contactName" - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/Contact" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "GetContactResource": { - "$ref": "./examples/Contacts_Get.json" - } - } - }, - "put": { - "tags": [ - "Contacts" - ], - "operationId": "Contacts_CreateOrUpdate", - "description": "Create a Contact", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - }, - { - "$ref": "#/parameters/Contact.contactName" - }, - { - "name": "resource", - "in": "body", - "required": true, - "description": "Resource create parameters.", - "schema": { - "$ref": "#/definitions/Contact" - } - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/Contact" - } - }, - "201": { - "description": "ARM create operation completed successfully.", - "headers": { - "Retry-After": { - "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": "integer", - "format": "int32" - } - }, - "schema": { - "$ref": "#/definitions/Contact" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "CreateContactResource": { - "$ref": "./examples/Contacts_CreateOrUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "tags": [ - "Contacts" - ], - "operationId": "Contacts_Delete", - "description": "Delete a Contact", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - }, - { - "$ref": "#/parameters/Contact.contactName" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "202": { - "description": "Resource deletion accepted.", - "headers": { - "Retry-After": { - "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": "integer", - "format": "int32" - } - } - }, - "204": { - "description": "Resource deleted successfully." - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "DeleteContactResource": { - "$ref": "./examples/Contacts_Delete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "tags": [ - "Contacts" - ], - "operationId": "Contacts_Update", - "description": "Update a Contact", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - }, - { - "$ref": "#/parameters/Contact.contactName" - }, - { - "name": "properties", - "in": "body", - "required": true, - "description": "The resource properties to be updated.", - "schema": { - "$ref": "#/definitions/ContactUpdate" - } - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/Contact" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "UpdateContactResource": { - "$ref": "./examples/Contacts_Update.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines": { - "get": { - "tags": [ - "TestLines" - ], - "operationId": "TestLines_ListByCommunicationsGateway", - "description": "List TestLine resources by CommunicationsGateway", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/TestLineListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "ListTestLineResource": { - "$ref": "./examples/TestLines_ListByCommunicationsGateway.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines/{testLineName}": { - "get": { - "tags": [ - "TestLines" - ], - "operationId": "TestLines_Get", - "description": "Get a TestLine", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - }, - { - "$ref": "#/parameters/TestLine.testLineName" - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/TestLine" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "GetTestLineResource": { - "$ref": "./examples/TestLines_Get.json" - } - } - }, - "put": { - "tags": [ - "TestLines" - ], - "operationId": "TestLines_CreateOrUpdate", - "description": "Create a TestLine", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - }, - { - "$ref": "#/parameters/TestLine.testLineName" - }, - { - "name": "resource", - "in": "body", - "required": true, - "description": "Resource create parameters.", - "schema": { - "$ref": "#/definitions/TestLine" - } - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/TestLine" - } - }, - "201": { - "description": "ARM create operation completed successfully.", - "headers": { - "Retry-After": { - "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": "integer", - "format": "int32" - } - }, - "schema": { - "$ref": "#/definitions/TestLine" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "CreateTestLineResource": { - "$ref": "./examples/TestLines_CreateOrUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "tags": [ - "TestLines" - ], - "operationId": "TestLines_Delete", - "description": "Delete a TestLine", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - }, - { - "$ref": "#/parameters/TestLine.testLineName" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "202": { - "description": "Resource deletion accepted.", - "headers": { - "Retry-After": { - "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": "integer", - "format": "int32" - } - } - }, - "204": { - "description": "Resource deleted successfully." - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "DeleteTestLineResource": { - "$ref": "./examples/TestLines_Delete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "tags": [ - "TestLines" - ], - "operationId": "TestLines_Update", - "description": "Update a TestLine", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CommunicationsGateway.communicationsGatewayName" - }, - { - "$ref": "#/parameters/TestLine.testLineName" - }, - { - "name": "properties", - "in": "body", - "required": true, - "description": "The resource properties to be updated.", - "schema": { - "$ref": "#/definitions/TestLineUpdate" - } - } - ], - "responses": { - "200": { - "description": "ARM operation completed successfully.", - "schema": { - "$ref": "#/definitions/TestLine" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "UpdateTestLineResource": { - "$ref": "./examples/TestLines_Update.json" - } - } - } - } - }, - "definitions": { - "ApiBridgeProperties": { - "type": "object", - "properties": {}, - "description": "Details of API bridge functionality." - }, - "CommunicationsGateway": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/CommunicationsGatewayProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-mutability": [ - "read", - "create" - ], - "x-ms-client-flatten": true - } - }, - "description": "A CommunicationsGateway resource", - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" - } - ] - }, - "CommunicationsGatewayListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/CommunicationsGateway" - }, - "x-cadl-name": "CommunicationsGateway[]", - "description": "The CommunicationsGateway items on this page" - }, - "nextLink": { - "type": "string", - "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" - } - }, - "description": "The response of a CommunicationsGateway list operation.", - "required": [ - "value" - ] - }, - "CommunicationsGatewayProperties": { - "type": "object", - "properties": { - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "Resource provisioning state.", - "readOnly": true - }, - "status": { - "$ref": "#/definitions/Status", - "description": "The current status of the deployment.", - "readOnly": true - }, - "serviceLocations": { - "type": "array", - "items": { - "$ref": "#/definitions/ServiceRegionProperties" - }, - "x-ms-identifiers": [ - "name" - ], - "x-cadl-name": "ServiceRegionProperties[]", - "description": "The regions in which to deploy the resources needed for Teams Calling", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - }, - "connectivity": { - "$ref": "#/definitions/Connectivity", - "description": "How to connect back to the operator network, e.g. MAPS", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "codecs": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamsCodecs" - }, - "x-cadl-name": "TeamsCodecs[]", - "description": "Voice codecs to support", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - }, - "e911Type": { - "$ref": "#/definitions/E911Type", - "description": "How to handle 911 calls", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - }, - "platforms": { - "type": "array", - "items": { - "$ref": "#/definitions/CommunicationsPlatform" - }, - "x-cadl-name": "CommunicationsPlatform[]", - "description": "What platforms to support", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - }, - "apiBridge": { - "$ref": "#/definitions/ApiBridgeProperties", - "description": "Details of API bridge functionality, if required", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - } - }, - "description": "Details of the CommunicationsGateway resource.", - "required": [ - "serviceLocations", - "connectivity", - "codecs", - "e911Type", - "platforms" - ] - }, - "CommunicationsGatewayUpdate": { - "type": "object", - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-cadl-name": "Record", - "description": "Resource tags." - } - }, - "description": "The type used for update operations of the CommunicationsGateway." - }, - "CommunicationsPlatform": { - "type": "string", - "description": "Available platform types.", - "enum": [ - "OperatorConnect", - "TeamsPhoneMobile" - ], - "x-ms-enum": { - "name": "CommunicationsPlatform", - "modelAsString": true - } - }, - "Connectivity": { - "type": "string", - "description": "How this deployment connects back to the operator network", - "enum": [ - "PublicAddress" - ], - "x-ms-enum": { - "name": "Connectivity", - "modelAsString": true, - "values": [ - { - "name": "PublicAddress", - "value": "PublicAddress", - "description": "This deployment connects to the operator network using a Public IP address, e.g. when using MAPS" - } - ] - } - }, - "Contact": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/ContactProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-mutability": [ - "read", - "create" - ], - "x-ms-client-flatten": true - } - }, - "description": "A Contact resource", - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" - } - ] - }, - "ContactListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Contact" - }, - "x-cadl-name": "Contact[]", - "description": "The Contact items on this page" - }, - "nextLink": { - "type": "string", - "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" - } - }, - "description": "The response of a Contact list operation.", - "required": [ - "value" - ] - }, - "ContactProperties": { - "type": "object", - "properties": { - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "Resource provisioning state.", - "readOnly": true - }, - "contactName": { - "type": "string", - "description": "Full name of contact", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - }, - "phoneNumber": { - "type": "string", - "description": "Telephone number of contact", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - }, - "email": { - "type": "string", - "description": "Email address of contact", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - }, - "role": { - "type": "string", - "description": "Job title of contact", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - } - }, - "description": "Details of the Contact resource.", - "required": [ - "contactName", - "phoneNumber", - "email", - "role" - ] - }, - "ContactUpdate": { - "type": "object", - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-cadl-name": "Record", - "description": "Resource tags." - } - }, - "description": "The type used for update operations of the Contact." - }, - "E911Type": { - "type": "string", - "description": "The method for terminating emergency calls to the PSTN.", - "enum": [ - "Standard", - "DirectToEsrp" - ], - "x-ms-enum": { - "name": "E911Type", - "modelAsString": true, - "values": [ - { - "name": "Standard", - "value": "Standard", - "description": "Emergency calls are not handled different from other calls" - }, - { - "name": "DirectToEsrp", - "value": "DirectToEsrp", - "description": "Emergency calls are routed directly to the ESRP" - } - ] - } - }, - "PrimaryRegionProperties": { - "type": "object", - "properties": { - "operatorAddresses": { - "type": "array", - "items": { - "type": "string" - }, - "x-cadl-name": "string[]", - "description": "IP address to use to contact the operator network from this region", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - }, - "esrpAddresses": { - "type": "array", - "items": { - "type": "string" - }, - "x-cadl-name": "string[]", - "description": "IP address to use to contact the ESRP from this region", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - } - }, - "description": "The configuration used in this region as primary, and other regions as backup.", - "required": [ - "operatorAddresses" - ] - }, - "ProvisioningState": { - "type": "string", - "description": "Provisioning state of the resource.", - "enum": [ - "Succeeded", - "Failed", - "Canceled" - ], - "x-ms-enum": { - "name": "ProvisioningState", - "modelAsString": true - } - }, - "ServiceRegionProperties": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the region in which the resources needed for Teams Calling will be deployed.", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "primaryRegionProperties": { - "$ref": "#/definitions/PrimaryRegionProperties", - "description": "The configuration used in this region as primary, and other regions as backup.", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - } - }, - "description": "The service region configuration needed for Teams Callings.", - "required": [ - "name", - "primaryRegionProperties" - ] - }, - "Status": { - "type": "string", - "description": "The status of the current CommunicationsGateway resource.", - "enum": [ - "ChangePending", - "Complete" - ], - "x-ms-enum": { - "name": "Status", - "modelAsString": false, - "values": [ - { - "name": "ChangePending", - "value": "ChangePending", - "description": "The resource has been created or updated, but the CommunicationsGateway service has not yet been updated to reflect the changes." - }, - { - "name": "Complete", - "value": "Complete", - "description": "The CommunicationsGateway service is up and running with the parameters specified in the resource." - } - ] - } - }, - "TeamsCodecs": { - "type": "string", - "description": "The voice codecs expected for communication with Teams.", - "enum": [ - "PCMA", - "PCMU", - "G722", - "G722_2", - "SILK_8", - "SILK_16" - ], - "x-ms-enum": { - "name": "TeamsCodecs", - "modelAsString": true - } - }, - "TestLine": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/TestLineProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-mutability": [ - "read", - "create" - ], - "x-ms-client-flatten": true - } - }, - "description": "A TestLine resource", - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" - } - ] - }, - "TestLineListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/TestLine" - }, - "x-cadl-name": "TestLine[]", - "description": "The TestLine items on this page" - }, - "nextLink": { - "type": "string", - "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" - } - }, - "description": "The response of a TestLine list operation.", - "required": [ - "value" - ] - }, - "TestLineProperties": { - "type": "object", - "properties": { - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "Resource provisioning state.", - "readOnly": true - }, - "phoneNumber": { - "type": "string", - "description": "The phone number", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - }, - "purpose": { - "$ref": "#/definitions/TestLinePurpose", - "description": "Purpose of this test line, e.g. automated or manual testing", - "x-ms-mutability": [ - "read", - "update", - "create" - ] - } - }, - "description": "Details of the TestLine resource.", - "required": [ - "phoneNumber", - "purpose" - ] - }, - "TestLinePurpose": { - "type": "string", - "description": "The purpose of the TestLine resource.", - "enum": [ - "Manual", - "Automated" - ], - "x-ms-enum": { - "name": "TestLinePurpose", - "modelAsString": false - } - }, - "TestLineUpdate": { - "type": "object", - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-cadl-name": "Record", - "description": "Resource tags." - } - }, - "description": "The type used for update operations of the TestLine." - } - }, - "parameters": { - "CommunicationsGateway.communicationsGatewayName": { - "name": "communicationsGatewayName", - "in": "path", - "required": true, - "description": "Unique identifier for this deployment", - "pattern": "^[a-zA-Z0-9-]{3,24}$", - "type": "string", - "x-ms-parameter-location": "method" - }, - "Contact.contactName": { - "name": "contactName", - "in": "path", - "required": true, - "description": "Unique identifier for this contact", - "pattern": "^[a-zA-Z0-9-]{3,24}$", - "type": "string", - "x-ms-parameter-location": "method" - }, - "TestLine.testLineName": { - "name": "testLineName", - "in": "path", - "required": true, - "description": "Unique identifier for this test line", - "pattern": "^[a-zA-Z0-9-]{3,24}$", - "type": "string", - "x-ms-parameter-location": "method" - } - } -}