Skip to content

Commit a8ae44c

Browse files
authored
[PS] migrate HealthBot module to autorest v4 (Azure#27604)
1 parent 6ba36fe commit a8ae44c

File tree

17 files changed

+341
-75
lines changed

17 files changed

+341
-75
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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 - HealthBot")]
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)]

src/HealthBot/HealthBot.Autorest/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,9 @@ module-version: 0.1.0
3737
title: HealthBot
3838
service-name: HealthBot
3939
subject-prefix: $(service-name)
40-
identity-correction-for-post: true
41-
42-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
43-
use-extension:
44-
"@autorest/powershell": "3.x"
4540

4641
directive:
42+
# Set system data to read only
4743
- from: swagger-document
4844
where: $.definitions.SystemData.properties
4945
transform: >-
@@ -92,6 +88,9 @@ directive:
9288
set:
9389
parameter-name: Sku
9490
- where:
95-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
91+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
92+
remove: true
93+
- where:
94+
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
9695
remove: true
9796
```

src/HealthBot/HealthBot.Autorest/docs/Az.HealthBot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.HealthBot
3-
Module Guid: dc715b9e-d983-441e-be3d-b8c4c1403443
3+
Module Guid: c0515980-2dc4-45bc-b9c4-f1e1d8cc8738
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.healthbot
55
Help Version: 1.0.0.0
66
Locale: en-US
@@ -15,7 +15,7 @@ Microsoft Azure PowerShell: HealthBot cmdlets
1515
Get a HealthBot.
1616

1717
### [New-AzHealthBot](New-AzHealthBot.md)
18-
Create a new HealthBot.
18+
create a new HealthBot.
1919

2020
### [Remove-AzHealthBot](Remove-AzHealthBot.md)
2121
Delete a HealthBot.

src/HealthBot/HealthBot.Autorest/docs/Get-AzHealthBot.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ Accept wildcard characters: False
114114
115115
### -InputObject
116116
Identity Parameter
117-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
118117
119118
```yaml
120119
Type: Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity
@@ -182,7 +181,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
182181
183182
## OUTPUTS
184183
185-
### Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot
184+
### Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot
186185
187186
## NOTES
188187

src/HealthBot/HealthBot.Autorest/docs/New-AzHealthBot.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,31 @@ schema: 2.0.0
88
# New-AzHealthBot
99

1010
## SYNOPSIS
11-
Create a new HealthBot.
11+
create a new HealthBot.
1212

1313
## SYNTAX
1414

15+
### CreateExpanded (Default)
1516
```
16-
New-AzHealthBot -Name <String> -ResourceGroupName <String> -Location <String> -Sku <SkuName>
17+
New-AzHealthBot -Name <String> -ResourceGroupName <String> -Location <String> -Sku <String>
1718
[-SubscriptionId <String>] [-Tag <Hashtable>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm]
1819
[-WhatIf] [<CommonParameters>]
1920
```
2021

22+
### CreateViaJsonFilePath
23+
```
24+
New-AzHealthBot -Name <String> -ResourceGroupName <String> -JsonFilePath <String> [-SubscriptionId <String>]
25+
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
26+
```
27+
28+
### CreateViaJsonString
29+
```
30+
New-AzHealthBot -Name <String> -ResourceGroupName <String> -JsonString <String> [-SubscriptionId <String>]
31+
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
32+
```
33+
2134
## DESCRIPTION
22-
Create a new HealthBot.
35+
create a new HealthBot.
2336

2437
## EXAMPLES
2538

@@ -69,12 +82,42 @@ Accept pipeline input: False
6982
Accept wildcard characters: False
7083
```
7184
85+
### -JsonFilePath
86+
Path of Json file supplied to the Create operation
87+
88+
```yaml
89+
Type: System.String
90+
Parameter Sets: CreateViaJsonFilePath
91+
Aliases:
92+
93+
Required: True
94+
Position: Named
95+
Default value: None
96+
Accept pipeline input: False
97+
Accept wildcard characters: False
98+
```
99+
100+
### -JsonString
101+
Json string supplied to the Create operation
102+
103+
```yaml
104+
Type: System.String
105+
Parameter Sets: CreateViaJsonString
106+
Aliases:
107+
108+
Required: True
109+
Position: Named
110+
Default value: None
111+
Accept pipeline input: False
112+
Accept wildcard characters: False
113+
```
114+
72115
### -Location
73116
The geo-location where the resource lives
74117
75118
```yaml
76119
Type: System.String
77-
Parameter Sets: (All)
120+
Parameter Sets: CreateExpanded
78121
Aliases:
79122

80123
Required: True
@@ -133,8 +176,8 @@ Accept wildcard characters: False
133176
The name of the HealthBot SKU
134177
135178
```yaml
136-
Type: Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName
137-
Parameter Sets: (All)
179+
Type: System.String
180+
Parameter Sets: CreateExpanded
138181
Aliases:
139182

140183
Required: True
@@ -164,7 +207,7 @@ Resource tags.
164207
165208
```yaml
166209
Type: System.Collections.Hashtable
167-
Parameter Sets: (All)
210+
Parameter Sets: CreateExpanded
168211
Aliases:
169212

