Skip to content

Commit 75413df

Browse files
authored
[Az.ConnectedNetwork] Update generation tool version: autorest.powershe… (Azure#27564)
1 parent 2b67d10 commit 75413df

File tree

93 files changed

+5010
-533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+5010
-533
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
// Unless required by applicable law or agreed to in writing, software
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
8+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
// See the License for the specific language governing permissions and
10+
// limitations under the License.
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
13+
14+
using System;
15+
using System.Reflection;
16+
using System.Runtime.CompilerServices;
17+
using System.Runtime.InteropServices;
18+
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ConnectedNetwork")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.2")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.2")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]
27+

src/ConnectedNetwork/ConnectedNetwork.Autorest/README.md

+17-15
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,13 @@ input-file:
4141
module-version: 0.1.0
4242
title: ConnectedNetwork
4343
subject-prefix: $(service-name)
44-
identity-correction-for-post: true
45-
resourcegroup-append: true
46-
nested-object-to-string: true
47-
48-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
49-
use-extension:
50-
"@autorest/powershell": "3.x"
5144

5245
directive:
5346
- where:
54-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
47+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
48+
remove: true
49+
- where:
50+
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
5551
remove: true
5652
- where:
5753
verb: Set
@@ -137,11 +133,17 @@ directive:
137133
- no-inline:
138134
- Device
139135
# The generated cmdlet need to Re-Name
140-
# - model-cmdlet:
141-
# - AzureStackEdgeFormat
142-
# - NetworkInterface
143-
# - NetworkInterfaceIPConfiguration
144-
# - NetworkFunctionUserConfiguration
145-
# - NetworkFunctionVendorConfiguration
146-
# - NetworkFunctionRoleConfiguration
136+
- model-cmdlet:
137+
- model-name: AzureStackEdgeFormat
138+
cmdlet-name: New-AzConnectedNetworkAzureStackEdgeObject
139+
- model-name: NetworkInterface
140+
cmdlet-name: New-AzConnectedNetworkInterfaceObject
141+
- model-name: NetworkInterfaceIPConfiguration
142+
cmdlet-name: New-AzConnectedNetworkInterfaceIPConfigurationObject
143+
- model-name: NetworkFunctionUserConfiguration
144+
cmdlet-name: New-AzConnectedNetworkFunctionUserConfigurationObject
145+
- model-name: NetworkFunctionVendorConfiguration
146+
cmdlet-name: New-AzConnectedNetworkFunctionVendorConfigurationObject
147+
- model-name: NetworkFunctionRoleConfiguration
148+
cmdlet-name: New-AzConnectedNetworkFunctionRoleConfigurationObject
147149
```

src/ConnectedNetwork/ConnectedNetwork.Autorest/custom/New-AzConnectedNetworkAzureStackEdgeObject.ps1 renamed to src/ConnectedNetwork/ConnectedNetwork.Autorest/custom/autogen-model-cmdlets/New-AzConnectedNetworkAzureStackEdgeObject.ps1

+10-8
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@
1616

1717
<#
1818
.Synopsis
19-
Create a in-memory object for AzureStackEdgeFormat
19+
Create an in-memory object for AzureStackEdgeFormat.
2020
.Description
21-
Create a in-memory object for AzureStackEdgeFormat
21+
Create an in-memory object for AzureStackEdgeFormat.
2222
2323
.Outputs
24-
Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.AzureStackEdgeFormat
24+
Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.AzureStackEdgeFormat
2525
.Link
26-
https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkAzureStackEdgeObject
26+
https://learn.microsoft.com/powershell/module/Az.ConnectedNetwork/new-azconnectednetworkazurestackedgeobject
2727
#>
2828
function New-AzConnectedNetworkAzureStackEdgeObject {
29-
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.AzureStackEdgeFormat')]
29+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ModelCmdletAttribute()]
30+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.AzureStackEdgeFormat')]
3031
[CmdletBinding(PositionalBinding=$false)]
3132
Param(
3233

@@ -36,10 +37,11 @@ function New-AzConnectedNetworkAzureStackEdgeObject {
3637
)
3738

3839
process {
39-
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.AzureStackEdgeFormat]::New()
40+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.AzureStackEdgeFormat]::New()
4041

41-
$Object.AzureStackEdgeId = $AzureStackEdgeId
42-
$Object.DeviceType = "AzureStackEdge"
42+
if ($PSBoundParameters.ContainsKey('AzureStackEdgeId')) {
43+
$Object.AzureStackEdgeId = $AzureStackEdgeId
44+
}
4345
return $Object
4446
}
4547
}

src/ConnectedNetwork/ConnectedNetwork.Autorest/custom/New-AzConnectedNetworkFunctionRoleConfigurationObject.ps1 renamed to src/ConnectedNetwork/ConnectedNetwork.Autorest/custom/autogen-model-cmdlets/New-AzConnectedNetworkFunctionRoleConfigurationObject.ps1

+81-35
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@
1616

1717
<#
1818
.Synopsis
19-
Create a in-memory object for NetworkFunctionRoleConfiguration
19+
Create an in-memory object for NetworkFunctionRoleConfiguration.
2020
.Description
21-
Create a in-memory object for NetworkFunctionRoleConfiguration
21+
Create an in-memory object for NetworkFunctionRoleConfiguration.
2222
2323
.Outputs
24-
Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionRoleConfiguration
24+
Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.NetworkFunctionRoleConfiguration
2525
.Link
26-
https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkFunctionRoleConfigurationObject
26+
https://learn.microsoft.com/powershell/module/Az.ConnectedNetwork/new-azconnectednetworkfunctionroleconfigurationobject
2727
#>
2828
function New-AzConnectedNetworkFunctionRoleConfigurationObject {
29-
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionRoleConfiguration')]
29+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ModelCmdletAttribute()]
30+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.NetworkFunctionRoleConfiguration')]
3031
[CmdletBinding(PositionalBinding=$false)]
3132
Param(
3233

@@ -49,21 +50,22 @@ function New-AzConnectedNetworkFunctionRoleConfigurationObject {
4950
[string]
5051
$ImageReferenceVersion,
5152
[Parameter(HelpMessage="The network interface configurations.")]
52-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkInterface[]]
53+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.INetworkInterface[]]
5354
$NetworkInterface,
5455
[Parameter(HelpMessage="The VHD name.")]
5556
[string]
5657
$OSDiskName,
5758
[Parameter(HelpMessage="The OS type.")]
58-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperatingSystemTypes]
59+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PSArgumentCompleterAttribute("Unknown", "Windows", "Linux")]
60+
[string]
5961
$OSDiskOstype,
6062
[Parameter(HelpMessage="Specifies the size of os disk in gigabytes. This is the fully expanded disk size needed of the VHD image on the ASE. This disk size should be greater than the size of the VHD provided in vhdUri.")]
6163
[int]
6264
$OSDiskSizeGb,
63-
[Parameter(HelpMessage="Specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in `".`" <br><br> **Disallowed values:** `"administrator`", `"admin`", `"user`", `"user1`", `"test`", `"user2`", `"test1`", `"user3`", `"admin1`", `"1`", `"123`", `"a`", `"actuser`", `"adm`", `"admin2`", `"aspnet`", `"backup`", `"console`", `"david`", `"guest`", `"john`", `"owner`", `"root`", `"server`", `"sql`", `"support`", `"support_388945a0`", `"sys`", `"test2`", `"test3`", `"user4`", `"user5`". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).")]
65+
[Parameter(HelpMessage="Specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in `".`" <br><br> **Disallowed values:** `"administrator`", `"admin`", `"user`", `"user1`", `"test`", `"user2`", `"test1`", `"user3`", `"admin1`", `"1`", `"123`", `"a`", `"actuser`", `"adm`", `"admin2`", `"aspnet`", `"backup`", `"console`", `"david`", `"guest`", `"john`", `"owner`", `"root`", `"server`", `"sql`", `"support`", `"support_388945a0`", `"sys`", `"test2`", `"test3`", `"user4`", `"user5`". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).")]
6466
[string]
6567
$OSProfileAdminUsername,
66-
[Parameter(HelpMessage="Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. <br><br> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).")]
68+
[Parameter(HelpMessage="Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. <br><br> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).")]
6769
[string]
6870
$OSProfileCustomData,
6971
[Parameter(HelpMessage="Indicates if custom data is required to deploy this role.")]
@@ -73,13 +75,14 @@ function New-AzConnectedNetworkFunctionRoleConfigurationObject {
7375
[string]
7476
$RoleName,
7577
[Parameter(HelpMessage="Role type.")]
76-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionRoleConfigurationType]
78+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PSArgumentCompleterAttribute("Unknown", "VirtualMachine")]
79+
[string]
7780
$RoleType,
7881
[Parameter(HelpMessage="The list of SSH public keys used to authenticate with linux based VMs.")]
79-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ISshPublicKey[]]
82+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.ISshPublicKey[]]
8083
$SshPublicKey,
8184
[Parameter(HelpMessage="Specifies the parameters that are used to add a data disk to a virtual machine.")]
82-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDataDisk[]]
85+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IDataDisk[]]
8386
$StorageProfileDataDisk,
8487
[Parameter(HelpMessage="The user parameters for customers. The format of user data parameters has to be matched with the provided user data template.")]
8588
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IAny]
@@ -91,34 +94,77 @@ function New-AzConnectedNetworkFunctionRoleConfigurationObject {
9194
[string]
9295
$VhdUri,
9396
[Parameter(HelpMessage="The size of the virtual machine.")]
94-
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VirtualMachineSizeTypes]
97+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PSArgumentCompleterAttribute("Unknown", "Standard_D1_v2", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_DS1_v2", "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_F1", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_F1s", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s")]
98+
[string]
9599
$VirtualMachineSize
96100
)
97101

98102
process {
99-
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionRoleConfiguration]::New()
103+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.NetworkFunctionRoleConfiguration]::New()
100104

101-
$Object.CustomProfileMetadataConfigurationPath = $CustomProfileMetadataConfigurationPath
102-
$Object.ImageReferenceExactVersion = $ImageReferenceExactVersion
103-
$Object.ImageReferenceOffer = $ImageReferenceOffer
104-
$Object.ImageReferencePublisher = $ImageReferencePublisher
105-
$Object.ImageReferenceSku = $ImageReferenceSku
106-
$Object.ImageReferenceVersion = $ImageReferenceVersion
107-
$Object.NetworkInterface = $NetworkInterface
108-
$Object.OSDiskName = $OSDiskName
109-
$Object.OSDiskOstype = $OSDiskOstype
110-
$Object.OSDiskSizeGb = $OSDiskSizeGb
111-
$Object.OSProfileAdminUsername = $OSProfileAdminUsername
112-
$Object.OSProfileCustomData = $OSProfileCustomData
113-
$Object.OSProfileCustomDataRequired = $OSProfileCustomDataRequired
114-
$Object.RoleName = $RoleName
115-
$Object.RoleType = $RoleType
116-
$Object.SshPublicKey = $SshPublicKey
117-
$Object.StorageProfileDataDisk = $StorageProfileDataDisk
118-
$Object.UserDataParameter = $UserDataParameter
119-
$Object.UserDataTemplate = $UserDataTemplate
120-
$Object.VhdUri = $VhdUri
121-
$Object.VirtualMachineSize = $VirtualMachineSize
105+
if ($PSBoundParameters.ContainsKey('CustomProfileMetadataConfigurationPath')) {
106+
$Object.CustomProfileMetadataConfigurationPath = $CustomProfileMetadataConfigurationPath
107+
}
108+
if ($PSBoundParameters.ContainsKey('ImageReferenceExactVersion')) {
109+
$Object.ImageReferenceExactVersion = $ImageReferenceExactVersion
110+
}
111+
if ($PSBoundParameters.ContainsKey('ImageReferenceOffer')) {
112+
$Object.ImageReferenceOffer = $ImageReferenceOffer
113+
}
114+
if ($PSBoundParameters.ContainsKey('ImageReferencePublisher')) {
115+
$Object.ImageReferencePublisher = $ImageReferencePublisher
116+
}
117+
if ($PSBoundParameters.ContainsKey('ImageReferenceSku')) {
118+
$Object.ImageReferenceSku = $ImageReferenceSku
119+
}
120+
if ($PSBoundParameters.ContainsKey('ImageReferenceVersion')) {
121+
$Object.ImageReferenceVersion = $ImageReferenceVersion
122+
}
123+
if ($PSBoundParameters.ContainsKey('NetworkInterface')) {
124+
$Object.NetworkInterface = $NetworkInterface
125+
}
126+
if ($PSBoundParameters.ContainsKey('OSDiskName')) {
127+
$Object.OSDiskName = $OSDiskName
128+
}
129+
if ($PSBoundParameters.ContainsKey('OSDiskOstype')) {
130+
$Object.OSDiskOstype = $OSDiskOstype
131+
}
132+
if ($PSBoundParameters.ContainsKey('OSDiskSizeGb')) {
133+
$Object.OSDiskSizeGb = $OSDiskSizeGb
134+
}
135+
if ($PSBoundParameters.ContainsKey('OSProfileAdminUsername')) {
136+
$Object.OSProfileAdminUsername = $OSProfileAdminUsername
137+
}
138+
if ($PSBoundParameters.ContainsKey('OSProfileCustomData')) {
139+
$Object.OSProfileCustomData = $OSProfileCustomData
140+
}
141+
if ($PSBoundParameters.ContainsKey('OSProfileCustomDataRequired')) {
142+
$Object.OSProfileCustomDataRequired = $OSProfileCustomDataRequired
143+
}
144+
if ($PSBoundParameters.ContainsKey('RoleName')) {
145+
$Object.RoleName = $RoleName
146+
}
147+
if ($PSBoundParameters.ContainsKey('RoleType')) {
148+
$Object.RoleType = $RoleType
149+
}
150+
if ($PSBoundParameters.ContainsKey('SshPublicKey')) {
151+
$Object.SshPublicKey = $SshPublicKey
152+
}
153+
if ($PSBoundParameters.ContainsKey('StorageProfileDataDisk')) {
154+
$Object.StorageProfileDataDisk = $StorageProfileDataDisk
155+
}
156+
if ($PSBoundParameters.ContainsKey('UserDataParameter')) {
157+
$Object.UserDataParameter = $UserDataParameter
158+
}
159+
if ($PSBoundParameters.ContainsKey('UserDataTemplate')) {
160+
$Object.UserDataTemplate = $UserDataTemplate
161+
}
162+
if ($PSBoundParameters.ContainsKey('VhdUri')) {
163+
$Object.VhdUri = $VhdUri
164+
}
165+
if ($PSBoundParameters.ContainsKey('VirtualMachineSize')) {
166+
$Object.VirtualMachineSize = $VirtualMachineSize
167+
}
122168
return $Object
123169
}
124170
}

0 commit comments

Comments
 (0)