exported/New-Image.ps1

function New-Image {
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')]
param(
    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a image')]
    [string]
    ${Name},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a image')]
    [string]
    ${Description},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a image')]
    [string]
    ${Architecture},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a image')]
    [string]
    ${ImageType},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a image')]
    [string]
    ${SourceUri},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a image')]
    [string]
    ${ChecksumAlgorithm},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a image')]
    [string]
    ${ChecksumValue},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a image')]
    [string]
    ${ProductName},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a image')]
    [string]
    ${ProductVersion},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a image')]
    [System.Collections.Generic.IDictionary[string,string]]
    ${Categories},

    [Parameter(ParameterSetName='Expanded', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')]
    [ValidateNotNull()]
    [Microsoft.Rest.ClientRuntime.SendAsyncStep[]]
    ${HttpPipelineAppend},

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

    [Parameter(ParameterSetName='Expanded', HelpMessage='The URI for the proxy server to use')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='The URI for the proxy server to use')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='The URI for the proxy server to use')]
    [uri]
    ${Proxy},

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

    [Parameter(ParameterSetName='Expanded', HelpMessage='Use the default credentials for the proxy')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='Use the default credentials for the proxy')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='Use the default credentials for the proxy')]
    [switch]
    ${ProxyUseDefaultCredentials},

    [Parameter(ParameterSetName='Expanded', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='The Username for authentication')]
    [string]
    ${Username},

    [Parameter(ParameterSetName='Expanded', HelpMessage='The Password for authentication')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='The Password for authentication')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='The Password for authentication')]
    [securestring]
    ${Password},

    [Parameter(ParameterSetName='Expanded', HelpMessage='Skip the ssl validation')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='Skip the ssl validation')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='Skip the ssl validation')]
    [switch]
    ${SkipSSL},

    [Parameter(ParameterSetName='Expanded', HelpMessage='A PSCredental with username and password')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='A PSCredental with username and password')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='A PSCredental with username and password')]
    [ValidateNotNull()]
    [Nutanix.Powershell.Models.NutanixCredential]
    ${Credential},

    [Parameter(ParameterSetName='Expanded', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='The Username for authentication')]
    [string]
    ${Server},

    [Parameter(ParameterSetName='Expanded', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='The Username for authentication')]
    [string]
    ${Port},

    [Parameter(ParameterSetName='Expanded', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='The Username for authentication')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='The Username for authentication')]
    [string]
    ${Protocol},

    [Parameter(ParameterSetName='Expanded', HelpMessage='Run the command asynchronous')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpec', HelpMessage='Run the command asynchronous')]
    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='Run the command asynchronous')]
    [switch]
    ${Async},

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

    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='A description for image.')]
    [string]
    ${ImageDescription},

    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='image Name.')]
    [string]
    ${ImageName},

    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='Describes the image spec resources object.')]
    [Nutanix.Powershell.Models.IImageResources]
    ${ImageResources},

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

    [Parameter(ParameterSetName='ImageApiVersionMetadataSpecExpanded', HelpMessage='Describes the image spec resources object.')]
    [Nutanix.Powershell.Models.IImage]
    ${Spec})

begin
{
  switch ($PsCmdlet.ParameterSetName) { 

  'ImageApiVersionMetadataSpec' {

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

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

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

}

  'ImageApiVersionMetadataSpecExpanded' {

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

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

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

}

  'Expanded' {

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

        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Nutanix.private\New-Image_Expanded', [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-Image_ImageApiVersionMetadataSpec', [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-Image_Expanded
.ForwardHelpCategory Cmdlet

#>


}