170213
Required: False
@@ -212,7 +255,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
212255
213256
## OUTPUTS
214257
215-
### Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot
258+
### Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot
216259
217260
## NOTES
218261

src/HealthBot/HealthBot.Autorest/docs/Remove-AzHealthBot.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ Accept wildcard characters: False
7979
8080
### -InputObject
8181
Identity Parameter
82-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
8382
8483
```yaml
8584
Type: Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity

src/HealthBot/HealthBot.Autorest/docs/Update-AzHealthBot.md

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,25 @@ Patch a HealthBot.
1414

1515
### UpdateExpanded (Default)
1616
```
17-
Update-AzHealthBot -Name <String> -ResourceGroupName <String> [-SubscriptionId <String>] [-Sku <SkuName>]
17+
Update-AzHealthBot -Name <String> -ResourceGroupName <String> [-SubscriptionId <String>] [-Sku <String>]
1818
[-Tag <Hashtable>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
1919
```
2020

2121
### UpdateViaIdentityExpanded
2222
```
23-
Update-AzHealthBot -InputObject <IHealthBotIdentity> [-Sku <SkuName>] [-Tag <Hashtable>]
23+
Update-AzHealthBot -InputObject <IHealthBotIdentity> [-Sku <String>] [-Tag <Hashtable>]
24+
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
25+
```
26+
27+
### UpdateViaJsonFilePath
28+
```
29+
Update-AzHealthBot -Name <String> -ResourceGroupName <String> -JsonFilePath <String>
30+
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
31+
```
32+
33+
### UpdateViaJsonString
34+
```
35+
Update-AzHealthBot -Name <String> -ResourceGroupName <String> -JsonString <String> [-SubscriptionId <String>]
2436
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
2537
```
2638

@@ -76,7 +88,6 @@ Accept wildcard characters: False
7688
7789
### -InputObject
7890
Identity Parameter
79-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
8091
8192
```yaml
8293
Type: Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBotIdentity
@@ -90,12 +101,42 @@ Accept pipeline input: True (ByValue)
90101
Accept wildcard characters: False
91102
```
92103
104+
### -JsonFilePath
105+
Path of Json file supplied to the Update operation
106+
107+
```yaml
108+
Type: System.String
109+
Parameter Sets: UpdateViaJsonFilePath
110+
Aliases:
111+
112+
Required: True
113+
Position: Named
114+
Default value: None
115+
Accept pipeline input: False
116+
Accept wildcard characters: False
117+
```
118+
119+
### -JsonString
120+
Json string supplied to the Update operation
121+
122+
```yaml
123+
Type: System.String
124+
Parameter Sets: UpdateViaJsonString
125+
Aliases:
126+
127+
Required: True
128+
Position: Named
129+
Default value: None
130+
Accept pipeline input: False
131+
Accept wildcard characters: False
132+
```
133+
93134
### -Name
94135
The name of the Bot resource.
95136
96137
```yaml
97138
Type: System.String
98-
Parameter Sets: UpdateExpanded
139+
Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString
99140
Aliases: BotName
100141

101142
Required: True
@@ -110,7 +151,7 @@ The name of the Bot resource group in the user subscription.
110151
111152
```yaml
112153
Type: System.String
113-
Parameter Sets: UpdateExpanded
154+
Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString
114155
Aliases:
115156

116157
Required: True
@@ -124,8 +165,8 @@ Accept wildcard characters: False
124165
The name of the HealthBot SKU
125166
126167
```yaml
127-
Type: Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Support.SkuName
128-
Parameter Sets: (All)
168+
Type: System.String
169+
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
129170
Aliases:
130171

131172
Required: False
@@ -140,7 +181,7 @@ Azure Subscription ID.
140181
141182
```yaml
142183
Type: System.String
143-
Parameter Sets: UpdateExpanded
184+
Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString
144185
Aliases:
145186

146187
Required: False
@@ -155,7 +196,7 @@ Tags for a HealthBot.
155196
156197
```yaml
157198
Type: System.Collections.Hashtable
158-
Parameter Sets: (All)
199+
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
159200
Aliases:
160201

161202
Required: False
@@ -205,7 +246,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
205246
206247
## OUTPUTS
207248
208-
### Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.Api20201208.IHealthBot
249+
### Microsoft.Azure.PowerShell.Cmdlets.HealthBot.Models.IHealthBot
209250
210251
## NOTES
211252
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"generate_Id": "7ec6008b-0bc9-4b6b-b9b9-43f5b0c804b2"
2+
"generate_Id": "972c94ec-5075-4922-b820-f403c356763c"
33
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Resources
2+
This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder.
3+
4+
## Info
5+
- Modifiable: yes
6+
- Generated: no
7+
- Committed: yes
8+
- Packaged: no
9+
10+
## Purpose
11+
Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact.

0 commit comments

Comments
 (0)