pspulumiyaml.azurenative.chaos.psm1

using module pspulumiyaml
function Invoke-AzureNativeFunctionChaosGetExperiment
{
    param (
        [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='String that represents a Experiment resource name.)')]
        [string]
        $experimentName
    )

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:chaos:getExperiment -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionChaosGetCapability
{
    param (
        [parameter(mandatory=$False,HelpMessage='String that represents a Target resource name.)')]
        [string]
        $targetName,
        [parameter(mandatory=$False,HelpMessage='String that represents a Capability resource name.)')]
        [string]
        $capabilityName,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')]
        [string]
        $parentProviderNamespace,
        [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource name.)')]
        [string]
        $parentResourceName,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource type.)')]
        [string]
        $parentResourceType
    )

    process
    {
        $arguments = @{}
        $arguments["capabilityName"] = $capabilityName
        $arguments["parentProviderNamespace"] = $parentProviderNamespace
        $arguments["parentResourceName"] = $parentResourceName
        $arguments["parentResourceType"] = $parentResourceType
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["targetName"] = $targetName

        $functionObject = Invoke-PulumiFunction -Name azure-native:chaos:getCapability -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionChaosGetTarget
{
    param (
        [parameter(mandatory=$False,HelpMessage='String that represents a Target resource name.)')]
        [string]
        $targetName,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource type.)')]
        [string]
        $parentResourceType,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource name.)')]
        [string]
        $parentResourceName,
        [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')]
        [string]
        $parentProviderNamespace
    )

    process
    {
        $arguments = @{}
        $arguments["parentProviderNamespace"] = $parentProviderNamespace
        $arguments["parentResourceName"] = $parentResourceName
        $arguments["parentResourceType"] = $parentResourceType
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["targetName"] = $targetName

        $functionObject = Invoke-PulumiFunction -Name azure-native:chaos:getTarget -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function New-AzureNativeChaosCapability
{
    [Alias('azure_native_chaos_capability')]
    param (
        [parameter(mandatory=$False,HelpMessage='String that represents a Target resource name.)')]
        [string]
        $targetName,
        [parameter(mandatory=$False,HelpMessage='String that represents a Capability resource name.)')]
        [string]
        $capabilityName,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')]
        [string]
        $parentProviderNamespace,
        [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource name.)')]
        [string]
        $parentResourceName,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource type.)')]
        [string]
        $parentResourceType,
        [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:chaos:Capability")

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeChaosTarget
{
    [Alias('azure_native_chaos_target')]
    param (
        [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The properties of the target resource.)')]
        $properties,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource provider namespace.)')]
        [string]
        $parentProviderNamespace,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource type.)')]
        [string]
        $parentResourceType,
        [parameter(mandatory=$False,HelpMessage='String that represents a resource name.)')]
        [string]
        $parentResourceName,
        [parameter(mandatory=$False,HelpMessage='String that represents a Target resource name.)')]
        [string]
        $targetName,
        [parameter(mandatory=$False,HelpMessage='Location of the target resource.)')]
        [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:chaos:Target")

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class TargetReference
{
    [ArgumentCompletions('ChaosTarget')]
    [object] $type
    [string] $id
}
function New-AzureNativeTypeChaosTargetReference
{
    param (
        [parameter(mandatory=$False,HelpMessage='Enum of the Target reference type.)')]
        $type,
        [parameter(mandatory=$False,HelpMessage='String of the resource ID of a Target resource.)')]
        [string]
        $id
    )

    process
    {
        return $([TargetReference]$PSBoundParameters)
    }
}
class Selector
{
    [ArgumentCompletions('Percent', 'Random', 'Tag', 'List')]
    [object] $type
    [TargetReference[]] $targets
    [string] $id
}
function New-AzureNativeTypeChaosSelector
{
    param (
        [parameter(mandatory=$False,HelpMessage='Enum of the selector type.)')]
        $type,
        [parameter(mandatory=$False,HelpMessage='List of Target references.)')]
        $targets,
        [parameter(mandatory=$False,HelpMessage='String of the selector ID.)')]
        [string]
        $id
    )

    process
    {
        return $([Selector]$PSBoundParameters)
    }
}
class Branch
{
    [string] $name
    [object] $actions #todo add class here
}
function New-AzureNativeTypeChaosBranch
{
    param (
        [parameter(mandatory=$False,HelpMessage='String of the branch name.)')]
        [string]
        $name,
        [parameter(mandatory=$False,HelpMessage='List of actions.)')]
        $actions
    )

    process
    {
        return $([Branch]$PSBoundParameters)
    }
}
class Step
{
    [Branch[]] $branches
    [string] $name
}
function New-AzureNativeTypeChaosStep
{
    param (
        [parameter(mandatory=$False,HelpMessage='List of branches.)')]
        $branches,
        [parameter(mandatory=$False,HelpMessage='String of the step name.)')]
        [string]
        $name
    )

    process
    {
        return $([Step]$PSBoundParameters)
    }
}
class ExperimentProperties
{
    [bool] $startOnCreation
    [Selector[]] $selectors
    [Step[]] $steps
}
function New-AzureNativeTypeChaosExperimentProperties
{
    param (
        [parameter(mandatory=$False,HelpMessage='A boolean value that indicates if experiment should be started on creation or not.)')]
        [bool]
        $startOnCreation,
        [parameter(mandatory=$False,HelpMessage='List of selectors.)')]
        $selectors,
        [parameter(mandatory=$False,HelpMessage='List of steps.)')]
        $steps
    )

    process
    {
        return $([ExperimentProperties]$PSBoundParameters)
    }
}
class ResourceIdentity
{
    [ArgumentCompletions('None', 'SystemAssigned')]
    [object] $type
}
function New-AzureNativeTypeChaosResourceIdentity
{
    param (
        [parameter(mandatory=$False,HelpMessage='String of the resource identity type.)')]
        $type
    )

    process
    {
        return $([ResourceIdentity]$PSBoundParameters)
    }
}
function New-AzureNativeChaosExperiment
{
    [Alias('azure_native_chaos_experiment')]
    param (
        [parameter(mandatory=$False,HelpMessage='The properties of the experiment resource.)')]
        [ExperimentProperties]
        $properties,
        [parameter(mandatory=$False,HelpMessage='String that represents a Experiment resource name.)')]
        [string]
        $experimentName,
        [parameter(mandatory=$False,HelpMessage='The identity of the experiment resource.)')]
        [ResourceIdentity]
        $identity,
        [parameter(mandatory=$False,HelpMessage='String that represents an Azure resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='The geo-location where the resource lives)')]
        [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:chaos:Experiment")

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

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

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

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

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

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