Api/FlyTeamsProjectApi.ps1

#
# Fly SDK API
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
# Version: 1.0
# Contact: support@avepoint.com
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS
 
Add team project mappings into target project
 
.DESCRIPTION
 
No description available.
 
.PARAMETER ProjectId
The GUID of the project to add into
 
.PARAMETER TeamsMappingCreationModel
A list of project mappings to add
 
.PARAMETER ReturnType
 
Select the return type (optional): text/plain, application/json, text/json, application/*+json
 
.PARAMETER WithHttpInfo
 
A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response
 
.OUTPUTS
 
Boolean
#>

function Add-FlyTeamsMappings {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ProjectId},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [PSCustomObject[]]
        ${TeamsMappingCreationModel},
        [String]
        [ValidateSet("text/plain", "application/json", "text/json", "application/*+json")]
        $ReturnType,
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Add-FlyTeamsMappings' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        $Configuration = Get-FlyConfiguration
        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('text/plain', 'application/json', 'text/json', 'application/*+json')

        if ($ReturnType) {
            # use the return type (MIME) provided by the user
            $LocalVarAccepts = @($ReturnType)
        }

        # HTTP header 'Content-Type'
        $LocalVarContentTypes = @('application/json')

        $LocalVarUri = '/projects/teams/{projectId}/mappings'
        if (!$ProjectId) {
            throw "Error! The required parameter `ProjectId` missing when calling addTeamsMappings."
        }
        $LocalVarUri = $LocalVarUri.replace('{projectId}', [System.Web.HTTPUtility]::UrlEncode($ProjectId))

        $LocalVarBodyParameter = ConvertTo-Json $TeamsMappingCreationModel -Depth 100

        if ($Configuration["AccessToken"]) {
            $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"]
            Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand)
        }

        $LocalVarResult = Invoke-FlyApiClient -Method 'POST' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "Boolean" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}

<#
.SYNOPSIS
 
Move Teams project mappings into another Teams project
 
.DESCRIPTION
 
No description available.
 
.PARAMETER ProjectId
The GUID of the project(move from)
 
.PARAMETER MoveMappingSettingsModel
No description available.
 
.PARAMETER ReturnType
 
Select the return type (optional): text/plain, application/json, text/json, application/*+json
 
.PARAMETER WithHttpInfo
 
A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response
 
.OUTPUTS
 
Boolean
#>

function Move-FlyTeamsMappings {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ProjectId},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [PSCustomObject]
        ${MoveMappingSettingsModel},
        [String]
        [ValidateSet("text/plain", "application/json", "text/json", "application/*+json")]
        $ReturnType,
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Move-FlyTeamsMappings' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        $Configuration = Get-FlyConfiguration
        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('text/plain', 'application/json', 'text/json', 'application/*+json')

        if ($ReturnType) {
            # use the return type (MIME) provided by the user
            $LocalVarAccepts = @($ReturnType)
        }

        # HTTP header 'Content-Type'
        $LocalVarContentTypes = @('application/json')

        $LocalVarUri = '/projects/teams/{projectId}/movemappings'
        if (!$ProjectId) {
            throw "Error! The required parameter `ProjectId` missing when calling moveTeamsMappings."
        }
        $LocalVarUri = $LocalVarUri.replace('{projectId}', [System.Web.HTTPUtility]::UrlEncode($ProjectId))

        $LocalVarBodyParameter = ConvertTo-Json $MoveMappingSettingsModel -Depth 100

        if ($Configuration["AccessToken"]) {
            $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"]
            Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand)
        }

        $LocalVarResult = Invoke-FlyApiClient -Method 'POST' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "Boolean" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}

<#
.SYNOPSIS
 
Start a migration job against the selected project mappings.
 
.DESCRIPTION
 
No description available.
 
.PARAMETER ProjectId
Identifier of the project containing the selected mappings
 
.PARAMETER MigrationJobSettingsModel
Job configuration information.
 
.PARAMETER ReturnType
 
Select the return type (optional): text/plain, application/json, text/json, application/*+json
 
.PARAMETER WithHttpInfo
 
A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response
 
.OUTPUTS
 
Boolean
#>

function Start-FlyTeamsMigrationJob {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ProjectId},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [PSCustomObject]
        ${MigrationJobSettingsModel},
        [String]
        [ValidateSet("text/plain", "application/json", "text/json", "application/*+json")]
        $ReturnType,
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Start-FlyTeamsMigrationJob' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        $Configuration = Get-FlyConfiguration
        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('text/plain', 'application/json', 'text/json', 'application/*+json')

        if ($ReturnType) {
            # use the return type (MIME) provided by the user
            $LocalVarAccepts = @($ReturnType)
        }

        # HTTP header 'Content-Type'
        $LocalVarContentTypes = @('application/json')

        $LocalVarUri = '/projects/teams/{projectId}/migrations'
        if (!$ProjectId) {
            throw "Error! The required parameter `ProjectId` missing when calling startTeamsMigrationJob."
        }
        $LocalVarUri = $LocalVarUri.replace('{projectId}', [System.Web.HTTPUtility]::UrlEncode($ProjectId))

        $LocalVarBodyParameter = ConvertTo-Json $MigrationJobSettingsModel -Depth 100

        if ($Configuration["AccessToken"]) {
            $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"]
            Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand)
        }

        $LocalVarResult = Invoke-FlyApiClient -Method 'POST' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "Boolean" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}

<#
.SYNOPSIS
 
Start a pre-scan job against the selected project mappings.
 
.DESCRIPTION
 
No description available.
 
.PARAMETER ProjectId
Identifier of the project containing the selected mappings
 
.PARAMETER ProjectMappingOperationModel
Job configuration information.
 
.PARAMETER ReturnType
 
Select the return type (optional): text/plain, application/json, text/json, application/*+json
 
.PARAMETER WithHttpInfo
 
A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response
 
.OUTPUTS
 
Boolean
#>

function Start-FlyTeamsPreScanJob {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ProjectId},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [PSCustomObject]
        ${ProjectMappingOperationModel},
        [String]
        [ValidateSet("text/plain", "application/json", "text/json", "application/*+json")]
        $ReturnType,
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Start-FlyTeamsPreScanJob' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        $Configuration = Get-FlyConfiguration
        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('text/plain', 'application/json', 'text/json', 'application/*+json')

        if ($ReturnType) {
            # use the return type (MIME) provided by the user
            $LocalVarAccepts = @($ReturnType)
        }

        # HTTP header 'Content-Type'
        $LocalVarContentTypes = @('application/json')

        $LocalVarUri = '/projects/teams/{projectId}/assessments'
        if (!$ProjectId) {
            throw "Error! The required parameter `ProjectId` missing when calling startTeamsPreScanJob."
        }
        $LocalVarUri = $LocalVarUri.replace('{projectId}', [System.Web.HTTPUtility]::UrlEncode($ProjectId))

        $LocalVarBodyParameter = ConvertTo-Json $ProjectMappingOperationModel -Depth 100

        if ($Configuration["AccessToken"]) {
            $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"]
            Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand)
        }

        $LocalVarResult = Invoke-FlyApiClient -Method 'POST' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "Boolean" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}

<#
.SYNOPSIS
 
Start a report collection job against the selected project mappings.
 
.DESCRIPTION
 
No description available.
 
.PARAMETER ProjectId
Identifier of the project containing the selected mappings
 
.PARAMETER GenerateReportSettingsModel
Job configuration information.
 
.PARAMETER ReturnType
 
Select the return type (optional): text/plain, application/json, text/json, application/*+json
 
.PARAMETER WithHttpInfo
 
A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response
 
.OUTPUTS
 
String
#>

function Start-FlyTeamsReportJob {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ProjectId},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [PSCustomObject]
        ${GenerateReportSettingsModel},
        [String]
        [ValidateSet("text/plain", "application/json", "text/json", "application/*+json")]
        $ReturnType,
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Start-FlyTeamsReportJob' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        $Configuration = Get-FlyConfiguration
        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('text/plain', 'application/json', 'text/json', 'application/*+json')

        if ($ReturnType) {
            # use the return type (MIME) provided by the user
            $LocalVarAccepts = @($ReturnType)
        }

        # HTTP header 'Content-Type'
        $LocalVarContentTypes = @('application/json')

        $LocalVarUri = '/projects/teams/{projectId}/reports/generate'
        if (!$ProjectId) {
            throw "Error! The required parameter `ProjectId` missing when calling startTeamsReportJob."
        }
        $LocalVarUri = $LocalVarUri.replace('{projectId}', [System.Web.HTTPUtility]::UrlEncode($ProjectId))

        $LocalVarBodyParameter = ConvertTo-Json $GenerateReportSettingsModel -Depth 100

        if ($Configuration["AccessToken"]) {
            $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"]
            Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand)
        }

        $LocalVarResult = Invoke-FlyApiClient -Method 'POST' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "String" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}

<#
.SYNOPSIS
 
Start a verification operation against the selected project mappings.
 
.DESCRIPTION
 
No description available.
 
.PARAMETER ProjectId
Identifier of the project containing the selected mappings
 
.PARAMETER ProjectMappingOperationModel
Job configuration information.
 
.PARAMETER ReturnType
 
Select the return type (optional): text/plain, application/json, text/json, application/*+json
 
.PARAMETER WithHttpInfo
 
A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response
 
.OUTPUTS
 
Boolean
#>

function Start-FlyTeamsVerificationJob {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${ProjectId},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [PSCustomObject]
        ${ProjectMappingOperationModel},
        [String]
        [ValidateSet("text/plain", "application/json", "text/json", "application/*+json")]
        $ReturnType,
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Start-FlyTeamsVerificationJob' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        $Configuration = Get-FlyConfiguration
        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('text/plain', 'application/json', 'text/json', 'application/*+json')

        if ($ReturnType) {
            # use the return type (MIME) provided by the user
            $LocalVarAccepts = @($ReturnType)
        }

        # HTTP header 'Content-Type'
        $LocalVarContentTypes = @('application/json')

        $LocalVarUri = '/projects/teams/{projectId}/verifications'
        if (!$ProjectId) {
            throw "Error! The required parameter `ProjectId` missing when calling startTeamsVerificationJob."
        }
        $LocalVarUri = $LocalVarUri.replace('{projectId}', [System.Web.HTTPUtility]::UrlEncode($ProjectId))

        $LocalVarBodyParameter = ConvertTo-Json $ProjectMappingOperationModel -Depth 100

        if ($Configuration["AccessToken"]) {
            $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"]
            Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand)
        }

        $LocalVarResult = Invoke-FlyApiClient -Method 'POST' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "Boolean" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}