Skip to content

Commit 2448d5d

Browse files
[skip ci] Archive 536b95f (#27502)
1 parent 7b9a398 commit 2448d5d

File tree

203 files changed

+10407
-4505
lines changed

Some content is hidden

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

203 files changed

+10407
-4505
lines changed

generated/Quantum/Quantum.Autorest/Az.Quantum.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<PsModuleName>Quantum</PsModuleName>
44
<PsRootModuleName>Quantum</PsRootModuleName>
5+
<PsModuleFolder>Quantum.Autorest</PsModuleFolder>
56
</PropertyGroup>
67

78
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.autorest.props" />
89
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
9-
1010
</Project>

generated/Quantum/Quantum.Autorest/Az.Quantum.format.ps1xml

+216-234
Large diffs are not rendered by default.

generated/Quantum/Quantum.Autorest/Az.Quantum.psd1

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Quantum.private.dll'
1313
FormatsToProcess = './Az.Quantum.format.ps1xml'
14-
FunctionsToExport = 'Get-AzQuantumOffering', 'Get-AzQuantumWorkspace', 'New-AzQuantumProviderObject', 'New-AzQuantumWorkspace', 'Remove-AzQuantumWorkspace', 'Test-AzQuantumWorkspaceNameAvailability', 'Update-AzQuantumWorkspace', '*'
15-
AliasesToExport = '*'
14+
FunctionsToExport = 'Get-AzQuantumOffering', 'Get-AzQuantumWorkspace', 'New-AzQuantumProviderObject', 'New-AzQuantumWorkspace', 'Remove-AzQuantumWorkspace', 'Test-AzQuantumWorkspaceNameAvailability', 'Update-AzQuantumWorkspace'
1615
PrivateData = @{
1716
PSData = @{
1817
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Quantum'
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
4-
// Licensed under the Apache License, Version 2.0 (the "License");
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
53
// you may not use this file except in compliance with the License.
64
// You may obtain a copy of the License at
75
// http://www.apache.org/licenses/LICENSE-2.0
86
// Unless required by applicable law or agreed to in writing, software
9-
// distributed under the License is distributed on an "AS IS" BASIS,
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
108
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119
// See the License for the specific language governing permissions and
1210
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
1413

1514
using System;
1615
using System.Reflection;
16+
using System.Runtime.CompilerServices;
1717
using System.Runtime.InteropServices;
1818

19-
[assembly: AssemblyTitle("Microsoft Azure Powershell - Quantum")]
20-
[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
21-
[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
22-
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
23-
24-
[assembly: ComVisible(false)]
25-
[assembly: CLSCompliant(false)]
26-
[assembly: Guid("57495595-b1e3-49ea-8701-1ab48c212571")]
27-
[assembly: AssemblyVersion("0.1.2")]
28-
[assembly: AssemblyFileVersion("0.1.2")]
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 - Quantum")]
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)]

generated/Quantum/Quantum.Autorest/check-dependencies.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
15+
param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
1616
$ErrorActionPreference = 'Stop'
1717

18-
if(-not $Isolated) {
18+
if(-not $NotIsolated) {
1919
Write-Host -ForegroundColor Green 'Creating isolated process...'
2020
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
21-
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
21+
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
2222
return
2323
}
2424

generated/Quantum/Quantum.Autorest/exports/Get-AzQuantumOffering.ps1

+15-5
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Returns the list of all provider offerings available for the given location.
2323
Get-AzQuantumOffering -LocationName eastus
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.IProviderDescription
26+
Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IProviderDescription
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.quantum/get-azquantumoffering
2929
#>
3030
function Get-AzQuantumOffering {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.IProviderDescription])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IProviderDescription])]
3232
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
3333
param(
3434
[Parameter(Mandatory)]
@@ -100,6 +100,15 @@ begin {
100100
$PSBoundParameters['OutBuffer'] = 1
101101
}
102102
$parameterSet = $PSCmdlet.ParameterSetName
103+
104+
$testPlayback = $false
105+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Quantum.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
106+
107+
$context = Get-AzContext
108+
if (-not $context -and -not $testPlayback) {
109+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
110+
exit
111+
}
103112

104113
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
105114
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -121,9 +130,7 @@ begin {
121130
$mapping = @{
122131
List = 'Az.Quantum.private\Get-AzQuantumOffering_List';
123132
}
124-
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
125-
$testPlayback = $false
126-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Quantum.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
133+
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
127134
if ($testPlayback) {
128135
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
129136
} else {
@@ -137,6 +144,9 @@ begin {
137144
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
138145
}
139146
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
147+
if ($wrappedCmd -eq $null) {
148+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
149+
}
140150
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
141151
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
142152
$steppablePipeline.Begin($PSCmdlet)

generated/Quantum/Quantum.Autorest/exports/Get-AzQuantumWorkspace.ps1

+15-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Get-AzQuantumWorkspace -ResourceGroupName azps_test_group_quantum -Name azps-qw
2929
.Inputs
3030
Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IQuantumIdentity
3131
.Outputs
32-
Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.IQuantumWorkspace
32+
Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IQuantumWorkspace
3333
.Notes
3434
COMPLEX PARAMETER PROPERTIES
3535
@@ -45,7 +45,7 @@ INPUTOBJECT <IQuantumIdentity>: Identity Parameter
4545
https://learn.microsoft.com/powershell/module/az.quantum/get-azquantumworkspace
4646
#>
4747
function Get-AzQuantumWorkspace {
48-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.IQuantumWorkspace])]
48+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IQuantumWorkspace])]
4949
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
5050
param(
5151
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -75,7 +75,6 @@ param(
7575
[Microsoft.Azure.PowerShell.Cmdlets.Quantum.Category('Path')]
7676
[Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.IQuantumIdentity]
7777
# Identity Parameter
78-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7978
${InputObject},
8079

8180
[Parameter()]
@@ -134,6 +133,15 @@ begin {
134133
$PSBoundParameters['OutBuffer'] = 1
135134
}
136135
$parameterSet = $PSCmdlet.ParameterSetName
136+
137+
$testPlayback = $false
138+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Quantum.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
139+
140+
$context = Get-AzContext
141+
if (-not $context -and -not $testPlayback) {
142+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
143+
exit
144+
}
137145

138146
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
139147
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -158,9 +166,7 @@ begin {
158166
List = 'Az.Quantum.private\Get-AzQuantumWorkspace_List';
159167
List1 = 'Az.Quantum.private\Get-AzQuantumWorkspace_List1';
160168
}
161-
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
162-
$testPlayback = $false
163-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Quantum.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
169+
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
164170
if ($testPlayback) {
165171
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
166172
} else {
@@ -174,6 +180,9 @@ begin {
174180
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
175181
}
176182
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
183+
if ($wrappedCmd -eq $null) {
184+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
185+
}
177186
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
178187
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
179188
$steppablePipeline.Begin($PSCmdlet)

generated/Quantum/Quantum.Autorest/exports/New-AzQuantumProviderObject.ps1

+10-4
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Create an in-memory object for Provider.
2323
New-AzQuantumProviderObject -Id "ionq" -Sku "pay-as-you-go-cred"
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.Provider
26+
Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Provider
2727
.Link
2828
https://learn.microsoft.com/powershell/module/Az.Quantum/new-AzQuantumProviderObject
2929
#>
3030
function New-AzQuantumProviderObject {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Api20220110Preview.Provider])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Quantum.Models.Provider])]
3232
[CmdletBinding(PositionalBinding=$false)]
3333
param(
3434
[Parameter()]
@@ -50,9 +50,9 @@ param(
5050
${InstanceUri},
5151

5252
[Parameter()]
53-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Quantum.Support.Status])]
53+
[Microsoft.Azure.PowerShell.Cmdlets.Quantum.PSArgumentCompleterAttribute("Succeeded", "Launching", "Updating", "Deleting", "Deleted", "Failed")]
5454
[Microsoft.Azure.PowerShell.Cmdlets.Quantum.Category('Body')]
55-
[Microsoft.Azure.PowerShell.Cmdlets.Quantum.Support.Status]
55+
[System.String]
5656
# Provisioning status field.
5757
${ProvisioningState},
5858

@@ -76,6 +76,9 @@ begin {
7676
$PSBoundParameters['OutBuffer'] = 1
7777
}
7878
$parameterSet = $PSCmdlet.ParameterSetName
79+
80+
$testPlayback = $false
81+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Quantum.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
7982

8083
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
8184
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -104,6 +107,9 @@ begin {
104107
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
105108
}
106109
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
110+
if ($wrappedCmd -eq $null) {
111+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
112+
}
107113
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
108114
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
109115
$steppablePipeline.Begin($PSCmdlet)

0 commit comments

Comments
 (0)