Skip to content
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

Using the latest version of autorest to generate code for 'Databricks' #14049

Merged
merged 3 commits into from
Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions src/CloudService/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Used the latest version of autorest to generate code
isra-fel marked this conversation as resolved.
Show resolved Hide resolved

## Version 0.1.0
* First preview release for module Az.CloudService
Expand Down
8 changes: 4 additions & 4 deletions src/Databricks/Az.Databricks.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 12/24/2020
# Generated on: 1/28/2021
#

@{
Expand All @@ -12,7 +12,7 @@
RootModule = './Az.Databricks.psm1'

# Version number of this module.
ModuleVersion = '1.0.2'
ModuleVersion = '0.2.0'

# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
Expand Down Expand Up @@ -45,7 +45,7 @@ PowerShellVersion = '5.1'
DotNetFrameworkVersion = '4.7.2'

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# CLRVersion = ''
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
Expand Down Expand Up @@ -110,7 +110,7 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* Fixed an issue that may cause ''New-AzDatabricksVNetPeering'' to return before it is fully provisioned (https://github.com/Azure/autorest.powershell/issues/610)'
# ReleaseNotes = ''

# Prerelease string of this module
# Prerelease = ''
Expand Down
10 changes: 5 additions & 5 deletions src/Databricks/Az.Databricks.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
}
}
if(-not $accountsModule) {
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.8.1' } | Measure-Object).Count -gt 0
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0
if($hasAdequateVersion) {
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.8.1 -Scope Global -PassThru
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru
}
}
}

if(-not $accountsModule) {
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
} elseif (($accountsModule.Version -lt [System.Version]'1.8.1') -and (-not $localAccounts)) {
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. 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
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
} elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. 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
}
Write-Information "Loaded Module '$($accountsModule.Name)'"

Expand Down
4 changes: 2 additions & 2 deletions src/Databricks/check-dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if(Test-Path -Path $localModulesPath) {
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
}

DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.8.1'
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3'
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'

$tools = Join-Path $PSScriptRoot 'tools'
Expand All @@ -56,7 +56,7 @@ $resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestS
if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
Write-Host -ForegroundColor Green "Building local Resource module used for test..."
Set-Location $resourceDir
$null = autorest-beta .\readme.md --output-folder=$HOME/.PSSharedModules/Resources
$null = autorest .\readme.md --use:@autorest/[email protected] --output-folder=$HOME/.PSSharedModules/Resources
$null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
Set-Location $HOME/.PSSharedModules/Resources
$null = .\build-module.ps1
Expand Down
6 changes: 6 additions & 0 deletions src/Databricks/custom/New-AzDatabricksWorkspace.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ function New-AzDatabricksWorkspace {
# The ID of the target subscription.
${SubscriptionId},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
[System.Management.Automation.SwitchParameter]
# The value which should be used for this field.
${EnableNoPublicIP},

[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
[System.String]
Expand Down
6 changes: 6 additions & 0 deletions src/Databricks/exports/New-AzDatabricksWorkspace.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ param(
# The geo-location where the resource lives
${Location},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
[System.Management.Automation.SwitchParameter]
# The value which should be used for this field.
${EnableNoPublicIP},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
[System.String]
Expand Down
6 changes: 6 additions & 0 deletions src/Databricks/exports/ProxyCmdletDefinitions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,12 @@ param(
# The geo-location where the resource lives
${Location},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
[System.Management.Automation.SwitchParameter]
# The value which should be used for this field.
${EnableNoPublicIP},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
[System.String]
Expand Down
10 changes: 5 additions & 5 deletions src/Databricks/generate-info.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"autorest_modelerfour": "4.15.414",
"node": "v14.2.0",
"autorest_powershell": "3.0.409",
"swagger_commit": "ce64d347346dfcb8d7a1378dc269494f3adf7d21",
"autorest_core": "3.0.6349",
"autorest": "3.0.6187"
"node": "v10.16.0",
"autorest_powershell": "3.0.417",
"autorest": "`-- (empty)",
"autorest_core": "3.0.6369",
"swagger_commit": "b3199b96ecc6d2e18216305385b13035e39df968"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ public partial class ErrorResponse :

/// <summary>A machine readable error code.</summary>
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Code = value; }
public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Code = value ; }

/// <summary>error details.</summary>
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
public Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Detail = value; }
public Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Detail = value ?? null /* arrayOf */; }

/// <summary>Backing field for <see cref="Error" /> property.</summary>
private Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfo _error;
Expand All @@ -25,11 +25,11 @@ public partial class ErrorResponse :

/// <summary>Inner error details if they exist.</summary>
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
public string Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Innererror = value; }
public string Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Innererror = value ?? null; }

/// <summary>A human readable error message.</summary>
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Message = value; }
public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Message = value ; }

/// <summary>Internal Acessors for Error</summary>
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfo Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.ErrorInfo()); set { {_error = value;} } }
Expand Down
6 changes: 3 additions & 3 deletions src/Databricks/generated/api/Models/Api20180401/Operation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ public partial class Operation :

/// <summary>Operation type: Read, write, delete, etc.</summary>
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Operation = value; }
public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Operation = value ?? null; }

/// <summary>Service provider: Microsoft.ResourceProvider</summary>
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Provider = value; }
public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Provider = value ?? null; }

/// <summary>Resource on which the operation is performed.</summary>
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Resource = value; }
public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Resource = value ?? null; }

/// <summary>Internal Acessors for Display</summary>
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.OperationDisplay()); set { {_display = value;} } }
Expand Down
Loading