pspulumiyaml.azurenative.saas.psm1

using module pspulumiyaml
function Invoke-AzureNativeFunctionSaasListSaasSubscriptionLevelAccessToken
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the resource.)')]
        [string]
        $resourceName
    )

    process
    {
        $arguments = @{}
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["resourceName"] = $resourceName

        $functionObject = Invoke-PulumiFunction -Name azure-native:saas:listSaasSubscriptionLevelAccessToken -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSaasGetSaasSubscriptionLevel
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the resource.)')]
        [string]
        $resourceName
    )

    process
    {
        $arguments = @{}
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["resourceName"] = $resourceName

        $functionObject = Invoke-PulumiFunction -Name azure-native:saas:getSaasSubscriptionLevel -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSaasListSaasResourceAccessToken
{
    param (
        [parameter(mandatory=$False,HelpMessage='The Saas resource ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000))')]
        [string]
        $resourceId
    )

    process
    {
        $arguments = @{}
        $arguments["resourceId"] = $resourceId

        $functionObject = Invoke-PulumiFunction -Name azure-native:saas:listSaasResourceAccessToken -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
class SaasCreationProperties
{
    [int] $quantity
    [string] $offerId
    [string] $saasResourceName
    [string] $saasSubscriptionId
    [object] $paymentChannelMetadata
    [string] $saasSessionId
    [string] $publisherTestEnvironment
    [string] $termId
    [string] $skuId
    [ArgumentCompletions('SubscriptionDelegated', 'CustomerDelegated')]
    [string] $paymentChannelType
    [string] $publisherId
    [bool] $autoRenew
}
function New-AzureNativeTypeSaasSaasCreationProperties
{
    param (
        [parameter(mandatory=$False,HelpMessage='The seat count.)')]
        [int]
        $quantity,
        [parameter(mandatory=$False,HelpMessage='The offer id.)')]
        [string]
        $offerId,
        [parameter(mandatory=$False,HelpMessage='The SaaS resource name.)')]
        [string]
        $saasResourceName,
        [parameter(mandatory=$False,HelpMessage='The saas subscription id used for tenant to subscription level migration request.)')]
        [string]
        $saasSubscriptionId,
        [parameter(mandatory=$False,HelpMessage='The metadata about the SaaS subscription such as the AzureSubscriptionId and ResourceUri.)')]
        [hashtable]
        $paymentChannelMetadata,
        [parameter(mandatory=$False,HelpMessage='The saas session id used for dev service migration request.)')]
        [string]
        $saasSessionId,
        [parameter(mandatory=$False,HelpMessage='The environment in the publisher side for this resource.)')]
        [string]
        $publisherTestEnvironment,
        [parameter(mandatory=$False,HelpMessage='The current Term id.)')]
        [string]
        $termId,
        [parameter(mandatory=$False,HelpMessage='The plan id.)')]
        [string]
        $skuId,
        [parameter(mandatory=$False,HelpMessage='The Payment channel for the SaasSubscription.)')]
        [string]
        [ValidateSet('SubscriptionDelegated', 'CustomerDelegated')]
        $paymentChannelType,
        [parameter(mandatory=$False,HelpMessage='The publisher id.)')]
        [string]
        $publisherId,
        [parameter(mandatory=$False,HelpMessage='Whether the SaaS subscription will auto renew upon term end.)')]
        [bool]
        $autoRenew
    )

    process
    {
        return $([SaasCreationProperties]$PSBoundParameters)
    }
}
function New-AzureNativeSaasSaasSubscriptionLevel
{
    [Alias('azure_native_saas_saassubscriptionlevel')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the resource.)')]
        [string]
        $resourceName,
        [parameter(mandatory=$False,HelpMessage='Properties of the SaaS resource that are relevant for creation.)')]
        [SaasCreationProperties]
        $properties,
        [parameter(mandatory=$False,HelpMessage='The resource name)')]
        [string]
        $name,
        [parameter(mandatory=$False,HelpMessage='the resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Resource location. Only value allowed for SaaS is ''global'')')]
        [string]
        $location,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')]
        [object]
        $DependsOn
    )

    process
    {
        $resource = [pulumiresource]::new($pulumiid, "azure-native:saas:SaasSubscriptionLevel")

        foreach($Dependency in $DependsOn)
        {
            if($Dependency -is [pulumiresource])
            {
                $resource.dependson += $Dependency.Reference()
            } else
            {
                $resource.dependson += $Dependency
            }
        }
        $resource.properties["resourceGroupName"] = $resourceGroupName

        if($PSBoundParameters.Keys -icontains 'resourceName')
        {
            $resource.properties["resourceName"] = $resourceName
        }

        if($PSBoundParameters.Keys -icontains 'properties')
        {
            $resource.properties["properties"] = $properties
        }

        if($PSBoundParameters.Keys -icontains 'name')
        {
            $resource.properties["name"] = $name
        }

        if($PSBoundParameters.Keys -icontains 'tags')
        {
            $resource.properties["tags"] = $tags
        }

        if($PSBoundParameters.Keys -icontains 'location')
        {
            $resource.properties["location"] = $location
        }

        $global:pulumiresources += $resource
        return $resource
    }
}