exported/New-SecurityRule.ps1

function New-SecurityRule {
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')]
param(
    [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a network_security_rule')]
    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpec', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a network_security_rule')]
    [Nutanix.Powershell.Models.INetworkSecurityRuleIntentInput]
    ${Body},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Categories for the Network Security Rule')]
    [System.Collections.Generic.IDictionary[string,string]]
    ${Categories},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Owner Reference Name')]
    [string]
    ${OwnerReferenceName},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Owner Reference UUID')]
    [string]
    ${OwnerReferenceUuid},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Project Reference Name')]
    [string]
    ${ProjectReferenceName},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Project Reference Uuid')]
    [string]
    ${ProjectReferenceUuid},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Project Reference Uuid')]
    [string]
    ${Description},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Project Reference Uuid')]
    [string]
    ${Name},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Project Reference Uuid')]
    [string]
    ${Action},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Project Reference Uuid')]
    [Nutanix.Powershell.Models.INetworkRule[]]
    ${InboundAllowList},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Project Reference Uuid')]
    [Nutanix.Powershell.Models.INetworkRule[]]
    ${OutboundAllowList},

    [Parameter(ParameterSetName='Expanded', Mandatory=$true, HelpMessage='Project Reference Uuid')]
    [Nutanix.Powershell.Models.ITargetGroup]
    ${TargetGroup},

    [Parameter(ParameterSetName='Expanded', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')]
    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpec', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')]
    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', 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='SecurityRuleApiVersionMetadataSpec', HelpMessage='SendAsync Pipeline Steps to be prepended to the front of the pipeline')]
    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', 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='SecurityRuleApiVersionMetadataSpec', HelpMessage='The URI for the proxy server to use')]
    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', 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='SecurityRuleApiVersionMetadataSpec', HelpMessage='Credentials for a proxy server to use for the remote call')]
    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', 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='SecurityRuleApiVersionMetadataSpec', HelpMessage='Use the default credentials for the proxy')]
    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='Use the default credentials for the proxy')]
    [switch]
    ${ProxyUseDefaultCredentials},

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

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

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

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

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

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

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

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

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='List of kinds associated with this filter.')]
    [string[]]
    ${CategoryFilterKindList},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='List of kinds associated with this filter.')]
    [string[]]
    ${CategoryFilterKindList1},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='List of kinds associated with this filter.')]
    [string[]]
    ${CategoryFilterKindList2},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='List of kinds associated with this filter.')]
    [string[]]
    ${CategoryFilterKindList3},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', Mandatory=$true, HelpMessage='A list of category key and list of values.')]
    [System.Collections.Generic.IDictionary[string,string]]
    ${CategoryFilterParams},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', Mandatory=$true, HelpMessage='A list of category key and list of values.')]
    [System.Collections.Generic.IDictionary[string,string]]
    ${CategoryFilterParams1},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', Mandatory=$true, HelpMessage='A list of category key and list of values.')]
    [System.Collections.Generic.IDictionary[string,string]]
    ${CategoryFilterParams2},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', Mandatory=$true, HelpMessage='A list of category key and list of values.')]
    [System.Collections.Generic.IDictionary[string,string]]
    ${CategoryFilterParams3},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='The type of the filter being used.')]
    [string]
    ${CategoryFilterType},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='The type of the filter being used.')]
    [string]
    ${CategoryFilterType1},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='The type of the filter being used.')]
    [string]
    ${CategoryFilterType2},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='The type of the filter being used.')]
    [string]
    ${CategoryFilterType3},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='HELP MESSAGE MISSING')]
    [string]
    ${NetworkSecurityRuleDescription},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', Mandatory=$true, HelpMessage='HELP MESSAGE MISSING')]
    [string]
    ${NetworkSecurityRuleName},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='Type of deployment of the rule.')]
    [string]
    ${NetworkSecurityRuleResourcesAppRuleAction},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='HELP MESSAGE MISSING')]
    [Nutanix.Powershell.Models.INetworkRule[]]
    ${NetworkSecurityRuleResourcesAppRuleInboundAllowList},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='HELP MESSAGE MISSING')]
    [Nutanix.Powershell.Models.INetworkRule[]]
    ${NetworkSecurityRuleResourcesAppRuleOutboundAllowList},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='Type of action.')]
    [string]
    ${NetworkSecurityRuleResourcesIsolationRuleAction},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='Type of action.')]
    [string]
    ${NetworkSecurityRuleResourcesQuarantineRuleAction},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='HELP MESSAGE MISSING')]
    [Nutanix.Powershell.Models.INetworkRule[]]
    ${NetworkSecurityRuleResourcesQuarantineRuleInboundAllowList},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='HELP MESSAGE MISSING')]
    [Nutanix.Powershell.Models.INetworkRule[]]
    ${NetworkSecurityRuleResourcesQuarantineRuleOutboundAllowList},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='Default policy for communication within target group.')]
    [string]
    ${TargetGroupDefaultInternalPolicy},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='Default policy for communication within target group.')]
    [string]
    ${TargetGroupDefaultInternalPolicy1},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='Way to identify the object for which rule is applied.')]
    [string]
    ${TargetGroupPeerSpecificationType},

    [Parameter(ParameterSetName='SecurityRuleApiVersionMetadataSpecExpanded', HelpMessage='Way to identify the object for which rule is applied.')]
    [string]
    ${TargetGroupPeerSpecificationType1})

begin
{
  switch ($PsCmdlet.ParameterSetName) { 

  'SecurityRuleApiVersionMetadataSpecExpanded' {

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

        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Nutanix.private\New-SecurityRule_SecurityRuleApiVersionMetadataSpecExpanded', [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-SecurityRule_Expanded', [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters }

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

}

  'SecurityRuleApiVersionMetadataSpec' {

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

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

#>


}