Skip to content

[PS] migrate VoiceServices module to autorest v4 #27463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - MicrosoftVoiceServices")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.3")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.3")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
15 changes: 7 additions & 8 deletions src/VoiceServices/VoiceServices.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ try-require:
subject-prefix: $(service-name)

inlining-threshold: 100
resourcegroup-append: true
nested-object-to-string: true

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
- from: swagger-document
Expand Down Expand Up @@ -91,7 +85,11 @@ directive:

- where:
subject: ^CommunicationsGateway$|^CommunicationsContact$|^CommunicationsTestLine$
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
subject: ^CommunicationsGateway$|^CommunicationsContact$|^CommunicationsTestLine$
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
remove: true

- where:
Expand All @@ -105,5 +103,6 @@ directive:
set:
parameter-name: FullContactName
# - model-cmdlet:
# - ServiceRegionProperties
# - model-name: ServiceRegionProperties
# cmdlet-name: New-AzVoiceServicesCommunicationsGatewayServiceRegionObject
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ Create an in-memory object for ServiceRegionProperties.
Create an in-memory object for ServiceRegionProperties.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties
Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.ServiceRegionProperties
.Link
https://learn.microsoft.com/powershell/module/az.VoiceServices/new-AzVoiceServicesCommunicationsGatewayServiceRegionObject
#>
function New-AzVoiceServicesCommunicationsGatewayServiceRegionObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties')]
[Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.ServiceRegionProperties')]
[CmdletBinding(PositionalBinding=$false)]
Param(

Expand All @@ -42,7 +43,7 @@ function New-AzVoiceServicesCommunicationsGatewayServiceRegionObject {
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ServiceRegionProperties]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.ServiceRegionProperties]::New()

if ($PSBoundParameters.ContainsKey('Name')) {
$Object.Name = $Name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.VoiceServices
Module Guid: 2104c31d-8a79-4ea7-9485-2fe25d5c97be
Module Guid: 8635872c-2777-4eac-8a7b-6c2b66691ee8
Download Help Link: https://learn.microsoft.com/powershell/module/az.voiceservices
Help Version: 1.0.0.0
Locale: en-US
Expand All @@ -18,13 +18,13 @@ Get a CommunicationsGateway
Get a TestLine

### [New-AzVoiceServicesCommunicationsGateway](New-AzVoiceServicesCommunicationsGateway.md)
Create a CommunicationsGateway
create a CommunicationsGateway

### [New-AzVoiceServicesCommunicationsGatewayServiceRegionObject](New-AzVoiceServicesCommunicationsGatewayServiceRegionObject.md)
Create an in-memory object for ServiceRegionProperties.

### [New-AzVoiceServicesCommunicationsTestLine](New-AzVoiceServicesCommunicationsTestLine.md)
Create a TestLine
create a TestLine

### [Remove-AzVoiceServicesCommunicationsGateway](Remove-AzVoiceServicesCommunicationsGateway.md)
Delete a CommunicationsGateway
Expand All @@ -36,8 +36,8 @@ Delete a TestLine
Check whether the resource name is available in the given region.

### [Update-AzVoiceServicesCommunicationsGateway](Update-AzVoiceServicesCommunicationsGateway.md)
Update a CommunicationsGateway
update a CommunicationsGateway

### [Update-AzVoiceServicesCommunicationsTestLine](Update-AzVoiceServicesCommunicationsTestLine.md)
Update a TestLine
update a TestLine

Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ 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
Expand Down Expand Up @@ -188,7 +187,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ICommunicationsGateway
### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.ICommunicationsGateway

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Get-AzVoiceServicesCommunicationsTestLine -InputObject <IVoiceServicesIdentity>
[<CommonParameters>]
```

### GetViaIdentityCommunicationsGateway
```
Get-AzVoiceServicesCommunicationsTestLine -CommunicationsGatewayInputObject <IVoiceServicesIdentity>
-Name <String> [-DefaultProfile <PSObject>] [<CommonParameters>]
```

## DESCRIPTION
Get a TestLine

Expand Down Expand Up @@ -76,6 +82,21 @@ Get a testline by pipeline.

## PARAMETERS

### -CommunicationsGatewayInputObject
Identity Parameter

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.IVoiceServicesIdentity
Parameter Sets: GetViaIdentityCommunicationsGateway
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -CommunicationsGatewayName
Unique identifier for this deployment

Expand Down Expand Up @@ -109,7 +130,6 @@ 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
Expand All @@ -128,7 +148,7 @@ Unique identifier for this test line

```yaml
Type: System.String
Parameter Sets: Get
Parameter Sets: Get, GetViaIdentityCommunicationsGateway
Aliases: TestLineName

Required: True
Expand Down Expand Up @@ -178,7 +198,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.Api20230131.ITestLine
### Microsoft.Azure.PowerShell.Cmdlets.VoiceServices.Models.ITestLine

## NOTES

Expand Down
Loading