pspulumiyaml.azurenative.databox.psm1

using module pspulumiyaml
function Invoke-AzureNativeFunctionDataboxGetJob
{
    param (
        [parameter(mandatory=$False,HelpMessage='$expand is supported on details parameter for job, which provides details on the job stages.)')]
        [string]
        $expand,
        [parameter(mandatory=$False,HelpMessage='The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters in length and use any alphanumeric and underscore only)')]
        [string]
        $jobName,
        [parameter(mandatory=$False,HelpMessage='The Resource Group Name)')]
        [string]
        $resourceGroupName
    )

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

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:databox:getJob -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionDataboxListJobCredentials
{
    param (
        [parameter(mandatory=$False,HelpMessage='The Resource Group Name)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters in length and use any alphanumeric and underscore only)')]
        [string]
        $jobName
    )

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:databox:listJobCredentials -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
class ShippingAddress
{
    [string] $country
    [string] $zipExtendedCode
    [string] $streetAddress1
    [string] $companyName
    [string] $postalCode
    [ArgumentCompletions('None', 'Residential', 'Commercial')]
    [string] $addressType
    [string] $city
    [string] $streetAddress3
    [string] $streetAddress2
    [string] $stateOrProvince
}
function New-AzureNativeTypeDataboxShippingAddress
{
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the Country.)')]
        [string]
        $country,
        [parameter(mandatory=$False,HelpMessage='Extended Zip Code.)')]
        [string]
        $zipExtendedCode,
        [parameter(mandatory=$False,HelpMessage='Street Address line 1.)')]
        [string]
        $streetAddress1,
        [parameter(mandatory=$False,HelpMessage='Name of the company.)')]
        [string]
        $companyName,
        [parameter(mandatory=$False,HelpMessage='Postal code.)')]
        [string]
        $postalCode,
        [parameter(mandatory=$False,HelpMessage='Type of address.)')]
        [string]
        [ValidateSet('None', 'Residential', 'Commercial')]
        $addressType,
        [parameter(mandatory=$False,HelpMessage='Name of the City.)')]
        [string]
        $city,
        [parameter(mandatory=$False,HelpMessage='Street Address line 3.)')]
        [string]
        $streetAddress3,
        [parameter(mandatory=$False,HelpMessage='Street Address line 2.)')]
        [string]
        $streetAddress2,
        [parameter(mandatory=$False,HelpMessage='Name of the State or Province.)')]
        [string]
        $stateOrProvince
    )

    process
    {
        return $([ShippingAddress]$PSBoundParameters)
    }
}
class FilterFileDetails
{
    [string] $filterFilePath
    [ArgumentCompletions('AzureBlob', 'AzureFile')]
    [string] $filterFileType
}
function New-AzureNativeTypeDataboxFilterFileDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='Path of the file that contains the details of all items to transfer.)')]
        [string]
        $filterFilePath,
        [parameter(mandatory=$False,HelpMessage='Type of the filter file.)')]
        [string]
        [ValidateSet('AzureBlob', 'AzureFile')]
        $filterFileType
    )

    process
    {
        return $([FilterFileDetails]$PSBoundParameters)
    }
}
class BlobFilterDetails
{
    [string[]] $containerList
    [string[]] $blobPrefixList
    [string[]] $blobPathList
}
function New-AzureNativeTypeDataboxBlobFilterDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='List of blob containers to be transferred.)')]
        [string[]]
        $containerList,
        [parameter(mandatory=$False,HelpMessage='Prefix list of the Azure blobs to be transferred.)')]
        [string[]]
        $blobPrefixList,
        [parameter(mandatory=$False,HelpMessage='List of full path of the blobs to be transferred.)')]
        [string[]]
        $blobPathList
    )

    process
    {
        return $([BlobFilterDetails]$PSBoundParameters)
    }
}
class AzureFileFilterDetails
{
    [string[]] $fileShareList
    [string[]] $filePathList
    [string[]] $filePrefixList
}
function New-AzureNativeTypeDataboxAzureFileFilterDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='List of file shares to be transferred.)')]
        [string[]]
        $fileShareList,
        [parameter(mandatory=$False,HelpMessage='List of full path of the files to be transferred.)')]
        [string[]]
        $filePathList,
        [parameter(mandatory=$False,HelpMessage='Prefix list of the Azure files to be transferred.)')]
        [string[]]
        $filePrefixList
    )

    process
    {
        return $([AzureFileFilterDetails]$PSBoundParameters)
    }
}
class TransferFilterDetails
{
    [ArgumentCompletions('StorageAccount', 'ManagedDisk')]
    [string] $dataAccountType
    [FilterFileDetails[]] $filterFileDetails
    [BlobFilterDetails] $blobFilterDetails
    [AzureFileFilterDetails] $azureFileFilterDetails
}
function New-AzureNativeTypeDataboxTransferFilterDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='Type of the account of data.)')]
        [string]
        [ValidateSet('StorageAccount', 'ManagedDisk')]
        $dataAccountType,
        [parameter(mandatory=$False,HelpMessage='Details of the filter files to be used for data transfer.)')]
        $filterFileDetails,
        [parameter(mandatory=$False,HelpMessage='Filter details to transfer blobs.)')]
        [BlobFilterDetails]
        $blobFilterDetails,
        [parameter(mandatory=$False,HelpMessage='Filter details to transfer Azure files.)')]
        [AzureFileFilterDetails]
        $azureFileFilterDetails
    )

    process
    {
        return $([TransferFilterDetails]$PSBoundParameters)
    }
}
class TransferConfigurationTransferFilterDetails
{
    [TransferFilterDetails] $include
}
function New-AzureNativeTypeDataboxTransferConfigurationTransferFilterDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='Details of the filtering the transfer of data.)')]
        [TransferFilterDetails]
        $include
    )

    process
    {
        return $([TransferConfigurationTransferFilterDetails]$PSBoundParameters)
    }
}
class TransferAllDetails
{
    [ArgumentCompletions('StorageAccount', 'ManagedDisk')]
    [string] $dataAccountType
    [bool] $transferAllBlobs
    [bool] $transferAllFiles
}
function New-AzureNativeTypeDataboxTransferAllDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='Type of the account of data)')]
        [string]
        [ValidateSet('StorageAccount', 'ManagedDisk')]
        $dataAccountType,
        [parameter(mandatory=$False,HelpMessage='To indicate if all Azure blobs have to be transferred)')]
        [bool]
        $transferAllBlobs,
        [parameter(mandatory=$False,HelpMessage='To indicate if all Azure Files have to be transferred)')]
        [bool]
        $transferAllFiles
    )

    process
    {
        return $([TransferAllDetails]$PSBoundParameters)
    }
}
class TransferConfigurationTransferAllDetails
{
    [TransferAllDetails] $include
}
function New-AzureNativeTypeDataboxTransferConfigurationTransferAllDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='Details to transfer all data.)')]
        [TransferAllDetails]
        $include
    )

    process
    {
        return $([TransferConfigurationTransferAllDetails]$PSBoundParameters)
    }
}
class TransferConfiguration
{
    [TransferConfigurationTransferFilterDetails] $transferFilterDetails
    [TransferConfigurationTransferAllDetails] $transferAllDetails
    [ArgumentCompletions('TransferAll', 'TransferUsingFilter')]
    [string] $transferConfigurationType
}
function New-AzureNativeTypeDataboxTransferConfiguration
{
    param (
        [parameter(mandatory=$False,HelpMessage='Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter.)')]
        [TransferConfigurationTransferFilterDetails]
        $transferFilterDetails,
        [parameter(mandatory=$False,HelpMessage='Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll)')]
        [TransferConfigurationTransferAllDetails]
        $transferAllDetails,
        [parameter(mandatory=$False,HelpMessage='Type of the configuration for transfer.)')]
        [string]
        [ValidateSet('TransferAll', 'TransferUsingFilter')]
        $transferConfigurationType
    )

    process
    {
        return $([TransferConfiguration]$PSBoundParameters)
    }
}
class DataExportDetails
{
    [ArgumentCompletions('Error', 'Verbose')]
    [string] $logCollectionLevel
    [TransferConfiguration] $transferConfiguration
    [object] $accountDetails #todo add class here
}
class StorageAccountDetails
{
    [string] $dataAccountType
    [string] $storageAccountId
    [string] $sharePassword
}
function New-AzureNativeTypeDataboxStorageAccountDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='Account Type of the data to be transferred.
Expected value is ''StorageAccount''.)'
)]
        [string]
        $dataAccountType,
        [parameter(mandatory=$False,HelpMessage='Storage Account Resource Id.)')]
        [string]
        $storageAccountId,
        [parameter(mandatory=$False,HelpMessage='Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+)')]
        [string]
        $sharePassword
    )

    process
    {
        return $([StorageAccountDetails]$PSBoundParameters)
    }
}
function New-AzureNativeTypeDataboxDataExportDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='Level of the logs to be collected.)')]
        [string]
        [ValidateSet('Error', 'Verbose')]
        $logCollectionLevel,
        [parameter(mandatory=$False,HelpMessage='Configuration for the data transfer.)')]
        [TransferConfiguration]
        $transferConfiguration,
        [parameter(mandatory=$False,HelpMessage='Account details of the data to be transferred)')]
        [StorageAccountDetails]
        $accountDetails
    )

    process
    {
        return $([DataExportDetails]$PSBoundParameters)
    }
}
class UserAssignedProperties
{
    [string] $resourceId
}
function New-AzureNativeTypeDataboxUserAssignedProperties
{
    param (
        [parameter(mandatory=$False,HelpMessage='Arm resource id for user assigned identity to be used to fetch MSI token.)')]
        [string]
        $resourceId
    )

    process
    {
        return $([UserAssignedProperties]$PSBoundParameters)
    }
}
class IdentityProperties
{
    [string] $type
    [UserAssignedProperties] $userAssigned
}
function New-AzureNativeTypeDataboxIdentityProperties
{
    param (
        [parameter(mandatory=$False,HelpMessage='Managed service identity type.)')]
        [string]
        $type,
        [parameter(mandatory=$False,HelpMessage='User assigned identity properties.)')]
        [UserAssignedProperties]
        $userAssigned
    )

    process
    {
        return $([IdentityProperties]$PSBoundParameters)
    }
}
class KeyEncryptionKey
{
    [string] $kekUrl
    [IdentityProperties] $identityProperties
    [ArgumentCompletions('MicrosoftManaged', 'CustomerManaged')]
    [string] $kekType
    [string] $kekVaultResourceID
}
function New-AzureNativeTypeDataboxKeyEncryptionKey
{
    param (
        [parameter(mandatory=$False,HelpMessage='Key encryption key. It is required in case of Customer managed KekType.)')]
        [string]
        $kekUrl,
        [parameter(mandatory=$False,HelpMessage='Managed identity properties used for key encryption.)')]
        [IdentityProperties]
        $identityProperties,
        [parameter(mandatory=$False,HelpMessage='Type of encryption key used for key encryption.)')]
        [string]
        [ValidateSet('MicrosoftManaged', 'CustomerManaged')]
        $kekType,
        [parameter(mandatory=$False,HelpMessage='Kek vault resource id. It is required in case of Customer managed KekType.)')]
        [string]
        $kekVaultResourceID
    )

    process
    {
        return $([KeyEncryptionKey]$PSBoundParameters)
    }
}
class EncryptionPreferences
{
    [ArgumentCompletions('Enabled', 'Disabled')]
    [string] $doubleEncryption
}
function New-AzureNativeTypeDataboxEncryptionPreferences
{
    param (
        [parameter(mandatory=$False,HelpMessage='Defines secondary layer of software-based encryption enablement.)')]
        [string]
        [ValidateSet('Enabled', 'Disabled')]
        $doubleEncryption
    )

    process
    {
        return $([EncryptionPreferences]$PSBoundParameters)
    }
}
class TransportPreferences
{
    [ArgumentCompletions('CustomerManaged', 'MicrosoftManaged')]
    [string] $preferredShipmentType
}
function New-AzureNativeTypeDataboxTransportPreferences
{
    param (
        [parameter(mandatory=$False,HelpMessage='Indicates Shipment Logistics type that the customer preferred.)')]
        [string]
        [ValidateSet('CustomerManaged', 'MicrosoftManaged')]
        $preferredShipmentType
    )

    process
    {
        return $([TransportPreferences]$PSBoundParameters)
    }
}
class Preferences
{
    [EncryptionPreferences] $encryptionPreferences
    [TransportPreferences] $transportPreferences
    [string[]] $preferredDataCenterRegion
}
function New-AzureNativeTypeDataboxPreferences
{
    param (
        [parameter(mandatory=$False,HelpMessage='Preferences related to the Encryption.)')]
        [EncryptionPreferences]
        $encryptionPreferences,
        [parameter(mandatory=$False,HelpMessage='Preferences related to the shipment logistics of the sku.)')]
        [TransportPreferences]
        $transportPreferences,
        [parameter(mandatory=$False,HelpMessage='Preferred data center region.)')]
        [string[]]
        $preferredDataCenterRegion
    )

    process
    {
        return $([Preferences]$PSBoundParameters)
    }
}
class DataImportDetails
{
    [object] $accountDetails #todo add class here
}
function New-AzureNativeTypeDataboxDataImportDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='Account details of the data to be transferred)')]
        [StorageAccountDetails]
        $accountDetails
    )

    process
    {
        return $([DataImportDetails]$PSBoundParameters)
    }
}
class NotificationPreference
{
    [bool] $sendNotification
    [ArgumentCompletions('DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy')]
    [string] $stageName
}
function New-AzureNativeTypeDataboxNotificationPreference
{
    param (
        [parameter(mandatory=$False,HelpMessage='Notification is required or not.)')]
        [bool]
        $sendNotification,
        [parameter(mandatory=$False,HelpMessage='Name of the stage.)')]
        [string]
        [ValidateSet('DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy')]
        $stageName
    )

    process
    {
        return $([NotificationPreference]$PSBoundParameters)
    }
}
class ContactDetails
{
    [string] $contactName
    [NotificationPreference[]] $notificationPreference
    [string] $phone
    [string[]] $emailList
    [string] $phoneExtension
    [string] $mobile
}
function New-AzureNativeTypeDataboxContactDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='Contact name of the person.)')]
        [string]
        $contactName,
        [parameter(mandatory=$False,HelpMessage='Notification preference for a job stage.)')]
        $notificationPreference,
        [parameter(mandatory=$False,HelpMessage='Phone number of the contact person.)')]
        [string]
        $phone,
        [parameter(mandatory=$False,HelpMessage='List of Email-ids to be notified about job progress.)')]
        [string[]]
        $emailList,
        [parameter(mandatory=$False,HelpMessage='Phone extension number of the contact person.)')]
        [string]
        $phoneExtension,
        [parameter(mandatory=$False,HelpMessage='Mobile number of the contact person.)')]
        [string]
        $mobile
    )

    process
    {
        return $([ContactDetails]$PSBoundParameters)
    }
}
class DataBoxJobDetails
{
    [string] $jobDetailsType
    [ShippingAddress] $shippingAddress
    [DataExportDetails[]] $dataExportDetails
    [int] $expectedDataSizeInTeraBytes
    [KeyEncryptionKey] $keyEncryptionKey
    [string] $devicePassword
    [Preferences] $preferences
    [DataImportDetails[]] $dataImportDetails
    [ContactDetails] $contactDetails
}
function New-AzureNativeTypeDataboxDataBoxJobDetails
{
    param (
        [parameter(mandatory=$False,HelpMessage='Indicates the type of job details.
Expected value is ''DataBox''.)'
)]
        [string]
        $jobDetailsType,
        [parameter(mandatory=$False,HelpMessage='Shipping address of the customer.)')]
        [ShippingAddress]
        $shippingAddress,
        [parameter(mandatory=$False,HelpMessage='Details of the data to be exported from azure.)')]
        $dataExportDetails,
        [parameter(mandatory=$False,HelpMessage='The expected size of the data, which needs to be transferred in this job, in terabytes.)')]
        [int]
        $expectedDataSizeInTeraBytes,
        [parameter(mandatory=$False,HelpMessage='Details about which key encryption type is being used.)')]
        [KeyEncryptionKey]
        $keyEncryptionKey,
        [parameter(mandatory=$False,HelpMessage='Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+)')]
        [string]
        $devicePassword,
        [parameter(mandatory=$False,HelpMessage='Preferences for the order.)')]
        [Preferences]
        $preferences,
        [parameter(mandatory=$False,HelpMessage='Details of the data to be imported into azure.)')]
        $dataImportDetails,
        [parameter(mandatory=$False,HelpMessage='Contact details for notification and shipping.)')]
        [ContactDetails]
        $contactDetails
    )

    process
    {
        return $([DataBoxJobDetails]$PSBoundParameters)
    }
}
class ResourceIdentity
{
    [string] $type
    [object] $userAssignedIdentities
}
function New-AzureNativeTypeDataboxResourceIdentity
{
    param (
        [parameter(mandatory=$False,HelpMessage='Identity type)')]
        [string]
        $type,
        [parameter(mandatory=$False,HelpMessage='User Assigned Identities)')]
        [object]
        $userAssignedIdentities
    )

    process
    {
        return $([ResourceIdentity]$PSBoundParameters)
    }
}
class Sku
{
    [string] $displayName
    [string] $family
    [ArgumentCompletions('DataBox', 'DataBoxDisk', 'DataBoxHeavy')]
    [string] $name
}
function New-AzureNativeTypeDataboxSku
{
    param (
        [parameter(mandatory=$False,HelpMessage='The display name of the sku.)')]
        [string]
        $displayName,
        [parameter(mandatory=$False,HelpMessage='The sku family.)')]
        [string]
        $family,
        [parameter(mandatory=$False,HelpMessage='The sku name.)')]
        [string]
        [ValidateSet('DataBox', 'DataBoxDisk', 'DataBoxHeavy')]
        $name
    )

    process
    {
        return $([Sku]$PSBoundParameters)
    }
}
class JobDeliveryInfo
{
    [string] $scheduledDateTime
}
function New-AzureNativeTypeDataboxJobDeliveryInfo
{
    param (
        [parameter(mandatory=$False,HelpMessage='Scheduled date time.)')]
        [string]
        $scheduledDateTime
    )

    process
    {
        return $([JobDeliveryInfo]$PSBoundParameters)
    }
}
function New-AzureNativeDataboxJob
{
    [Alias('azure_native_databox_job')]
    param (
        [parameter(mandatory=$False,HelpMessage='Details of a job run. This field will only be sent for expand details filter.)')]
        [DataBoxJobDetails]
        $details,
        [parameter(mandatory=$False,HelpMessage='The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters in length and use any alphanumeric and underscore only)')]
        [string]
        $jobName,
        [parameter(mandatory=$False,HelpMessage='Msi identity of the resource)')]
        [ResourceIdentity]
        $identity,
        [parameter(mandatory=$False,HelpMessage='Type of the data transfer.)')]
        [string]
        [ValidateSet('ImportToAzure', 'ExportFromAzure')]
        $transferType,
        [parameter(mandatory=$False,HelpMessage='The sku type.)')]
        [Sku]
        $sku,
        [parameter(mandatory=$False,HelpMessage='Delivery type of Job.)')]
        [string]
        [ValidateSet('NonScheduled', 'Scheduled')]
        $deliveryType,
        [parameter(mandatory=$False,HelpMessage='Delivery Info of Job.)')]
        [JobDeliveryInfo]
        $deliveryInfo,
        [parameter(mandatory=$False,HelpMessage='The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups).)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='The Resource Group Name)')]
        [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:databox:Job")

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

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

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

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

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

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

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

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

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