pspulumiyaml.azurenative.dataprotection.psm1

using module pspulumiyaml
function Invoke-AzureNativeFunctionDataprotectionGetBackupVault
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the resource group where the backup vault is present.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the backup vault.)')]
        [string]
        $vaultName
    )

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:dataprotection:getBackupVault -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionDataprotectionGetResourceGuard
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the resource group where the backup vault is present.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of ResourceGuard)')]
        [string]
        $resourceGuardsName
    )

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:dataprotection:getResourceGuard -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionDataprotectionGetBackupPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage=')')]
        [string]
        $backupPolicyName,
        [parameter(mandatory=$False,HelpMessage='The name of the backup vault.)')]
        [string]
        $vaultName,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group where the backup vault is present.)')]
        [string]
        $resourceGroupName
    )

    process
    {
        $arguments = @{}
        $arguments["backupPolicyName"] = $backupPolicyName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["vaultName"] = $vaultName

        $functionObject = Invoke-PulumiFunction -Name azure-native:dataprotection:getBackupPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionDataprotectionGetBackupInstance
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the backup vault.)')]
        [string]
        $vaultName,
        [parameter(mandatory=$False,HelpMessage='The name of the backup instance)')]
        [string]
        $backupInstanceName,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group where the backup vault is present.)')]
        [string]
        $resourceGroupName
    )

    process
    {
        $arguments = @{}
        $arguments["backupInstanceName"] = $backupInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["vaultName"] = $vaultName

        $functionObject = Invoke-PulumiFunction -Name azure-native:dataprotection:getBackupInstance -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
class BackupPolicy
{
    [string[]] $datasourceTypes
    [object] $policyRules #todo add class here
    [string] $objectType
}
function New-AzureNativeTypeDataprotectionBackupPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='Type of datasource for the backup management)')]
        [string[]]
        $datasourceTypes,
        [parameter(mandatory=$False,HelpMessage='Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc)')]
        $policyRules,
        [parameter(mandatory=$False,HelpMessage='
Expected value is ''BackupPolicy''.)'
)]
        [string]
        $objectType
    )

    process
    {
        return $([BackupPolicy]$PSBoundParameters)
    }
}
function New-AzureNativeDataprotectionBackupPolicy
{
    [Alias('azure_native_dataprotection_backuppolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the policy)')]
        [string]
        $backupPolicyName,
        [parameter(mandatory=$False,HelpMessage='BaseBackupPolicyResource properties)')]
        [BackupPolicy]
        $properties,
        [parameter(mandatory=$False,HelpMessage='The name of the backup vault.)')]
        [string]
        $vaultName,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group where the backup vault is present.)')]
        [string]
        $resourceGroupName,
        [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:dataprotection:BackupPolicy")

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class DppIdentityDetails
{
    [string] $type
}
function New-AzureNativeTypeDataprotectionDppIdentityDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='The identityType which can be either SystemAssigned or None)')]
        [string]
        $type
    )

    process
    {
        return $([DppIdentityDetails]$PSBoundParameters)
    }
}
function New-AzureNativeDataprotectionResourceGuard
{
    [Alias('azure_native_dataprotection_resourceguard')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of ResourceGuard)')]
        [string]
        $resourceGuardsName,
        [parameter(mandatory=$False,HelpMessage='Input Managed Identity Details)')]
        [DppIdentityDetails]
        $identity,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group where the backup vault is present.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Optional ETag.)')]
        [string]
        $eTag,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Resource location.)')]
        [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:dataprotection:ResourceGuard")

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class StorageSetting
{
    [ArgumentCompletions('GeoRedundant', 'LocallyRedundant')]
    [string] $type
    [ArgumentCompletions('ArchiveStore', 'SnapshotStore', 'VaultStore')]
    [string] $datastoreType
}
function New-AzureNativeTypeDataprotectionStorageSetting
{
    param (
        [parameter(mandatory=$False,HelpMessage='Gets or sets the type.)')]
        [string]
        [ValidateSet('GeoRedundant', 'LocallyRedundant')]
        $type,
        [parameter(mandatory=$False,HelpMessage='Gets or sets the type of the datastore.)')]
        [string]
        [ValidateSet('ArchiveStore', 'SnapshotStore', 'VaultStore')]
        $datastoreType
    )

    process
    {
        return $([StorageSetting]$PSBoundParameters)
    }
}
class BackupVault
{
    [StorageSetting[]] $storageSettings
}
function New-AzureNativeTypeDataprotectionBackupVault
{
    param (
        [parameter(mandatory=$False,HelpMessage='Storage Settings)')]
        $storageSettings
    )

    process
    {
        return $([BackupVault]$PSBoundParameters)
    }
}
function New-AzureNativeDataprotectionBackupVault
{
    [Alias('azure_native_dataprotection_backupvault')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the backup vault.)')]
        [string]
        $vaultName,
        [parameter(mandatory=$False,HelpMessage='Input Managed Identity Details)')]
        [DppIdentityDetails]
        $identity,
        [parameter(mandatory=$False,HelpMessage='BackupVaultResource properties)')]
        [BackupVault]
        $properties,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group where the backup vault is present.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Optional ETag.)')]
        [string]
        $eTag,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Resource location.)')]
        [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:dataprotection:BackupVault")

        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 'vaultName')
        {
            $resource.properties["vaultName"] = $vaultName
        }

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class Datasource
{
    [string] $resourceID
    [string] $objectType
    [string] $resourceName
    [string] $resourceUri
    [string] $resourceLocation
    [string] $datasourceType
    [string] $resourceType
}
function New-AzureNativeTypeDataprotectionDatasource
{
    param (
        [parameter(mandatory=$False,HelpMessage='Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID created by backup service via Fabric/Vault.)')]
        [string]
        $resourceID,
        [parameter(mandatory=$False,HelpMessage='Type of Datasource object, used to initialize the right inherited type)')]
        [string]
        $objectType,
        [parameter(mandatory=$False,HelpMessage='Unique identifier of the resource in the context of parent.)')]
        [string]
        $resourceName,
        [parameter(mandatory=$False,HelpMessage='Uri of the resource.)')]
        [string]
        $resourceUri,
        [parameter(mandatory=$False,HelpMessage='Location of datasource.)')]
        [string]
        $resourceLocation,
        [parameter(mandatory=$False,HelpMessage='DatasourceType of the resource.)')]
        [string]
        $datasourceType,
        [parameter(mandatory=$False,HelpMessage='Resource Type of Datasource.)')]
        [string]
        $resourceType
    )

    process
    {
        return $([Datasource]$PSBoundParameters)
    }
}
class AzureOperationalStoreParameters
{
    [string] $resourceGroupId
    [string] $objectType
    [ArgumentCompletions('OperationalStore', 'VaultStore', 'ArchiveStore')]
    [string] $dataStoreType
}
function New-AzureNativeTypeDataprotectionAzureOperationalStoreParameters
{
    param (
        [parameter(mandatory=$False,HelpMessage='Gets or sets the Snapshot Resource Group Uri.)')]
        [string]
        $resourceGroupId,
        [parameter(mandatory=$False,HelpMessage='Type of the specific object - used for deserializing
Expected value is ''AzureOperationalStoreParameters''.)'
)]
        [string]
        $objectType,
        [parameter(mandatory=$False,HelpMessage='type of datastore; Operational/Vault/Archive)')]
        [string]
        [ValidateSet('OperationalStore', 'VaultStore', 'ArchiveStore')]
        $dataStoreType
    )

    process
    {
        return $([AzureOperationalStoreParameters]$PSBoundParameters)
    }
}
class PolicyParameters
{
    [AzureOperationalStoreParameters[]] $dataStoreParametersList
}
function New-AzureNativeTypeDataprotectionPolicyParameters
{
    param (
        [parameter(mandatory=$False,HelpMessage='Gets or sets the DataStore Parameters)')]
        $dataStoreParametersList
    )

    process
    {
        return $([PolicyParameters]$PSBoundParameters)
    }
}
class PolicyInfo
{
    [string] $policyId
    [PolicyParameters] $policyParameters
}
function New-AzureNativeTypeDataprotectionPolicyInfo
{
    param (
        [parameter(mandatory=$False,HelpMessage=')')]
        [string]
        $policyId,
        [parameter(mandatory=$False,HelpMessage='Policy parameters for the backup instance)')]
        [PolicyParameters]
        $policyParameters
    )

    process
    {
        return $([PolicyInfo]$PSBoundParameters)
    }
}
class DatasourceSet
{
    [string] $resourceID
    [string] $objectType
    [string] $resourceName
    [string] $resourceUri
    [string] $resourceLocation
    [string] $datasourceType
    [string] $resourceType
}
function New-AzureNativeTypeDataprotectionDatasourceSet
{
    param (
        [parameter(mandatory=$False,HelpMessage='Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID created by backup service via Fabric/Vault.)')]
        [string]
        $resourceID,
        [parameter(mandatory=$False,HelpMessage='Type of Datasource object, used to initialize the right inherited type)')]
        [string]
        $objectType,
        [parameter(mandatory=$False,HelpMessage='Unique identifier of the resource in the context of parent.)')]
        [string]
        $resourceName,
        [parameter(mandatory=$False,HelpMessage='Uri of the resource.)')]
        [string]
        $resourceUri,
        [parameter(mandatory=$False,HelpMessage='Location of datasource.)')]
        [string]
        $resourceLocation,
        [parameter(mandatory=$False,HelpMessage='DatasourceType of the resource.)')]
        [string]
        $datasourceType,
        [parameter(mandatory=$False,HelpMessage='Resource Type of Datasource.)')]
        [string]
        $resourceType
    )

    process
    {
        return $([DatasourceSet]$PSBoundParameters)
    }
}
class BackupInstance
{
    [string] $friendlyName
    [Datasource] $dataSourceInfo
    [string] $objectType
    [PolicyInfo] $policyInfo
    [DatasourceSet] $dataSourceSetInfo
}
function New-AzureNativeTypeDataprotectionBackupInstance
{
    param (
        [parameter(mandatory=$False,HelpMessage='Gets or sets the Backup Instance friendly name.)')]
        [string]
        $friendlyName,
        [parameter(mandatory=$False,HelpMessage='Gets or sets the data source information.)')]
        [Datasource]
        $dataSourceInfo,
        [parameter(mandatory=$False,HelpMessage=')')]
        [string]
        $objectType,
        [parameter(mandatory=$False,HelpMessage='Gets or sets the policy information.)')]
        [PolicyInfo]
        $policyInfo,
        [parameter(mandatory=$False,HelpMessage='Gets or sets the data source set information.)')]
        [DatasourceSet]
        $dataSourceSetInfo
    )

    process
    {
        return $([BackupInstance]$PSBoundParameters)
    }
}
function New-AzureNativeDataprotectionBackupInstance
{
    [Alias('azure_native_dataprotection_backupinstance')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the backup vault.)')]
        [string]
        $vaultName,
        [parameter(mandatory=$False,HelpMessage='The name of the backup instance)')]
        [string]
        $backupInstanceName,
        [parameter(mandatory=$False,HelpMessage='BackupInstanceResource properties)')]
        [BackupInstance]
        $properties,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group where the backup vault is present.)')]
        [string]
        $resourceGroupName,
        [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:dataprotection:BackupInstance")

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

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

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

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