exported/New-Vm.ps1

function New-Vm {
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')]
param(
    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')]
    [ValidateNotNull()]
    [Microsoft.Rest.ClientRuntime.SendAsyncStep[]]
    ${HttpPipelineAppend},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='SendAsync Pipeline Steps to be prepended to the front of the pipeline')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='SendAsync Pipeline Steps to be prepended to the front of the pipeline')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='SendAsync Pipeline Steps to be prepended to the front of the pipeline')]
    [ValidateNotNull()]
    [Microsoft.Rest.ClientRuntime.SendAsyncStep[]]
    ${HttpPipelinePrepend},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The disk size')]
    [int]
    ${DiskSizeMib},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='Number of sockets')]
    [int]
    ${NumSockets},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='Number of VCPUS per socket')]
    [int]
    ${NumVcpusPerSocket},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The memory size of the VM')]
    [int]
    ${MemorySizeMib},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='Power state of the VM')]
    [string]
    ${PowerState},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The cluster UUID where the VM will be hosted')]
    [string]
    ${ClusterReferenceUuid},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The Name of the vm')]
    [string]
    ${Name},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The description of the vm')]
    [string]
    ${Description},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The URI for the proxy server to use')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='The URI for the proxy server to use')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='The URI for the proxy server to use')]
    [uri]
    ${Proxy},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='Credentials for a proxy server to use for the remote call')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='Credentials for a proxy server to use for the remote call')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='Credentials for a proxy server to use for the remote call')]
    [ValidateNotNull()]
    [pscredential]
    ${ProxyCredential},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='Use the default credentials for the proxy')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='Use the default credentials for the proxy')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='Use the default credentials for the proxy')]
    [switch]
    ${ProxyUseDefaultCredentials},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='The Username for authentication')]
    [string]
    ${Username},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The Password for authentication')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='The Password for authentication')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='The Password for authentication')]
    [securestring]
    ${Password},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='Skip the ssl validation')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='Skip the ssl validation')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='Skip the ssl validation')]
    [switch]
    ${SkipSSL},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='Skip the ssl validation')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='The Nutanix Credential object for authentication')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='Create a vm ')]
    [ValidateNotNull()]
    [Nutanix.Powershell.Models.NutanixCredential]
    ${Credential},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='Server address')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='The Username for authentication')]
    [string]
    ${Server},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='Server Port, defaults to 9440')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='The Username for authentication')]
    [string]
    ${Port},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='The HTTP protocol, defaults to https')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='The Username for authentication')]
    [string]
    ${Protocol},

    [Parameter(ParameterSetName='AttributesExpanded', HelpMessage='Run the command asynchronous')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', HelpMessage='Run the command asynchronous')]
    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='Run the command asynchronous')]
    [switch]
    ${Async},

    [Parameter(ParameterSetName='VmApiVersionMetadataSpec', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a vm')]
    [Nutanix.Powershell.Models.IVmIntentInput]
    ${Body},

    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', HelpMessage='Describes the image metadata object.')]
    [Nutanix.Powershell.Models.IVmMetadata]
    ${Metadata},

    [Parameter(ParameterSetName='VmApiVersionMetadataSpecExpanded', Mandatory=$true, HelpMessage='An intentful representation of a vm spec')]
    [Nutanix.Powershell.Models.IVm]
    ${Spec})

begin
{
  switch ($PsCmdlet.ParameterSetName) { 

  'VmApiVersionMetadataSpec' {

    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))
        {
            $PSBoundParameters['OutBuffer'] = 1
        }

        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Nutanix.private\New-Vm_VmApiVersionMetadataSpec', [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters }

        $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }

}

  'AttributesExpanded' {

    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))
        {
            $PSBoundParameters['OutBuffer'] = 1
        }

        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Nutanix.private\New-Vm_AttributesExpanded', [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters }

        $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }

}

  'VmApiVersionMetadataSpecExpanded' {

    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))
        {
            $PSBoundParameters['OutBuffer'] = 1
        }

        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Nutanix.private\New-Vm_VmApiVersionMetadataSpecExpanded', [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters }

        $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }

}

  default {

    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))
        {
            $PSBoundParameters['OutBuffer'] = 1
        }

        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Nutanix.private\New-Vm_VmApiVersionMetadataSpec', [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters }

        $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }

}

}
}

process
{
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end
{
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
<#

.ForwardHelpTargetName Nutanix.private\New-Vm_AttributesExpanded
.ForwardHelpCategory Cmdlet

#>


}