pspulumiyaml.azurenative.devhub.psm1

using module pspulumiyaml
function Invoke-AzureNativeFunctionDevhubGetWorkflow
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the resource group. The name is case insensitive.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the workflow resource.)')]
        [string]
        $workflowName
    )

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:devhub:getWorkflow -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionDevhubGetGitHubOAuth
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of Azure region.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='The URL the client will redirect to on successful authentication. If empty, no redirect will occur.)')]
        [string]
        $redirectUrl
    )

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

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:devhub:getGitHubOAuth -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
class ACR
{
    [string] $acrRegistryName
    [string] $acrRepositoryName
    [string] $acrResourceGroup
    [string] $acrSubscriptionId
}
function New-AzureNativeTypeDevhubACR
{
    param (
        [parameter(mandatory=$False,HelpMessage='ACR registry)')]
        [string]
        $acrRegistryName,
        [parameter(mandatory=$False,HelpMessage='ACR repository)')]
        [string]
        $acrRepositoryName,
        [parameter(mandatory=$False,HelpMessage='ACR resource group)')]
        [string]
        $acrResourceGroup,
        [parameter(mandatory=$False,HelpMessage='ACR subscription id)')]
        [string]
        $acrSubscriptionId
    )

    process
    {
        return $([ACR]$PSBoundParameters)
    }
}
class GitHubWorkflowProfileOidcCredentials
{
    [string] $azureTenantId
    [string] $azureClientId
}
function New-AzureNativeTypeDevhubGitHubWorkflowProfileOidcCredentials
{
    param (
        [parameter(mandatory=$False,HelpMessage='Azure Directory (tenant) ID)')]
        [string]
        $azureTenantId,
        [parameter(mandatory=$False,HelpMessage='Azure Application Client ID)')]
        [string]
        $azureClientId
    )

    process
    {
        return $([GitHubWorkflowProfileOidcCredentials]$PSBoundParameters)
    }
}
class DeploymentProperties
{
    [string] $helmValues
    [string] $helmChartPath
    [string[]] $kubeManifestLocations
    [object] $overrides
    [ArgumentCompletions('helm', 'kube')]
    [string] $manifestType
}
function New-AzureNativeTypeDevhubDeploymentProperties
{
    param (
        [parameter(mandatory=$False,HelpMessage='Helm Values.yaml file location in repository.)')]
        [string]
        $helmValues,
        [parameter(mandatory=$False,HelpMessage='Helm chart directory path in repository.)')]
        [string]
        $helmChartPath,
        [parameter(mandatory=$False,HelpMessage=')')]
        [string[]]
        $kubeManifestLocations,
        [parameter(mandatory=$False,HelpMessage='Manifest override values.)')]
        [hashtable]
        $overrides,
        [parameter(mandatory=$False,HelpMessage='Determines the type of manifests within the repository.)')]
        [string]
        [ValidateSet('helm', 'kube')]
        $manifestType
    )

    process
    {
        return $([DeploymentProperties]$PSBoundParameters)
    }
}
function New-AzureNativeDevhubWorkflow
{
    [Alias('azure_native_devhub_workflow')]
    param (
        [parameter(mandatory=$False,HelpMessage='Repository Branch Name)')]
        [string]
        $branchName,
        [parameter(mandatory=$False,HelpMessage='Path to Dockerfile Build Context within the repository.)')]
        [string]
        $dockerBuildContext,
        [parameter(mandatory=$False,HelpMessage='The Azure Kubernetes Cluster Resource the application will be deployed to.)')]
        [string]
        $aksResourceId,
        [parameter(mandatory=$False,HelpMessage='Information on the azure container registry)')]
        [ACR]
        $acr,
        [parameter(mandatory=$False,HelpMessage='The fields needed for OIDC with GitHub.)')]
        [GitHubWorkflowProfileOidcCredentials]
        $oidcCredentials,
        [parameter(mandatory=$False,HelpMessage='Repository Owner)')]
        [string]
        $repositoryOwner,
        [parameter(mandatory=$False,HelpMessage='The geo-location where the resource lives)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='Kubernetes namespace the application is deployed to.)')]
        [string]
        $namespace,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group. The name is case insensitive.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Repository Name)')]
        [string]
        $repositoryName,
        [parameter(mandatory=$False,HelpMessage=')')]
        [DeploymentProperties]
        $deploymentProperties,
        [parameter(mandatory=$False,HelpMessage='The name of the workflow resource.)')]
        [string]
        $workflowName,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Path to the Dockerfile within the repository.)')]
        [string]
        $dockerfile,
        [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:devhub:Workflow")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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